View previous topic :: View next topic |
Author |
Message |
chenko n00b
Joined: 17 Dec 2003 Posts: 31
|
Posted: Wed Feb 09, 2011 8:20 pm Post subject: Persistent block naming and grub... |
|
|
I've only just read into persistent block naming, but im not sure what to do for the grub.conf.
I understand I just put my by-label/ ref in the root= but what about "root (hd0,0)" ? |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Wed Feb 09, 2011 10:05 pm Post subject: |
|
|
root (hd0,0) determined by the bios and passed to grub, labels not involved
root=LABEL=yourlabel is a kernel argument and only becomes effective after the kernel is loaded _________________ Defund the FCC. |
|
Back to top |
|
|
chenko n00b
Joined: 17 Dec 2003 Posts: 31
|
Posted: Thu Feb 10, 2011 10:44 am Post subject: |
|
|
Are there any options then to boot a specific device as the hdX numbers change still dependant on what drives are loaded at the time... ? |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Thu Feb 10, 2011 3:30 pm Post subject: |
|
|
with most current BIOS:
If you connect a drive that has a boot loader in its MBR and enter BIOS and select that drive to boot first it will be designated hd0.
With such a BIOS and a grub.conf default menu item containing root (hd0) on each drive attached BIOS would boot the same drive until a different BIOS change was made. _________________ Defund the FCC. |
|
Back to top |
|
|
chenko n00b
Joined: 17 Dec 2003 Posts: 31
|
Posted: Mon Feb 14, 2011 9:27 am Post subject: |
|
|
Aye you're right - as I was booting from a "Live USB" device, my "boot drive" was changing hdX all the time and I forgot that it would stay as hd0 if booted from as you say.
Based on this I managed to use by-label and even use it in grub, although I had to use initramfs from genkernel very easy once figured out.
So for anyone searching that wants to do the same, this is what I did. Even though I am using my own kernel, I used genkernel to produce my initrd.
Code: |
emerge genkernel
genkernel ramdisk --disklabel
|
creates your new initramfs in your /boot/ (initramfs-genkernel-x86-2.6.36-gentoo-r5 for me)
This is my grub.conf...
Code: |
title Gentoo Linux 2.6.26-r5 LABEL
root (hd0,0)
kernel /boot/kernel-2.6.36-gentoo-r5 root=/dev/ram0 real_root=LABEL=STORAGE-ROOT rootwait bootparams quietscandelay=2
initrd /boot/initramfs-genkernel-x86-2.6.36-gentoo-r5
|
(rootwait bootparams quietscandelay=2 are for me to boot from USB) |
|
Back to top |
|
|
|