making cd image

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Meshounah
Member
Member
Posts: 38
Joined: Sun Jun 24, 2007 6:48 pm

making cd image

Post 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 :lol:
chik'n
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: making cd image

Post 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
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
paul
Posts: 21
Joined: Sun Dec 31, 2006 10:19 am

Post 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
Meshounah
Member
Member
Posts: 38
Joined: Sun Jun 24, 2007 6:48 pm

Post 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?
chik'n
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post by Combuster »

google for one of the following:

powerarchiver
winrar
cygwin
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Meshounah
Member
Member
Posts: 38
Joined: Sun Jun 24, 2007 6:48 pm

Post by Meshounah »

i have winrar but it won't let me extract it... :cry:
chik'n
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post by Combuster »

you're right, I remember it not working half of the time ](*,)

that still leaves two options though :wink:
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post 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
Meshounah
Member
Member
Posts: 38
Joined: Sun Jun 24, 2007 6:48 pm

Post by Meshounah »

ok another question how do i do it in cygwin don't i use the "dd" command?

but its not there :x
chik'n
frank
Member
Member
Posts: 729
Joined: Sat Dec 30, 2006 2:31 pm
Location: East Coast, USA

Post 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.
mohammed
Member
Member
Posts: 93
Joined: Mon Jan 30, 2006 12:00 am
Location: Mansoura, Egypt

Post 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
Meshounah
Member
Member
Posts: 38
Joined: Sun Jun 24, 2007 6:48 pm

Post by Meshounah »

winimage is not free... the "dd" command is not listed in cygwin download app
chik'n
User avatar
Alboin
Member
Member
Posts: 1466
Joined: Thu Jan 04, 2007 3:29 pm
Location: Noricum and Pannonia

Post 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.)
C8H10N4O2 | #446691 | Trust the nodes.
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Post by Candy »

Search for John Newbigin, he ported DD to windows.
frank
Member
Member
Posts: 729
Joined: Sat Dec 30, 2006 2:31 pm
Location: East Coast, USA

Post by frank »

Do you have cygutils installed? I think it might be in that one.
Post Reply