Page 1 of 2
making cd image
Posted: Sun Sep 02, 2007 1:43 pm
by Meshounah
i have my little kernel but my question is... how can i put grub on a CD along with my kernel?
on the other hand... is it possible for grub to network boot a kernel from my dev machine?
I'd also like to thank Candy, frank, Alboin, AJ, JamesM, Combuster, and everyone else who helped me with my cross-compiler problems
Re: making cd image
Posted: Sun Sep 02, 2007 3:12 pm
by Combuster
Meshounah wrote:i have my little kernel but my question is... how can i put grub on a CD along with my kernel?
If you have a working floppy image with grub and kernel, you can use El Torito emulation to build the corresponding
Bootable CD
Grub can be installed natively to CD as well. IIRC a quick howto is in their documentation.
Grub seems to support network booting as well but its tricky. Google revealed
a promising document
Posted: Sun Sep 02, 2007 4:17 pm
by paul
To make a bootable CD using grub, just make a directory (mines called iso) which holds what you want on the cd. You must have a boot/grub directory within this iso directory, which contains a menu.lst and the file stage2_eltorito from grub (it's somewhere on the hard drive with most linux distros).
Then run the following command from the parent of the iso directory:
Code: Select all
mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o mycd.iso iso
This will produce a file named mycd.iso which should be bootable.
If you're using windows, I have no idea
Edit:
Looks like mkisofs is available for windows too:
http://smithii.com/cdrtools
Posted: Mon Sep 03, 2007 12:12 pm
by Meshounah
ok for simplicity sake i'm going to do what combuster said... i downloaded a grub floppy image that i found on the wiki but how do i extract it?
Posted: Mon Sep 03, 2007 3:42 pm
by Combuster
google for one of the following:
powerarchiver
winrar
cygwin
Posted: Wed Sep 05, 2007 8:27 pm
by Meshounah
i have winrar but it won't let me extract it...
Posted: Thu Sep 06, 2007 12:15 am
by Combuster
you're right, I remember it not working half of the time
that still leaves two options though
Posted: Thu Sep 06, 2007 1:54 am
by JamesM
GRUB's netboot is not tricky in the slightest.
Make sure your dev machine has atftpd (trivial FTP daemon) installed.
Code: Select all
/sbin/atftpd --daemon /path/to/dev/directory
Then when grub boots on your test machine, type 'c' for a console and:
Code: Select all
dhcp (get an ip address)
tftpserver 192.my.server.ip
kernel (nd)/kernel.bin (assuming kernel.bin is your kernel, in your dev dir)
module (nd)/initrd.bin (I would do this, depends if you have any modules to load)
boot
Dead easy. There are guides on the internet about it. You can put all those commands into your menu.lst and let it do it automagically.
JamesM
Posted: Sat Sep 29, 2007 2:08 pm
by Meshounah
ok another question how do i do it in cygwin don't i use the "dd" command?
but its not there
Posted: Sun Sep 30, 2007 3:02 pm
by frank
It should be there somewhere. It may not be a part of the default install however. You may have to look for it in the package list.
Posted: Wed Oct 03, 2007 6:00 am
by mohammed
Meshounah wrote:ok for simplicity sake i'm going to do what combuster said... i downloaded a grub floppy image that i found on the wiki but how do i extract it?
WinImage is a great program that allow you to extract and modify the img files and it's working under windows
Posted: Sat Oct 06, 2007 12:39 pm
by Meshounah
winimage is not free... the "dd" command is not listed in cygwin download app
Posted: Sat Oct 06, 2007 3:47 pm
by Alboin
Meshounah wrote:winimage is not free... the "dd" command is not listed in cygwin download app
I always used
Rawwrite when I was working in Windows. (He also appears to have a win version of dd on his site as well.)
Posted: Sat Oct 06, 2007 4:00 pm
by Candy
Search for John Newbigin, he ported DD to windows.
Posted: Sat Oct 06, 2007 4:05 pm
by frank
Do you have cygutils installed? I think it might be in that one.