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