GRUB boot floppy
Steve Furbish
sfurbish at nerdshack.com
Mon Jun 4 14:54:00 UTC 2007
Cedric wrote:
> I've made an article about it recently, it will create a boot floppy from your
> current working config. I'm planning to put it onto my website, so feedback
> is very welcome. The html version is available on request.
> Regards,
> Cedric.
> "
>
> you are here:/Website/Linux/Software/Distributions/Kubuntu/boot_floppy/
> Creating a GRUB bootable floppy
> When you install windows on a PC that already has linux installed, the windows
> installer will in some cases overwrite the bootloader. This bootfloppy can be
> used to boot your linux installation, and can also be used to reinstall GRUB
> To create this floppy you need the following:
> -A PC with a floppydrive.
> -A floppy disk.
> -A working linux installation with the GRUB boot loader. I have tested the
> below procedure with Kubuntu 7.04
> Procedure:
> 1)Check the floppydisk for defects:
> # badblocks -v /dev/fd0
>
> Controleren van blokken 0 tot 1439
> Zoeken naar slechte blokken (alleen-lezen-test): done
> Doorloop voltooid, 0 slechte blokken gevonden.
> 2)Create the filesystem on the floppy. I recommend vfat, as it's accessable
> from both linux and windows:
> # mkfs.vfat /dev/fd0
> 3)Mount the newly created floppy, and copy the grub components to it:
> # mount /dev/fd0 /media/floppy0
> # cd /media/floppy0
> # mkdir -p boot/grub
> # cd boot/grub/
> # cp /boot/grub/* .
> 4)Use grub to write the bootblock on the floppy, this will make the floppy
> bootable:
> # grub
> GRUB version 0.93 (640K lower / 3072K upper memory)
>
> [ Minimal BASH-like line editing is supported. For the first word, TAB
> lists possible command completions. Anywhere else TAB lists the possible
> completions of a device/filename. ]
>
> grub> root (fd0)
> Filesystem type is vfat, using whole disk
>
> grub> setup (fd0)
> Checking if "/boot/grub/stage1" exists... yes
> Checking if "/boot/grub/stage2" exists... yes
> Checking if "/boot/grub/e2fs_stage1_5" exists... no
> Running "install /boot/grub/stage1 (fd0) /boot/grub/stage2 p
> /boot/grub/menu.lst "... succeeded
> Done.
>
> grub> quit
>
> Now the floppy can be used to boot your PC when the bootblock is damaged or
> overwritten.
> last update: may 2007
> "
>
This worked perfectly on my PC with the only needed change being to
change the mountpoint of the floppy from your "/media/floppy0" to
"/media/disk". I've had to restore GRUB from the live CD before and a
boot floppy with a copy of my own GRUB seems like a pretty good idea as
long as I remember to update it each time a new kernel is released.
More information about the ubuntu-users
mailing list