Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
GRUB can't find disk - labeled nor dev/sda3
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
oniichan
n00b
n00b


Joined: 15 Jun 2012
Posts: 27

PostPosted: Fri Jun 15, 2012 5:04 pm    Post subject: GRUB can't find disk - labeled nor dev/sda3 Reply with quote

Hi.
I have a "small" problem.
I've spent a couple of hours installing Gentoo, and I like it so far. The reason for my install is to larn more about kernels.
I have a "working" install as we speak. (very barebone)
I have 3 physical disks: One 40 gig (for Gentoo), One 500 gig (windows install+storage) and one SSD (windows OS).
I installed Gentoo with everything except the 40 gig plugged in. With three partitions (1:boot 2:swap 3:root) they got the name /dev/sda1/2/3. Not hda as expected?
Anyhow, the OS boots up just fine with only the 40gb plugged in, but when I plug in the other two drives it gives me "!! Block device /dev/disk/by-label/ROOT is not a valid root device..." after grub.
So I began looking in to it. I want to be able to boot off the drive without having to unplug the others!

As I understood, I was supposed to label the discs and refer to them as labeled in the grub config file.
I used "e2label /dev/sda3 ROOT" and "e2label /dev/sda1 BOOT" and in the grub.conf I said it to look for real_root at /dev/disk/by-label/ROOT.
The disk is there, tried mounting and going there to dir it, and it is there.
So how come GRUB doesn't find it?
Thank you very much,
0
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1576
Location: US

PostPosted: Fri Jun 15, 2012 6:04 pm    Post subject: Reply with quote

oniichan,

Welcome to gentoo :D

Is it possible to paste back your menu.lst or grub.cgf (whatever the boot menu file is) :?:

And also your /etc/fstab file and the output of blkid - have all the disks plugged in for blkid

Doing it from a chroot is fine :wink:
_________________
Good luck :wink:

Since installing gentoo, my life has become one long emerge :)
Back to top
View user's profile Send private message
oniichan
n00b
n00b


Joined: 15 Jun 2012
Posts: 27

PostPosted: Fri Jun 15, 2012 6:45 pm    Post subject: Reply with quote

Sure!

/boot/grub/grub.conf
Code:

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

#this is the working boot, but only when 1 HDD is plugged in
title Gentoo Linux (working)
root (hd0,0)
kernel /boot/kernel-genkernel-x86_64-3.2.12-gentoo real_root=/dev/sda3
initrd /boot/initramfs-genkernel-x86_64-3.2.12-gentoo

#this is something I tested
title Gentoo Linux Test
root (hd0,0)
kernel /boot/kernel-genkernel-x86_64-3.2.12-gentoo real_root=/dev/disk/by-label/ROOT
initrd /boot/initramfs-genkernel-x86_64-3.2.12-gentoo



And yes, I labeled /dev/sda3 ROOT with "e2label /dev/XXX <label>" , in this case /dev/sda3 ROOT

My fstab:

Code:

/dev/sda1 /boot ext3 noauto,noatime 1 2
/dev/sda3 / ext3 noatime 0 1
/dev/sda2 none swap sw 0 0


Can't do blkid just yet, I have some problems getting my mobo to detect the optical drive... :(

EDIT: Optical drive detected, still problems getting the chroot to work.
I am in the livecd, trying to mount /dev/sda3 (root) to /mnt/gentoo, but the special device /dev/sda3 doesn't exist now all of a sudden.

EDIT again: /dev/sda3 stops existing when the other drives are plugged in. Right now I'm in the live CD, and I can mount /dev/sda3 to /mnt/gentoo.
But when the other drives are plugged in the /dev/sda3 doesn't exist and cannot be mounted!?!?!
Someone explain, I'm about to go all mad right now.
Back to top
View user's profile Send private message
eccerr0r
Advocate
Advocate


Joined: 01 Jul 2004
Posts: 3001
Location: USA

PostPosted: Fri Jun 15, 2012 7:29 pm    Post subject: Reply with quote

I don't think /dev/ is fully populated by busybox mdev so hence the udev full path won't work.
The usual way to specify by label using the typical initrd is

root=LABEL=your-label

Looks a little funny but it works...
_________________
Core-i7-2700K@4.1GHz/8GB RAM/180GB SSD/Intel HD3000 graphics
What the heck am I advocating?
Back to top
View user's profile Send private message
oniichan
n00b
n00b


Joined: 15 Jun 2012
Posts: 27

PostPosted: Fri Jun 15, 2012 7:43 pm    Post subject: Reply with quote

eccerr0r wrote:
I don't think /dev/ is fully populated by busybox mdev so hence the udev full path won't work.
The usual way to specify by label using the typical initrd is

root=LABEL=your-label

Looks a little funny but it works...


Thank you VERY MUCH. This did the trick. Working flawlessly.
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1576
Location: US

PostPosted: Fri Jun 15, 2012 7:46 pm    Post subject: Reply with quote

oniichan,

Your first menu entry should work :!:

Just out of curiosity, can you post back blkid now :?:
_________________
Good luck :wink:

Since installing gentoo, my life has become one long emerge :)
Back to top
View user's profile Send private message
oniichan
n00b
n00b


Joined: 15 Jun 2012
Posts: 27

PostPosted: Fri Jun 15, 2012 8:24 pm    Post subject: Reply with quote

BillWho wrote:
oniichan,

Your first menu entry should work :!:

Just out of curiosity, can you post back blkid now :?:


Code:
/dev/sda1: LABEL="BOOT" UUID="yadayada" TYPE="ext3"
/dev/sda2: LABEL="SWAP" UUID="yadayada" TYPE="swap"
/dev/sda3: LABEL="BOOT" UUID="yadayada" TYPE="ext3"
/dev/sdb1 LABEL="Reserverad av systemet" UUID="shorter yadayada" TYPE="ntfs"
# Reserverad av systemet = Reserved by the system; /dev/sdb is my SSD which has windows on it #
/dev/sdb2 UUID="shorter yadayada" TYPE="ntfs"
/dev/sdc1 : LABEL="Lagring" type ntfs
/dev/sdc2 : LABEL = Installationer
# dev/sdc is my 500gb mechanical HDD for "lagring" (storage) and installations for my Windows.
[/code]
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1576
Location: US

PostPosted: Fri Jun 15, 2012 8:33 pm    Post subject: Reply with quote

oniichan wrote:
BillWho wrote:
oniichan,

Your first menu entry should work :!:

Just out of curiosity, can you post back blkid now :?:


Code:
/dev/sda1: LABEL="BOOT" UUID="yadayada" TYPE="ext3"
/dev/sda2: LABEL="SWAP" UUID="yadayada" TYPE="swap"
/dev/sda3: LABEL="BOOT" UUID="yadayada" TYPE="ext3"
/dev/sdb1 LABEL="Reserverad av systemet" UUID="shorter yadayada" TYPE="ntfs"
# Reserverad av systemet = Reserved by the system; /dev/sdb is my SSD which has windows on it #
/dev/sdb2 UUID="shorter yadayada" TYPE="ntfs"
/dev/sdc1 : LABEL="Lagring" type ntfs
/dev/sdc2 : LABEL = Installationer
# dev/sdc is my 500gb mechanical HDD for "lagring" (storage) and installations for my Windows.
[/code]


I see two 'BOOT' - no ROOT :!: Also UUID="yadayada" is a problem :!:
_________________
Good luck :wink:

Since installing gentoo, my life has become one long emerge :)
Back to top
View user's profile Send private message
oniichan
n00b
n00b


Joined: 15 Jun 2012
Posts: 27

PostPosted: Fri Jun 15, 2012 8:46 pm    Post subject: Reply with quote

BillWho wrote:
oniichan wrote:
BillWho wrote:
oniichan,

Your first menu entry should work :!:

Just out of curiosity, can you post back blkid now :?:


Code:
/dev/sda1: LABEL="BOOT" UUID="yadayada" TYPE="ext3"
/dev/sda2: LABEL="SWAP" UUID="yadayada" TYPE="swap"
/dev/sda3: LABEL="BOOT" UUID="yadayada" TYPE="ext3"
/dev/sdb1 LABEL="Reserverad av systemet" UUID="shorter yadayada" TYPE="ntfs"
# Reserverad av systemet = Reserved by the system; /dev/sdb is my SSD which has windows on it #
/dev/sdb2 UUID="shorter yadayada" TYPE="ntfs"
/dev/sdc1 : LABEL="Lagring" type ntfs
/dev/sdc2 : LABEL = Installationer
# dev/sdc is my 500gb mechanical HDD for "lagring" (storage) and installations for my Windows.


I see two 'BOOT' - no ROOT :!: Also UUID="yadayada" is a problem :!:

One of them is a typo.
And I was to lazy to write the full UUIDs. I knew they looked correct.
Back to top
View user's profile Send private message
eccerr0r
Advocate
Advocate


Joined: 01 Jul 2004
Posts: 3001
Location: USA

PostPosted: Fri Jun 15, 2012 10:11 pm    Post subject: Reply with quote

For future reference, people with typical initrd's can also do real_root=UUID="yadayada" as well to specify Linux disks.

Though UUID is a bit ugly in my books. I just use labels.
_________________
Core-i7-2700K@4.1GHz/8GB RAM/180GB SSD/Intel HD3000 graphics
What the heck am I advocating?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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