Revision 6738cd80

b/common.sh.in
147 147
map_partition() {
148 148
    filesystem_dev="$1"
149 149
    partition="$2"
150
    if [ "${SWAP}" = "yes" -a -z "${KERNEL_PATH}" ] ; then
150
    if [ "${SWAP}" = "yes" -a "${BOOT}" = "yes" ] ; then
151 151
        boot_dev="${filesystem_dev}-1"
152 152
        swap_dev="${filesystem_dev}-2"
153 153
        root_dev="${filesystem_dev}-3"
154
    elif [ "${SWAP}" = "no" -a -z "${KERNEL_PATH}" ] ; then
154
    elif [ "${SWAP}" = "no" -a "${BOOT}" = "yes" ] ; then
155 155
        boot_dev="${filesystem_dev}-1"
156 156
        root_dev="${filesystem_dev}-2"
157
    elif [ "${SWAP}" = "yes" -a -n "${KERNEL_PATH}" ] ; then
157
    elif [ "${SWAP}" = "yes" -a "${BOOT}" = "no" ] ; then
158 158
        swap_dev="${filesystem_dev}-1"
159 159
        root_dev="${filesystem_dev}-2"
160
    elif [ "${SWAP}" = "no" -a -n "${KERNEL_PATH}" ] ; then
160
    elif [ "${SWAP}" = "no" -a "${BOOT}" = "no" ] ; then
161 161
        root_dev="${filesystem_dev}-1"
162 162
    fi
163 163
    echo "$(eval "echo \${$(echo ${partition}_dev)"})"
......
210 210
# only if the user want to specify a mirror in the defaults file we
211 211
# will use it, this declaration is to make sure the variable is set
212 212
: ${CDINSTALL:="no"}
213
: ${BOOT:="no"}
213 214
: ${SWAP:="yes"}
214 215
: ${SWAP_SIZE:="${INSTANCE_BE_memory}"}
215 216
: ${FILESYSTEM:="ext3"}
b/common_linux.sh
60 60

  
61 61
linux_format_disk0() {
62 62
    local sfdisk_cmd="$SFDISK -uM -H 255 -S 63 --quiet --Linux --DOS $1"
63
    if [  "${SWAP}" = "yes" -a -z "${KERNEL_PATH}" ] ; then
63
    if [  "${SWAP}" = "yes" -a "${BOOT}" = "yes" ] ; then
64 64
        # Create three partitions:
65 65
        # 1 - 100MB /boot, bootable
66 66
        # 2 - Size of Memory, swap
......
70 70
,${SWAP_SIZE},S
71 71
,,L
72 72
EOF
73
    elif [  "${SWAP}" = "no" -a -z "${KERNEL_PATH}" ] ; then
73
    elif [  "${SWAP}" = "no" -a "${BOOT}" = "yes" ] ; then
74 74
        # Create two partitions:
75 75
        # 1 - 100MB /boot, bootable
76 76
        # 2 - Rest
......
78 78
,100,L,*
79 79
,,L
80 80
EOF
81
    elif [  "${SWAP}" = "yes" -a -n "${KERNEL_PATH}" ] ; then
81
    elif [  "${SWAP}" = "yes" -a "${BOOT}" = "no" ] ; then
82 82
        # Create two partitions:
83 83
        # 1 - Size of Memory, swap
84 84
        # 2 - Rest
......
86 86
,$SWAP_SIZE,S
87 87
,,L
88 88
EOF
89
    elif [  "${SWAP}" = "no" -a -n "${KERNEL_PATH}" ] ; then
89
    elif [  "${SWAP}" = "no" -a "${BOOT}" = "no" ] ; then
90 90
        # Create two partitions:
91 91
        # 1 - Whole
92 92
        $sfdisk_cmd > /dev/null <<EOF
b/common_windows.sh
11 11
    #
12 12
    local sfdisk_cmd="$SFDISK -uS -H 255 -S 63 -f --quiet --Linux --DOS $1"
13 13

  
14
    # for now we do not support boot partitions...
15
    $sfdisk_cmd > /dev/null <<EOF
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
16 24
2048,,7,*
17 25
EOF
18
    
26
    fi
19 27
}
20 28

  
21 29
windows_setup_console() {
b/defaults
5 5
# new image
6 6
# CDINSTALL="no"
7 7

  
8
# BOOT: Create a boot partition
9
# BOOT=no
10

  
8 11
# SWAP: Create a swap partition
9 12
# SWAP=yes
10 13

  

Also available in: Unified diff