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 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
# bootcd-i386.lib
# vim: set filetype=sh :
do_syslinux()
{
if [ "$SYSLINUX_SAVE" = "yes" ]; then
SYSLINUX_SAVE="-s"
elif [ "$SYSLINUX_SAVE" = "no" ]; then
SYSLINUX_SAVE=""
else
SYSLINUX_SAVE=""
warn 'SYSLINUX_SAVE is not defined as "yes" or "no".' \
'It will be treated as "no".'
fi
# Build cdboot.img
# do not use /usr/lib/syslinux/img1440k.gz, to be able to use other
# syslinux options
ignore "^1440+0 records"
run dd bs=1024 count=1440 if=/dev/zero of=/$CHANGES/cdboot.img
ignore "^mkfs.vfat" # mkfs.vfat 2.8 (28 Feb 2001)
run mkfs -t vfat /$CHANGES/cdboot.img
run syslinux $SYSLINUX_SAVE /$CHANGES/cdboot.img
run mount -o loop /$CHANGES/cdboot.img $VAR/mnt -t msdos
run cp $KERNEL $VAR/mnt/vmlinuz.img
run cp $CONFDIR/syslinux.cfg $VAR/mnt/syslinux.cfg
cat <<END >>$VAR/mnt/syslinux.cfg
label linux
kernel vmlinuz.img
append root=$CDDEV1 ramdisk_size=$RAMDISK_SIZE $APPEND
END
for i in $CDDEVR; do
echo "label $(basename $i)"
echo " kernel vmlinuz.img"
echo " append root=$i ramdisk_size=$RAMDISK_SIZE $APPEND"
done >>$VAR/mnt/syslinux.cfg
if [ "$DISPLAY" ]; then
cat <<END >>$VAR/mnt/syslinux.cfg
display display.txt
END
run cp $DISPLAY $VAR/mnt/display.txt
fi
run umount $VAR/mnt
losetup -d /dev/loop0 2>/dev/null
}
|