3 # Formats a floppy to use Syslinux
8 # need to have mtools installed
9 if [ -z `which mformat` -o -z `which mcopy` ]; then
10 echo "You must have the mtools package installed to run this script"
15 # need an arg for the location of the kernel
17 echo "usage: `basename $0` path/to/linux/kernel"
22 # need to have a root file system built
23 if [ ! -f rootfs.gz ]; then
24 echo "You need to have a rootfs built first."
25 echo "Hit RETURN to make one now or Control-C to quit."
32 echo "Please insert a blank floppy in the drive and press RETURN to format"
33 echo "(WARNING: All data will be erased! Hit Control-C to abort)"
36 echo "Formatting the floppy..."
38 echo "Making it bootable with Syslinux..."
40 echo "Copying Syslinux configuration files..."
41 mcopy syslinux.cfg display.txt a:
42 echo "Copying root filesystem file..."
44 # XXX: maybe check for "no space on device" errors here
45 echo "Copying linux kernel..."
47 # XXX: maybe check for "no space on device" errors here too
48 echo "Finished: boot floppy created"