Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
(Temporarily) unable to find root block device [Solved]
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
neoire
n00b
n00b


Joined: 15 Aug 2015
Posts: 5

PostPosted: Sat Aug 15, 2015 10:04 pm    Post subject: (Temporarily) unable to find root block device [Solved] Reply with quote

Hi all,

Long time Linux user, first time Gentoo user. Really dig the idea, but got a whole bunch of issues to iron out on my fresh install. Let's start with this one:

I have Gentoo installed on an external USB disk, the idea is to use it on multiple machines. Therefore I would like to specify my partitions using UUIDs. Partition table looks like this:

Code:
- EFI
- /boot from another distro
- swap
- / for another distro
- / for Gentoo


The / for Gentoo is ext4, and it has /boot in it with kernel image and initramfs. Grub config is in /boot of the other distro. Both kernel and initiramfs are generated with

Code:
genkernel --disklabel --install all


And grub entry looks something like:

Code:
search --set=root <UUID>
linux /boot/<vmlinuz-file> root=UUID=<UUID>
initrd /boot/<initramfs-file>


Not verbatim, but it's basically generated with os-prober. Every time during the boot process, I get an error along the lines of "cannot find root device with UUID ..." with options to press enter to try the same, or drop to a shell or restart. Here's the funny part, if I press enter to try the same again, most of the time it works. OpenRC kicks in and system boots as normal. Sometimes the error shows up again, but if I keep pressing enter and retry the same thing, it will eventually boot. Funny bit of non-determinism here.

I've searched around quite a bit, but everyone who had that error seemed to really be missing something, and the error isn't transient for them. So I'm at a loss for possible causes. Any ideas?

thanks!
Geoff


Last edited by neoire on Sun Aug 16, 2015 1:11 am; edited 1 time in total
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Sat Aug 15, 2015 10:11 pm    Post subject: Reply with quote

And the disc is spun up when grub asks for it?

i assume /boot is on the external disc too?

http://www.gnu.org/software/grub/manual/html_node/search.html
Code:
   search --no-floppy --fs-uuid --set=root UUID_crap_balbla
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43559
Location: 56N 3W

PostPosted: Sat Aug 15, 2015 10:45 pm    Post subject: Reply with quote

neoire,

Welcome to gentoo.

With root on USB,
Code:
linux /boot/<vmlinuz-file> root=UUID=<UUID>
will fail to boot every time.
The problem is that the kernel mounts root before it starts USB and you need USB to mount root.

I do root on USB withount an initrd and pass the kernel rootdelay=7, which makes the kernel wait 7 seconds before mounting root. This allows USB to get ready.
With an initrd, rootdelay=7 makes the kernel wait 7 seconds before mounting the initrd as root. That's not what you want.
You need the delay inside the init script in the initrd.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
neoire
n00b
n00b


Joined: 15 Aug 2015
Posts: 5

PostPosted: Sun Aug 16, 2015 12:12 am    Post subject: Reply with quote

@tw04l124 sorry I didn't put the exact Grub config on there, but that is the exact line I have. It's the output of os-prober, so I thought it's pretty standard.

@NeddySeagoon That makes a lot of sense. Also explains why sometimes it works on first retry, sometimes it takes multiple. I'll play with delays and report back.

Thanks guys!
Back to top
View user's profile Send private message
neoire
n00b
n00b


Joined: 15 Aug 2015
Posts: 5

PostPosted: Sun Aug 16, 2015 1:09 am    Post subject: (Temporarily) unable to find root block device [Solved] Reply with quote

@NeddySeagoon a delay solved it. Unpacked the initramfs image and read the init script, turns out it accepts a "scandelay" option. So adding "scandelay=10" to my kernel line fixed it. The exact error message I was getting (in case someone else need to find this on Google):

"Could not find the root block device in UUID="
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