Scientific Linux Forum.org



  Reply to this topicStart new topicStart Poll

> Make bootable rescue CD-RW - How ?
U308
 Posted: Sep 20 2011, 02:45 PM
Quote Post


SLF Advocate
*****

Group: Members
Posts: 484
Member No.: 32
Joined: 11-April 11









It's easy in Ubuntu, in fact I can boot SL 6.1 on a second hdd of the same PC without any problems using the rescue cd I made for Ubuntu which resides on the first hdd.

However I would like to know how to make such a bootable rescue cd from within SL 6.1 (utilizing eltorito stage 2 and menu.lst or grub.conf and making an iso for burning to cd-rw).

Any ideas/pointers on how to achieve this ?


PM
^
U308
 Posted: Sep 21 2011, 12:56 PM
Quote Post


SLF Advocate
*****

Group: Members
Posts: 484
Member No.: 32
Joined: 11-April 11









I was thinking of something like this, but am not sure whether it is enough to only copy the menu.lst file to the iso as it is soft linked to grub.conf.
The cd-rw I made is bootable and gives me a grub prompt, but what is the right way to boot from there ?

Uses the GRUB files "menu.lst" and "stage2_eltorito".

mkdir -p iso/boot/grub
cp /usr/share/grub/x86_64-redhat/stage2_eltorito iso/boot/grub
su -c "cp /boot/grub/menu.lst iso/boot/grub"
su -c "mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o grub.iso iso"
This last command generates a file grub.iso which can burned to CD or DVD.

I suppose I would need to replace initrd.img (below) with initramfs-2.6.32-131.12.1.el6.x86_64.img ? There are no initrd.img files in the boot folder.

root (hd1,5)
kernel /boot/vmlinuz-2.6.32-131.12.1.el6.x86_64 root=/dev/sdb6
initrd /boot/initrd.img-2.6.32-131.12.1.el6.x86_64
boot

OK - this works fine, just change for your system (grub> find /boot/grub/stage1)

root (hd1,5)
kernel /boot/vmlinuz-2.6.32-131.12.1.el6.x86_64 root=/dev/sdb6
initrd /boot/initramfs-2.6.32-131.12.1.el6.x86_64.img
boot
PM
^
U308
 Posted: Apr 8 2012, 02:20 PM
Quote Post


SLF Advocate
*****

Group: Members
Posts: 484
Member No.: 32
Joined: 11-April 11









Anyway to get it to boot from uuid so that one doesn't have to make a new disc after kernel updates ? (after 3 kernel updates - I obviously can't boot any of them from grub because the menu.lst used to make the cd will no longer be valid).
PM
^
AndrewSerk
 Posted: Apr 8 2012, 04:21 PM
Quote Post


SLF Moderator
*****

Group: Moderators
Posts: 480
Member No.: 54
Joined: 14-April 11









Hi U308,

I think this is what you are looking for?
You could use "blkid" to get the UUIDs and use "root=UUID=xxxxxxx-xxxxx........"


Hope this helps,

EDIT: Maybe a chainloader would work better??

This post has been edited by AndrewSerk: Apr 8 2012, 04:22 PM
PM
^
U308
 Posted: Apr 8 2012, 04:52 PM
Quote Post


SLF Advocate
*****

Group: Members
Posts: 484
Member No.: 32
Joined: 11-April 11









QUOTE (AndrewSerk @ Apr 8 2012, 06:21 PM)
Hi U308,

I think this is what you are looking for?
You could use "blkid" to get the UUIDs and use "root=UUID=xxxxxxx-xxxxx........"


Hope this helps,

EDIT: Maybe a chainloader would work better??

I mean to change the menu.lst that I include in the rescue iso. For instance all references to the kernel no. and boot would need to be removed as well (in red). Maybe the root (hd1,4) can be replaced with UUID=253aa607-14da-439a-8421-9ebb90073eb4
I think I am talking rubbish here. will just stick to the original method of making a grub rescue cd. Not to worry. smile.gif

title Scientific Linux (2.6.32-220.7.1.el6.x86_64)
root (hd1,4)
kernel /boot/vmlinuz-2.6.32-220.7.1.el6.x86_64 ro vga=31b root=UUID=253aa607-14da-439a-8421-9ebb90073eb4 rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us rhgb quiet crashkernel=auto nouveau.modeset=0 rdblacklist=nouveau
initrd /boot/initramfs-2.6.32-220.7.1.el6.x86_64.img

Off topic: I have been, and still am, booting SL6x from Ubuntu 10,04 LTS which has grub2
as follows:-
In /etc/grub.d 40_custom added:

echo "Adding 40_custom menu entries." >&2
(added after the first line - "#!/bin/bash" - and before the "exec tail -n +3 $0" line.)

cat << EOF
menuentry "Kubuntu 11.10 Symlink Boot" {
linux (hd1,1)/vmlinuz root=UUID=1b137050-b1e0-41ae-b018-07b0ea9177d4 ro quiet splash
initrd (hd1,1)/initrd.img
}
EOF

cat << EOF
menuentry "Scientific linux 6.2" {
set root=(hd1,5)
chainloader +1
}
EOF

Regards
PM
^
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll