Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - General > Member Success Stories
User Name
Password Member Success Stories Just spent four hours configuring your favorite program? Just figured out a Linux problem that has been stumping you for months?
Post your Linux Success Stories here.


  Search this Thread
Old 01-02-2005, 11:53 PM   #1
LQ Addict
Registered: Oct 2003
Location: Australia
Distribution: MX 16
Posts: 5,266

Rep: Reputation: Disabled
HOWTO burn GRUB and your kernel to CDR

Please note
-assume you try this at your own risk, you know how to use grub editor if things not right
& assume you know how to use 'su' mode to simplify file permissions on copying
-assume you know how to change bios boot order to cdrom b4 all others
-assume you know how to burn an iso image, -Where I type $ command you type the command and press enter (in a terminal)

TIP instead of typing those commands you can, in KDE, copy the command and then in KONSOLE click on the pulldown menu called EDIT then click on paste.....beautiful.

1) Create a directory /home/yourname/iso-files/
2) Copy entire /boot folder to /home/yourname/iso-files/
(Note if you are not using su mode you may have to check your powers to edit)

3) Tidy up the new /boot folder by renaming and deleting some files so it looks like this
PARENT FOLDER /iso-files
/boot/vmlinuza (make sure you rename the real file and not the symbolic link file.....delete the symbolic file)
/boot/initrda.img (if you need one)
/boot/grub/all stage1 and stage1.5 and stage 2 files

new kernel and any related initrd files and rename them cunningly as vmlinuzb etc

4) Edit so you have an extra cd entry and refer to your fstab file for its dev structure
mine looks like this
#########file starts
(cd) /dev/hda (my cdrom is on first ide controller jumpered as a master)
(hd0) /dev/sda ( I have a SATA)
(fd0) /dev/fd0
##########end of file

5) Edit menu.lst file according to your fstab structure. Check if you need the structure of /boot/vmlinuz or /boot/bzImage and change to suit the guilty.
Since this is a emergency boot disk....mbr is stuffed, we have no fancy graphics here.
Mdk 10.1 users note that you need the /boot structure other modern distros choose this option for your first burn and you can use grub editor to see what your true option is if I am wrong. Since this is a boot disk no splashimage used to increase stability.

#########file starts
timeout 10
color black/cyan yellow/cyan
default 0
fallback 1

title 269
root (cd)
kernel /boot/vmlinuzb root=/dev/sda3 devfs=nomount acpi=ht

title Mdk
root (cd)
kernel /boot/vmlinuza root=/dev/sda3 devfs=nomount acpi=ht
initrd /boot/initrda.img

title MS
rootnoverify (hd0,0)
chainloader +1

##########end of file

6) open a terminal and create the ISO
$ cd /home/yourname

### the next line is written continuously press enter only after last character###########
$ mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o grub.iso iso-files

### end of one line command

TIP use the tab to autocomplete your stage2 file if you installed bash completion
KEEP THE TERMINAL OPEN we have more to do later.

a) Burning is new to me so I can't explain see the reference links
b) But compared to normal iso images of folders you specify a lower down file which apparently the mkfs command recognises needs a boot catalogue file
C) You may notice that the image includes the folder iso-files so will keep that directory structure.
D) I got an error in specifying the full path to the eltorito file so try above before trying full paths please.
E) And "iso-files" the last bit is the FOLDER and has no folder pathway ie don't add any /
F) The Grub manual says you don't need all those stage files except eltorito but we may as well have them there......plenty of room on the cdr

7) Now check that a file called grub.iso exists in your folder.
In Konqueror it shows iso9660 image file.

8) Now check it will burn correctly by mounting the image in a loopfs
create a directory called /home/yourname/iso-loop
$ mount -t iso9660 -o ro,loop=/dev/loop0 grub.iso /home/yourname/iso-loop/

Now enter that loop folder and check you have exactly the same structure as planned in ISO-FILES but with an extra file not in the /boot subfolder like this

4) Now burn it with your fav burner.....if you are reading this try k3b.
I use k3b in gui mode
---click on pull down TOOLS... click on on BURN CD IMAGE.... then navigate to iso ok and start

Links to pix

menu countdown of a cdr showing 3 menu options as above

menu timer stopped by pressing arrow down key

pressing E for edit at first screen to show the commands for one menu item

not forgetting the critical bit that I use the root relative way of telling grub where my /boot booting files are (rather than the absolute way)

1) Grub manual
2) My howto on other stuff .....of course
3) Lovely article on using loop and other stuff by Carla Schroder

Last edited by aus9; 03-25-2006 at 07:07 AM.
Old 01-03-2005, 07:08 AM   #2
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975
you'll do a lot better to submit this as a LinuxAnswer
Old 01-03-2005, 08:46 AM   #3
LQ Addict
Registered: Oct 2003
Location: Australia
Distribution: MX 16
Posts: 5,266

Original Poster
Rep: Reputation: Disabled

Yes you are right I would get a higher post count, but I would then have trouble with my edits. I have done some 20 odd major edits of the main grub howto and that is a workload and delay for mods (and for my impatient self) if I was forced to submit changes as a Answer.

Also in another thread it was discussed that an answer should really be complete whereas I always tinker to improve etc. Altho I don't edit all my posts I certainly will be editing this one and the other main one. So its not an answer. Its a doorway to alternative answers.

So, if people do not search on LQ or google for
"grub and howto" they won't find my post. I can live with that.

Maybe its time to start on grub2??

Happy new year.
Old 01-05-2005, 06:45 AM   #4
LQ Addict
Registered: Oct 2003
Location: Australia
Distribution: MX 16
Posts: 5,266

Original Poster
Rep: Reputation: Disabled

1) put a little colour in it
2) add the tip for newbies of cut and paste
3) add some links to some pix size 512 at
4) change pic links from bochs to qemu

Last edited by aus9; 03-25-2006 at 07:02 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
What package is responsible for auto-mounting cdrom and opening Burn window for CDR? Arodef Fedora 4 08-22-2004 01:14 PM
Noncryptic howto burn an iso in linux pleez vdogvictor Linux - General 6 04-08-2004 04:08 PM
howto burn svcd/vcd's on a dvdr and play them via mplayer? dav0r Linux - Software 3 12-24-2003 07:13 AM
How to burn a bootable CDR for linux ? futurist Linux - Software 4 07-09-2003 10:15 PM
Burn .iso image to Network CDR rustanla Linux - General 0 02-18-2002 05:27 PM > Forums > Linux Forums > Linux - General > Member Success Stories

All times are GMT -5. The time now is 08:21 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration