HOWTO burn GRUB and your kernel to CDR
-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 device.map so you have an extra cd entry and refer to your fstab file for its dev structure
mine looks like this
(cd) /dev/hda (my cdrom is on first ide controller jumpered as a master)
(hd0) /dev/sda ( I have a SATA)
##########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.
color black/cyan yellow/cyan
kernel /boot/vmlinuzb root=/dev/sda3 devfs=nomount acpi=ht
kernel /boot/vmlinuza root=/dev/sda3 devfs=nomount acpi=ht
##########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 CD....click on BURN CD IMAGE.... then navigate to iso image....click 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
you'll do a lot better to submit this as a LinuxAnswer http://www.linuxquestions.org/questions/answers.php
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.
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 picserver.org
4) change pic links from bochs to qemu
|All times are GMT -5. The time now is 10:15 AM.|