Page 1 of 1

Bootable El-Torito Question

Posted: Sat Aug 08, 2009 12:41 pm
by jwh335
This is such a newb question, I know. Don't laugh :P

I was trying to make a bootable El-Torito cd with grub, but I need some feedback on whether or not I have the right kind of file for grub to boot to and if my menu.lst is correct.

In my isofiles directory, I have boot.img. It's a floppy image with my OS(ish) on it. It runs under qemu fine. Then I have boot/grub/ with the stage2_eltorito and menu.lst

menu.lst:

Code: Select all

default 0
#timeout 30
 
#title Boot from hard disk
#chainloader (hd0)+1
 
title My kernel
kernel ../../boot.img    # Edit it to the filename of your kernel.
When I burn this to a cd and boot, it goes to the grub command line. I'm not sure what I'm supposed to do there, or even if that is supposed to come up :/

[edit]I searched around for a while and couldn't find anything[/edit]

Re: Bootable El-Torito Question

Posted: Sat Aug 08, 2009 1:20 pm
by NickJohnson
I'm pretty sure that the path to the kernel image is an absolute one, and requires a disk name.

Re: Bootable El-Torito Question

Posted: Sat Aug 08, 2009 1:41 pm
by brickhead20
Yes, change the last line of menu.lst to:

kernel /kernel_file.bin

I think that should work.

I don't think you need the disk name. I believe it defaults to the CD anyway, if you are using the el torito grub image.

However, rather than using a floppy image, you should load the actual binary file. I'm not sure a floppy image would work.

Re: Bootable El-Torito Question

Posted: Sat Aug 08, 2009 2:01 pm
by jwh335
I've compiled the code into kernel.bin. I tried using both boot/kernel.bin and /kernel.bin. However, both still lead me into the grub command line.

[edit]Yes, that is correct that it defaults to CD[/edit]

Re: Bootable El-Torito Question

Posted: Sat Aug 08, 2009 2:02 pm
by alethiophile
Where is the kernel.bin file in the CD image directory? If it's in boot, then you want '/boot/kernel.bin' (note the preceding /).

Re: Bootable El-Torito Question

Posted: Sat Aug 08, 2009 2:08 pm
by jwh335
It's in root, so I assumed it should work with /kernel.bin.

The structure is as follows:

Code: Select all

CD
---Boot
------Grub
---------menu.lst
---------stage2_eltorito
---kernel.bin
[edit]Nevermind, it isn't running on qemu. It is giving me "FATAL: Not a bootable disk." When I figure this out, I will update the wiki with the solution. Thanks for helping :)[/edit]