View previous topic :: View next topic |
Author |
Message |
Philippe23 Tux's lil' helper
Joined: 20 Dec 2006 Posts: 130 Location: Central NY
|
Posted: Sun Apr 21, 2013 9:47 pm Post subject: Specify grub root with uuid? |
|
|
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 |
|
|
Maitreya Guru
Joined: 11 Jan 2006 Posts: 441
|
Posted: Mon Apr 22, 2013 11:59 am Post subject: |
|
|
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 |
|
|
Philippe23 Tux's lil' helper
Joined: 20 Dec 2006 Posts: 130 Location: Central NY
|
Posted: Mon Apr 22, 2013 12:47 pm Post subject: |
|
|
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 |
|
|
s4e8 Guru
Joined: 29 Jul 2006 Posts: 311
|
Posted: Mon Apr 22, 2013 12:54 pm Post subject: |
|
|
If /boot/grub and /boot/ live on same partition, you don't need the bold+italic line. |
|
Back to top |
|
|
baragoon n00b
Joined: 11 Feb 2013 Posts: 12
|
Posted: Thu Apr 25, 2013 9:51 am Post subject: |
|
|
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 |
|
|
py-ro Veteran
Joined: 24 Sep 2002 Posts: 1734 Location: Velbert
|
Posted: Thu Apr 25, 2013 11:57 am Post subject: |
|
|
Legacy Grub can't handle UUID for it self, you would need to upgrade to grub2.
Bye
Py |
|
Back to top |
|
|
|