root / common_windows.sh @ 86ddc018
History | View | Annotate | Download (1.3 kB)
1 |
|
---|---|
2 |
if [ "x$windows_support" != "xyes" ] ; then |
3 |
log_error "Windows support is disabled." |
4 |
exit 1; |
5 |
fi |
6 |
|
7 |
windows_format_disk0() { |
8 |
# |
9 |
# The -f is needed, because we use an optimal alignment and sfdisk complains |
10 |
# about partitions not ending on clylinder boundary. |
11 |
# |
12 |
local sfdisk_cmd="$SFDISK -uS -H 255 -S 63 -f --quiet --Linux --DOS $1" |
13 |
|
14 |
if [ "${BOOT}" = "yes" ]; then |
15 |
#One boot partition 100M and the rest %SYSTEMDRIVE% |
16 |
# $sfdisk_cmd > /dev/null <<EOF |
17 |
#2048,206847,7,* |
18 |
#,,7 |
19 |
#EOF |
20 |
log_error "We do not support windows boot partitions yet." |
21 |
exit 1; |
22 |
else # "${BOOT}" = "no" |
23 |
$sfdisk_cmd > /dev/null <<EOF |
24 |
2048,,7,* |
25 |
EOF |
26 |
fi |
27 |
} |
28 |
|
29 |
windows_setup_console() { |
30 |
# OK, well, I don't support windows serial consoles yet. I don't really plan |
31 |
# to do it in the future either, but you never know... |
32 |
echo "Serial console for windows is not supported..." |
33 |
} |
34 |
|
35 |
windows_epilogue() { |
36 |
local target=$1 |
37 |
if [ -z "$target" ] ; then |
38 |
log_error "target not set" |
39 |
exit 1; |
40 |
fi |
41 |
|
42 |
# Write the initial Unattend.xml to %SystemDrive% |
43 |
cat unattend.xml > "$target/Unattend.xml" |
44 |
|
45 |
#TODO: I need to add code here that configures Windows to remove |
46 |
# Unattend.xml after the setup finishes. Leaving Unattend.xml in place |
47 |
# raises security concerns |
48 |
} |
49 |
|