Sunday, April 13, 2008

How to Boot a Floppy Image Using the Grub Bootloader

How to Boot a Floppy Image Using the Grub Bootloader

Say you want/need to boot your computer from a floppy, but your computer has no floppy drive. You can boot your computer from a floppy disk image if you have the GRUB bootloader installed (found on many Linux distributions).

Steps
Install the syslinux package on your system. Instructions vary by distro. For a Debian/Ubuntu/MEPIS system, for instance, you would either choose it from Synaptic, or from the command line with "apt-get install syslinux".
Copy the memdisk file from /usr/lib/syslinux to the /boot directory.
Copy the floppy disk image (ie. image.img) to the /boot directory.
Add an entry to /boot/grub/menu.lst that looks like:

title My Floppy Disk
root (hd0,0)
kernel /boot/memdisk
initrd /boot/image.img

Run update-grub
Reboot

Tips
It is not really necessary to copy the floppy image and the memdisk kernel to the boot directory (but it makes things a lot easier to remember).
The floppy image will be read-only; all changes will be lost when the computer is rebooted. It might be handy to create a small partition on your hard drive that the operating system can write to.

No comments: