fdformat /dev/fd0 # formatting the floppy mkfs.ext2 /dev/fd0 # make file system mount -t auto /dev/fd0 /floppy/ # mount the floppy mkdir /floppy/etc /floppy/boot # create the directories which we need cp /boot/boot.* /floppy/boot/ # copy the available boot sectors cp /boot/map /floppy/boot/ # copy the map file cp /vmlinuz /floppy/boot/ # copy the kernel image export THISROOT=`grep root= /etc/lilo.conf|head -1|cut -d= -f2-` # determine the current root file system echo vga=791 > /floppy/etc/lilo.conf # specifies the vga mode echo lba32 >> /floppy/etc/lilo.conf # supports large hard disks echo boot=/dev/fd0 >> /floppy/etc/lilo.conf # location of the boot block echo root=$THISROOT >> /floppy/etc/lilo.conf # specification of the root file system echo install=/boot/boot-menu.b >> /floppy/etc/lilo.conf # echo map=/boot/map >> /floppy/etc/lilo.conf # location of the map file echo delay=20 >> /floppy/etc/lilo.conf # wait two seconds before booting the default image echo prompt >> /floppy/etc/lilo.conf # wait until the user selects an image echo timeout=150 >> /floppy/etc/lilo.conf # or use the default image after 15 seconds echo default=Linux >> /floppy/etc/lilo.conf # linux is the default echo image=/floppy/boot/vmlinuz >> /floppy/etc/lilo.conf # location of the kernel image echo label=Linux >> /floppy/etc/lilo.conf # label for this image echo read-only >> /floppy/etc/lilo.conf # read-only during initialization lilo -C /floppy/etc/lilo.conf # configure the floppy umount /floppy/ # unmount the floppy