GRUB Legacy
You may write information about GRUB Legacy here.
GRUB Legacy is the current invocation of the GRand Unified Bootloader - the stable version, no longer under active development. It is a fully-featured bootloader, and has a large user and support community out there.
GRUB 2, still pre-release - will contain many new features.
The maintenance of GRUB Legacy
GrubLegacyPatchSubmission: our policy about submitting patches for bugfixes and new features for GRUB Legacy
If you write, or want to write code for GRUB Legacy, you may find the article "Hacking Grub for fun and profit" from Phrack Volume 0x0b, Issue 0x3f useful. Here's link: http://www.phrack.org/archives/63/p63-0x0a_Hacking_Grub.txt
Chainloading a bootable CD from Grub
This is possible by using memdisk from the Sys/Isolinux project and an image of a bootable floppy of the (orphaned) SBM smart boot manager project.
More information can be found here: http://www.lrz.de/~bernhard/grub-chain-cd.html
Creating a bootable floppy
The standard way to create a bootable floppy described in the Grub manual creates a floppy without a file system and no menu. For your convenience, I repeat the steps here:
Put stage1 and stage2 to some place, where you can access them later. Take a floppy and write stage1 immediately followed by stage2 on the first sectors of that floppy:
# dd if=stage1 of=/dev/fd0 bs=512 count=1 # dd if=stage2 of=/dev/fd0 bs=512 seek=1
If you want to have a formatted floppy, i.e. a bootable one with a file system, you can create one by preparing the following floppy (you can use the plain Grub Floppy without a file system and discard it later):
Download the current version of grub (legacy) from ftp://alpha.gnu.org/gnu/grub/grub-0.97-i386-pc.tar.gz (0.97 is the current version of Grub legacy on 3-Dec-2007, but that might change in the future).
Unpack grub-0.97-i386-pc.tar.gz and put ist contents on a formatted floppy (the type of the file system is at your choice, it can be e.g. ext2 or VFAT). This floppy should now contain a directory tree with with several files in /boot/grub/.
Now, you have to boot into a working Grub. One would be the plain Grub floppy mentioned above, two other possibilities which pop up in my mind are:
1. Download a CD-image from Kanotix, burn a CD
2. Caldera installation CD (ooh, now Caldera metamorphed to SCO and they are sueing against linux ..)
other systems also use Grub in their installation. In most cases, when booting from CD or from a Grub installed on a hard disk, you should hit ESC to leave Grub's menu and enter Grub's command line mode.
You also can boot the Grub floppy without file system created as described in the Grub manual or above puts you directly into Grub command line mode.
Now the important step: put in the floppy with grub in a file system (swap flopies if you booted from floppy, i.e. pull out the floppy without the file system and exchange it with the floppy with the FAT file system and grub files on it) and tell grub
root (fd0) setup (fd0)
now Grub should setup the floppy with the file system correctly.
You can leave the floppy in the PC and reboot for a test or you can tell Grub to load the boot sector from the floppy and boot it interactively
chainload (fd0)+1 boot
GRUB for Linux
Linux Distros
Troubleshooting
Grub hangs at Stage1.5 or Stage2
After bios POST, you see:
Grub loading Stage1.5 Grub loading, please wait...
And then grub hangs up indefinetely. Also, you may see this message followed by a hang up.
Loading stage2 ....
This may happen due to corrupt files in /boot/grub directory. You can use a rescue CD to boot, and then chroot to the root partition with /boot mounted. Move all the files except menu.lst and grub.conf out of /boot/grub. Then run grub-install on the drive. This should repopulate the /boot/grub folder with the appropriate files.
The following example assumes you have your root partition on /dev/hda1, and /boot on /dev/hda2. And grub will be installed on the MBR of /dev/hda.
mount /dev/hda1 /mnt/sysimage mount /dev/hda2 /mnt/sysimage/boot chroot /mnt/sysimage mv /boot/grub /boot/grub.old mkdir /boot/grub cp /boot/grub/menu.lst /boot/grub cp /boot/grub/grub.conf /boot/grub grub-install /dev/hda
Eltorito bootable CD drops into GRUB shell
If you followed the GrubBootableCDHowto, you may find your CD always booting into the grub shell. The right behaviour should be to drop into the menu if you specify one in menu.lst.
The problem might be from the way distributions changed their grub releases. Some like Fedora for instance, use grub.conf instead of menu.lst as the place to look for menu. Hence, you should put a grub.conf in the /boot/grub directory instead of menu.lst as described in the HOWTO.
Note: Symlinking grub.conf to menu.lst won't help, as GRUB doesn't understand symlinks on ISO9660 (CD filesystem).