Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Persistent block naming and grub...
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
chenko
n00b
n00b


Joined: 17 Dec 2003
Posts: 31

PostPosted: Wed Feb 09, 2011 8:20 pm    Post subject: Persistent block naming and grub... Reply with quote

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
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Wed Feb 09, 2011 10:05 pm    Post subject: Reply with quote

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
View user's profile Send private message
chenko
n00b
n00b


Joined: 17 Dec 2003
Posts: 31

PostPosted: Thu Feb 10, 2011 10:44 am    Post subject: Reply with quote

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
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Thu Feb 10, 2011 3:30 pm    Post subject: Reply with quote

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
View user's profile Send private message
chenko
n00b
n00b


Joined: 17 Dec 2003
Posts: 31

PostPosted: Mon Feb 14, 2011 9:27 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum