20-e2k-boot 1.24 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
#!/bin/sh

echo "** 20-e2k-boot START"

cd "$WORKDIR"

# slightly different logic as there's no boot *menu*:
# ensure the user can install this if possible
[ -f live    ] && default=live
[ -f rescue  ] && default=rescue
[ -f altinst ] && default=install

cat > boot.conf << EOF
# USB Flash note: write the contents including .disk/ onto
# an ext2 formatted drive with "altinst" filesystem label

default=$default
timeout=3
EOF

for i in live altinst rescue; do
	[ -f "$i" ] || continue

	if [ "$i" = "altinst" ]; then
		label=install
		stage2=
	else
		label="$i"
		stage2="stagename=$i"
	fi

	cat >> boot.conf << EOF

label=$label
    partition=0
36
    image=/boot/image
37
    cmdline=console=ttyS0,115200 console=tty0 hardreset fastboot live automatic=method:cdrom ${stage2:+$stage2 }${GLOBAL_STAGE2_BOOTARGS:+$GLOBAL_STAGE2_BOOTARGS }${GLOBAL_BOOT_LANG:+lang=$GLOBAL_BOOT_LANG}
38
    initrd=/boot/full.cz
39 40 41

label=${label}_flash
    partition=0
42
    image=/boot/image
43
    cmdline=console=ttyS0,115200 console=tty0 hardreset fastboot live lowmem automatic=method:disk,label:altinst,directory:/ ${stage2:+$stage2 }${GLOBAL_STAGE2_BOOTARGS:+$GLOBAL_STAGE2_BOOTARGS }${GLOBAL_BOOT_LANG:+lang=$GLOBAL_BOOT_LANG}
44
    initrd=/boot/full.cz
45 46 47 48 49 50
EOF
done

ls -lh

echo "** 20-e2k-boot END"