LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Grub bootable CD (https://www.linuxquestions.org/questions/linux-software-2/grub-bootable-cd-140074/)

logi 01-29-2004 03:12 PM

Grub bootable CD
 
Hello, I have been looking around searching and not found anything yet. I probably missed it, but I already can do a bootable lilo cd. But I can't find anything on how to make a bootable grub cd. Could someone either tell me or point me in the direction I need. I already looked at linux-live.org but not what I need. I wanted to make a bootable grub cd.

Is this possible

Thanks

logi

jtshaw 01-29-2004 03:33 PM

Grub Boot Floppy

Now that site tells you how to make a boot floppy, so instead of doing that to a floppy drive, do it to a file and use that file as a boot image to include when you do a mkisofs.

logi 01-29-2004 03:43 PM

Thanks for the help, but this seems to want to write to the first and second block of the floppy disk. Can't wirte this to a dir or file. Unless I am missing something here.

Thanks

Logi

jtshaw 01-29-2004 04:00 PM

oh, duh, good point:) What you need to do is build an image with those two files sandwiched together. I didnt' read the dd statements carefully enough.

homey 01-29-2004 04:59 PM

I found some place on the web with instructions on how to make a grub boot floppy. Can't remember where though. :(
Anywho, I used those notes and some notes on making a bootable cdrom from a Windows boot floppy I just used the grub floppy instead and it worked!! :)

Here are my notes.....

1. Creat the Grub boot floppy

This gives you the boot menu just like it was installed on the hard drive.

fdformat /dev/fd0
mke2fs –m 0 /dev/fd0
mount -t ext2 /dev/fd0 /mnt/floppy
mkdir -p /mnt/floppy/boot/grub
cp -pa /boot/grub/* /mnt/floppy/boot/grub
umount /mnt/floppy


Create a text file called /home/stuff and add these lines to that file
##
root (fd0)
#the following is all one line
install /boot/grub/stage1 d (fd0) (fd0)/boot/grub/stage2 0x8000 p (fd0)/boot/grub/menu.lst
#
quit


Install grub to the floppy disk with this command:

grep -v ^# /home/stuff | grub --batch


2. Create Grub Boot CD from that floppy

Make a directory and cd into that directory.

Copy the entire boot disk to a file
dd if=/dev/fd0 of=boot.img bs=10k count=144

Make the iso image with boot.img ( and boot.cat if you have one )
mkisofs -r -b boot.img -c boot.cat -o bootcd.iso .

Make the bootable cd
cdrecord -v speed=4 dev=0,0,0 -data bootcd.iso

andrewstr 04-04-2007 06:45 PM

Here are the official instructions to create a Grub CD:

http://www.gnu.org/software/grub/man...le-CD-ROM.html

noranthon 05-04-2008 02:48 AM

I tried following those instructions. There must be a trick to running the script in a particular location. I ran the following:

Code:

mkisofs -R -b ./boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o ./grub.iso iso
I got this error:

Quote:

Originally Posted by error
I: -input-charset not specified, using iso-8859-1 (detected in locale settings)
genisoimage: No such file or directory. Invalid node - 'iso'.


homey 05-04-2008 07:12 AM

If you want to make the iso image directly without making a floppy, you could try this...
Code:

cd /home
mkdir -p iso/boot/grub
cp /boot/grub/grub.conf /home/iso/boot/grub
cp /boot/grub/stage* /home/iso/boot/grub
cp /boot/grub/iso9660_stage1_5 /home/iso/boot/grub
mkisofs -R -b boot/grub/iso9660_stage1_5 -no-emul-boot \
-boot-load-size 4 -boot-info-table -o grub.iso iso


noranthon 05-04-2008 11:29 PM

I eventually succeeded after change the word 'iso' at the end to /mnt/iso I had put the iso directory in the mnt folder.


All times are GMT -5. The time now is 07:10 PM.