Here is the solution, that worked for me to make bootable GRUB CD for Debian 3.1 server with 2.4 kernel having IDE CD-RW ( Dell PowerEdge 2800 3.6 MHZ). This is useful for booting up your system, in case of emergency. Thanks everyone for input especially Mike McCarty.
Making bootable GRUB CD-ROM on Debian 3.1 Server with 2.4 kernel having IDE CD RW :
Bootable CD:
· Due to the nature of CDs, you can’t use the dd command to write stage1 and stage2 onto a CD as is the case for making GRUB boot floppy
· You must use a special stage 2 file called stage2_eltorito which can be found in /lib/grub/i386-pc (it may be in /usr/share/grub/i386-pc; it all depends on your distro)
NOTE: the following steps were done at /tmp
· First, make a directory called iso (in our case, we made it in the /tmp directory) and also make a directory for grub (mkdir -p iso/boot/grub)
· Do cp /lib/grub/i386-pc/stage2_eltorito iso/boot/grub to copy the file
· Execute mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot \
-boot-load-size 4 -boot-info table -o grub.iso iso to create an ISO9660 image called grub.iso (which will now be in /tmp)
NOTE: you should not be in the iso directory (but rather, the /tmp directory) when running this command as you give get an error telling you that iso could not be found
· For more details on the options, see the manpage for mkisofs; some of the more important options are -b boot/grub/stage2_eltorito […] iso where boot/grub_stage2_eltorito is the relative path to the file from iso; -boot-load-size 4 is required for compatibility with the BIOS of many older machines; -o grub.iso specifies the output filename
· Simply burn the iso image onto a CD ( our is IDE CD RW); cdrecord -v speed=4 dev=ATAPI:0,0,0 grub.iso, and you should be able to boot from it (remember to have your CD-ROM as a earlier boot device than your HDD)
At the GRUB Prompt:
· Reboot the system from the above made CD and it should bring you to the GRUB prompt (grub>) at which point you enter the lines from your menu.lst above which are bolded in the order that they appear; if you reach the boot step and you have not received any errors, then you should be ok
· For our server, the commands were the following:
grub> root (hd0,0)
grub> kernel /boot/vmlinuz-2.4.27-2-686-smp root=/dev/sda1 ro
grub> initrd /boot/initrd.img-2.4.27-2-686-smp
grub> boot
Balbir Pabla