Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Specify grub root with uuid?
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
Philippe23
Tux's lil' helper
Tux's lil' helper


Joined: 20 Dec 2006
Posts: 130
Location: Central NY

PostPosted: Sun Apr 21, 2013 9:47 pm    Post subject: Specify grub root with uuid? Reply with quote

Grub disagrees with my kernel over drive ordering. I'd like to move both to UUIDs or Labels. I know how to do so with the kernel parameter, but I do not know how to do so with the grub root command:

title=Gentoo Linux (3.8.3) Custom Kernel (new-drive)
root (hd1,3)
kernel /boot/kernel-3.8.3-hardened root=/dev/sdb4

Anyone know how?
Back to top
View user's profile Send private message
Maitreya
Guru
Guru


Joined: 11 Jan 2006
Posts: 441

PostPosted: Mon Apr 22, 2013 11:59 am    Post subject: Reply with quote

IIRC grub 0.97 can do this with an initrd for normal partitions.

title=Gentoo Linux (3.8.3) Custom Kernel (new-drive)
kernel /boot/kernel-3.8.3-hardened realroot=SOME-RIDICULOUS-STRING-01234
initrd /boot/initramfs-3.8.3-hardened


And without for GPT partitions.

title=Gentoo Linux (3.8.3) Custom Kernel (new-drive)
kernel /boot/kernel-3.8.3-hardened root=PARTUUID=SOME-RIDICULOUS-STRING-01234
Back to top
View user's profile Send private message
Philippe23
Tux's lil' helper
Tux's lil' helper


Joined: 20 Dec 2006
Posts: 130
Location: Central NY

PostPosted: Mon Apr 22, 2013 12:47 pm    Post subject: Reply with quote

Yeah, that's the kernel options, an argument to the kernel that's resolved by the kernel. The part I don't know is how to change the bold+italic line in my post, the one that tells GRUB where to find kernel itself. "(hd1,3)" is the part I'd like to replace.
Back to top
View user's profile Send private message
s4e8
Guru
Guru


Joined: 29 Jul 2006
Posts: 311

PostPosted: Mon Apr 22, 2013 12:54 pm    Post subject: Reply with quote

If /boot/grub and /boot/ live on same partition, you don't need the bold+italic line.
Back to top
View user's profile Send private message
baragoon
n00b
n00b


Joined: 11 Feb 2013
Posts: 12

PostPosted: Thu Apr 25, 2013 9:51 am    Post subject: Reply with quote

use labels fo filesystems
Code:
# cat /media/GENTOO_USB_BOOT/grub/device.map
(hd0)   LABEL=GENTOO_USB_ROOT


Code:
# cat /media/GENTOO_USB_BOOT/grub/grub.conf

default 0
timeout 10
splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title Gentoo Linux 3.7.10
root (hd0,0)
kernel /boot/kernel-genkernel-x86_64-3.7.10-gentoo root=/dev/ram0 real_root=LABEL=GENTOO_USB_ROOT rootfstype=ext4 elevator=noop
initrd /boot/initramfs-genkernel-x86_64-3.7.10-gentoo
Back to top
View user's profile Send private message
py-ro
Veteran
Veteran


Joined: 24 Sep 2002
Posts: 1734
Location: Velbert

PostPosted: Thu Apr 25, 2013 11:57 am    Post subject: Reply with quote

Legacy Grub can't handle UUID for it self, you would need to upgrade to grub2.

Bye
Py
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