Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Block device is not a valid root device on boot
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
mrmylanman
n00b
n00b


Joined: 21 Apr 2012
Posts: 19

PostPosted: Sat Apr 21, 2012 10:33 pm    Post subject: [SOLVED] Block device is not a valid root device on boot Reply with quote

This is my grub.cfg:

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

title Gentoo Linux
root (hd0,0)
kernel /boot/kernel-genkernel-x86_64-3.2.12-gentoo root=/dev/ram0 real_root=/dev/sdb2 real_rootfstype=btrfs real_pcie_aspm=force
initrd /boot/initramfs-genkernel-x86_64-3.2.12-gentoo


This is the output of fdisk -l:

Code:
Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimum): 512 bytes / 512 bytes
Disk identifier: 0x00033464

   Device Boot      Start         End      Blocks   Id System
/dev/sda1            2048   439453695   219725824   83 Linux
/dev/sda2       439453696   488396799    24471552   83 Linux

Disk /dev/sda: 60.0 GB, 60022480896 bytes
255 heads, 63 sectors/track, 7296 cylinders, total 117231408 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimum): 512 bytes / 512 bytes
Disk identifier: 0x00017bc3

   Device Boot      Start         End     Blocks   Id System
/dev/sdb1            2048      499711     248832   83 Linux
/dev/sdb2          499712   117229567   58364928   83 Linux


This is my fstab:

Code:
/dev/sdb1  /boot     ext3   defaults,noatime
/dev/sdb2  /         btrfs  defaults,noatime,ssd,compress=lzo
/dev/sda1  /home     btrfs  defaults,noatime
/dev/sda2  /var      btrfs  defaults,noatime
proc       /proc     proc   defaults
shm        /dev/shm  tmpfs  defaults,nodev,nosuid,noexec


I have found a few threads related to seemingly similar issues, however I was unable to find a solution that helped me out. This is my first (fresh) install of Gentoo. When I boot up, I get the following error:

Code:
>> Loading modules
>> Hint: Use parameter scandelay[=seconds] if you need waiting here
>> Activating mdev
>> Determining root device...
!! Block device /dev/sdb2 is not a valid root device...
!! Could not find the root block device in .
   Please specify another value or: press Enter for the same, type "shell" for a shell, or "q" to skip...
root block device() ::


I tried telling it /dev/sda2 and /dev/sdb2 (in case the names changed at boot-up), but neither worked (same error).

I then tried telling it /dev/ram0, and I get the following error:

Code:
>> Mounting root...
>> Using mount -t auto -o ro
mount: mounting /dev/ram0 on /newroot failed: Invalid argument
!! could not mount specified ROOT, try again
!! Could not find the root block device in .
   Please specify another value or: press Enter for the same, type "shell" for a shell, or "q" to skip...
root block device() ::


I don't see sda, sda1, sda2, sdb, sdb1, or sdb2 in /dev when I go into the shell.

I believe I selected all the correct drivers when compiling my kernel (being sure to select Y not M), although I could be wrong.

Any help would be greatly appreciated. Thanks!
_________________
Thinkpad X220


Last edited by mrmylanman on Sun Apr 22, 2012 5:44 pm; edited 1 time in total
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1600
Location: US

PostPosted: Sun Apr 22, 2012 12:44 am    Post subject: Reply with quote

mrmylanman,

give this a try
Code:
title Gentoo Linux
root (hd0,0)
kernel /kernel-genkernel-x86_64-3.2.12-gentoo root=/dev/ram0 real_root=/dev/sdb2 rootfstype=btrfs pcie_aspm=force
initrd /initramfs-genkernel-x86_64-3.2.12-gentoo

_________________
Good luck :wink:

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


Joined: 21 Apr 2012
Posts: 19

PostPosted: Sun Apr 22, 2012 12:53 am    Post subject: Reply with quote

BillWho wrote:
mrmylanman,

give this a try
Code:
title Gentoo Linux
root (hd0,0)
kernel /kernel-genkernel-x86_64-3.2.12-gentoo root=/dev/ram0 real_root=/dev/sdb2 rootfstype=btrfs pcie_aspm=force
initrd /initramfs-genkernel-x86_64-3.2.12-gentoo

Thanks so much for the tip, unfortunately I accidentally deleted a ton of files on / just now.... (can't believe it, first time I have done that, at least it was before the system was even booting properly). So I'll work on re-installing Gentoo and if I come across this problem again I will check out your answer and let you know if it helps!
_________________
Thinkpad X220
Back to top
View user's profile Send private message
_SerEga_
n00b
n00b


Joined: 13 Jun 2009
Posts: 30
Location: Gatchina, Russia

PostPosted: Sun Apr 22, 2012 7:17 am    Post subject: Re: Block device is not a valid root device on boot Reply with quote

mrmylanman wrote:
I don't see sda, sda1, sda2, sdb, sdb1, or sdb2 in /dev when I go into the shell.

If you have none /dev/sd* that's means: kernel don't have driver to your SATA/IDE controller. Check /dev/hd*
Anyway, you don't need to reinstall Gentoo, only rebuild kernel.
Back to top
View user's profile Send private message
cach0rr0
Bodhisattva
Bodhisattva


Joined: 13 Nov 2008
Posts: 4123
Location: Houston, Republic of Texas

PostPosted: Sun Apr 22, 2012 7:27 am    Post subject: Reply with quote

does root on btrfs actually work properly without a specific initramfs?

it's possible genkernel's initramfs creation handles this
but i think because of what's involved with btrfs volume activation it'd be a non-starter as a rootfs unless an initramfs does the job of setting it up. I could be dead flat embarrassingly wrong on that, though (and that's unrelated to your missing block device issue). As per usual on my post-saturday-night-pub foruming I get thoughts a touch mixed up, I could have my recollection of subvolume support mixed with plain old rootfs requirements.
_________________
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Back to top
View user's profile Send private message
mrmylanman
n00b
n00b


Joined: 21 Apr 2012
Posts: 19

PostPosted: Sun Apr 22, 2012 12:37 pm    Post subject: Reply with quote

I just now got around to reinstalling Gentoo and got back to where I was last night.

I tried the GRUB configuration you specified, and here's the error I run into:

Code:
>> Activating mdev
>> Determining root device...
>> Mounting root...
>> Using mount -t btrs -o ro
mount: mounting /dev/sdb2 on /newroot failed:  No such device
!! Could not mount specified ROOT, try again
!! Could not find the root block device in .
   Please specify another value or: press Enter for the same, type "shell" for a shell, or "q" to skip...
root block device() ::


The difference this time, is that /dev/sdb2 IS indeed there. So now there's something else going on.
_________________
Thinkpad X220
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1600
Location: US

PostPosted: Sun Apr 22, 2012 4:16 pm    Post subject: Reply with quote

mrmylanman,

I'm inclined to suspect that its the btrs file system. I always use ext3 for mine.

According to the description, it's currently experimental/unstable at this time.

If there's no specific reason for using btrs, I would suggest reverting to ext3 or ext4.

cach0rr0 has also alluded to the possibility that btrfs might be a bad choice for the / file system.
_________________
Good luck :wink:

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


Joined: 21 Apr 2012
Posts: 19

PostPosted: Sun Apr 22, 2012 5:43 pm    Post subject: Reply with quote

I gotcha. I have read that btrfs is now considered stable, however upon further inspection, that is the version included with Linux 3.3 or 3.4 (in the installation media, it is 3.2).

Thanks for the help, however I appreciate it!
_________________
Thinkpad X220
Back to top
View user's profile Send private message
cach0rr0
Bodhisattva
Bodhisattva


Joined: 13 Nov 2008
Posts: 4123
Location: Houston, Republic of Texas

PostPosted: Mon Apr 23, 2012 2:09 am    Post subject: Reply with quote

i dont think the versioning is what's hurting you on this one
i think it's simply either:
a)something missing with the way that genkernel is crafting your kernel/initramfs - something missing from one or both
or
b)something in the rc system that's failing to make the necessary changes to your btrfs root volume to allow it to remount 'rw'

you actually arent at all far off from getting this to work (on your second go, i mean)

the initial mounting of root 'ro' apparently was successful, since it got to the point of entering openrc
but the subsequent attempt to mount root as rw failed

which would say to me that some btrfs action in the rc system never took place (theory B above). Maybe you're missing btrfsprogs? Maybe you're using newer udev and /usr is on a separate partition hence making btrfsctl or some other program udev might use unavailable for remounting your rootfs in 'rw' mode?
_________________
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Back to top
View user's profile Send private message
mrmylanman
n00b
n00b


Joined: 21 Apr 2012
Posts: 19

PostPosted: Fri May 04, 2012 3:06 am    Post subject: Reply with quote

Hey guys,

Sorry it took so long to get back... I didn't really have time to mess with it for a while between work, and my wife being pregnant (and trying to finish up college!) but I finally took another whack at it.

This time I used ext4, and it was MUCH less painful. I also set up the partition map to be simpler (/boot, /, and /home), so that combination seems to work out nice. Time to emerge gnome and check back in the morning! At least now it's booting up just fine.
_________________
Thinkpad X220
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