Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
{SOLVED} Block device /dev/sda3 is not a valid root device
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
queen
Veteran
Veteran


Joined: 19 Jul 2005
Posts: 1554

PostPosted: Mon Jan 28, 2013 10:40 am    Post subject: {SOLVED} Block device /dev/sda3 is not a valid root device Reply with quote

Hello Everyone

I had a working system on a new laptop for few months already. Suddenly, I had a crash, got a black screen with lots of errors (which I am not sure I can reproduce). The problem is with the boot. When it starts grub it takes more time than usual (instead of a second it takes 6-7 seconds until the splash appears). After that, it starts to boot and fails with

Code:

!! Block device /dev/sda3 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 shell, or "q" to skip...
root block device() ::


I don't know what caused it. I did some updates, but didn't update yet udev to 191.

Currently, I am stuck with the message that it doesn't recognize root device.

Any help will be appreciated.


Last edited by queen on Sat Feb 09, 2013 11:26 pm; edited 1 time in total
Back to top
View user's profile Send private message
tomk
Administrator
Administrator


Joined: 23 Sep 2003
Posts: 7219
Location: Sat in front of my computer

PostPosted: Mon Jan 28, 2013 11:45 am    Post subject: Reply with quote

Moved from Installing Gentoo to Portage & Programming, if you have posted to the wrong forum you should report it instead of creating a new topic and one of us will move it.
_________________
Search | Read | Answer | Report | Strip
Back to top
View user's profile Send private message
Section_8
Guru
Guru


Joined: 22 May 2004
Posts: 477
Location: Arlington, TX, US

PostPosted: Mon Jan 28, 2013 4:35 pm    Post subject: Reply with quote

Just googling that error message, it looks like it's usually happening because something needed is missing from the kernel - either support for the block device, or support for the file system. Did you rebuild your kernel?
Back to top
View user's profile Send private message
queen
Veteran
Veteran


Joined: 19 Jul 2005
Posts: 1554

PostPosted: Mon Jan 28, 2013 5:25 pm    Post subject: Reply with quote

Section_8 wrote:
Just googling that error message, it looks like it's usually happening because something needed is missing from the kernel - either support for the block device, or support for the file system. Did you rebuild your kernel?


I rebuild the kernel few days ago. It was something regarding usbfs and card reader that is on usb port. I didn't touch anything regarding other filesystem which root belongs. root is ext4.

I am trying now to rebuild the kernel by removing usbfs and the card reader.

I also checked the filesystem and it's clean without any errors.

This is the fstab file

Code:
  /dev/sda1               /boot           ext3            defaults,noatime 1 2
/dev/sda2               none            swap            sw              0 0
/dev/sda3               /               ext4            defaults,noatime 0 2
/dev/cdrom              /mnt/cdrom      auto            noauto,ro       0 0
none                    /dev/bus/usb    usbfs           devgid=1014,devmode=664 0 0
proc                    /proc           proc            defaults        0 0
shm                     /dev/shm        tmpfs           nodev,nosuid,noexec 0 0
none                    /dev/usb/       usbfs           auto,devmode=0666 0 0
Back to top
View user's profile Send private message
Section_8
Guru
Guru


Joined: 22 May 2004
Posts: 477
Location: Arlington, TX, US

PostPosted: Tue Jan 29, 2013 3:32 am    Post subject: Reply with quote

Are you certain that ext4 support is compiled into the kernel - not as a module?
Back to top
View user's profile Send private message
queen
Veteran
Veteran


Joined: 19 Jul 2005
Posts: 1554

PostPosted: Tue Jan 29, 2013 8:17 pm    Post subject: Reply with quote

Section_8 wrote:
Are you certain that ext4 support is compiled into the kernel - not as a module?


Yes. It was always built in. And worked.

Code:
CONFIG_EXT4_FS=y
# CONFIG_EXT4_FS_XATTR is not set
# CONFIG_EXT4_DEBUG is not set


Can it be something with udev? I don't have the latest udev (197). I have right now 171
Back to top
View user's profile Send private message
Jaglover
Advocate
Advocate


Joined: 29 May 2005
Posts: 4658
Location: Saint Amant, Acadiana

PostPosted: Tue Jan 29, 2013 9:38 pm    Post subject: Re: Block device /dev/sda3 is not a valid root device Reply with quote

queen wrote:
Hello Everyone

I had a working system on a new laptop for few months already. Suddenly, I had a crash, got a black screen with lots of errors (which I am not sure I can reproduce). The problem is with the boot. When it starts grub it takes more time than usual (instead of a second it takes 6-7 seconds until the splash appears). After that, it starts to boot and fails with ...

Sounds like hardware failure to me, or at least filesystem corruption.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
queen
Veteran
Veteran


Joined: 19 Jul 2005
Posts: 1554

PostPosted: Thu Jan 31, 2013 7:49 am    Post subject: Re: Block device /dev/sda3 is not a valid root device Reply with quote

Jaglover wrote:
queen wrote:
Hello Everyone

I had a working system on a new laptop for few months already. Suddenly, I had a crash, got a black screen with lots of errors (which I am not sure I can reproduce). The problem is with the boot. When it starts grub it takes more time than usual (instead of a second it takes 6-7 seconds until the splash appears). After that, it starts to boot and fails with ...

Sounds like hardware failure to me, or at least filesystem corruption.


BTW, I upgraded udev and it didn't solve the problem. Right now grub starts fast but fails in mounting root. How can I check if it's a hardware failure? In chroot I can see /dev/sda3 (/) completely. I also ran fsck.ext4 and it says it's clean.
Back to top
View user's profile Send private message
steveL
Advocate
Advocate


Joined: 13 Sep 2006
Posts: 2522
Location: The Peanut Gallery

PostPosted: Thu Jan 31, 2013 12:52 pm    Post subject: Re: Block device /dev/sda3 is not a valid root device Reply with quote

queen wrote:
Jaglover wrote:
Sounds like hardware failure to me, or at least filesystem corruption.


BTW, I upgraded udev and it didn't solve the problem. Right now grub starts fast but fails in mounting root. How can I check if it's a hardware failure? In chroot I can see /dev/sda3 (/) completely. I also ran fsck.ext4 and it says it's clean.

If you can access it in chroot and not on main system, that does sound like you're missing something built-in: the classic things are the fs, which you've covered, the motherboard drivers (SATA usually, but specific to your hard-drive controller) and scsi-disk which is needed to access modern drives. You might have accidentally done something to one of those while changing kernel config recently.

Another thing that struck me was that you have /boot listed before / in /etc/fstab: as man fstab says:
"The order of records in fstab is important because fsck(8), mount(8), and umount(8) sequentially iterate through fstab doing their thing."
I've always been careful of ordering, so /usr has to be listed before /usr/local or /usr/src, and / before anything apart from swap. Not sure if that's it, of course, but it doesn't hurt to try (I noticed /boot seemed stuck on at the top.)
Back to top
View user's profile Send private message
padoor
Advocate
Advocate


Joined: 30 Dec 2005
Posts: 4055
Location: india

PostPosted: Thu Jan 31, 2013 3:27 pm    Post subject: Reply with quote

cfdisk /dev/sda
may show if any partition table corruption has come up.
the delay is it is looking up for the root partition
i have had such troubles in new intallations only.
this makes me worry as i am also running a few months old new laptop gentoo-x32 and gentoo-x64 with windows 7 and 8 in partitions of the same disk.
i am also intersted in a solution to this problem
_________________
reach out a little bit more to catch it (DON'T BELIEVE the advocate part under my user name)
Back to top
View user's profile Send private message
queen
Veteran
Veteran


Joined: 19 Jul 2005
Posts: 1554

PostPosted: Fri Feb 01, 2013 9:47 pm    Post subject: Re: Block device /dev/sda3 is not a valid root device Reply with quote

steveL wrote:
queen wrote:
Jaglover wrote:
Sounds like hardware failure to me, or at least filesystem corruption.


BTW, I upgraded udev and it didn't solve the problem. Right now grub starts fast but fails in mounting root. How can I check if it's a hardware failure? In chroot I can see /dev/sda3 (/) completely. I also ran fsck.ext4 and it says it's clean.

If you can access it in chroot and not on main system, that does sound like you're missing something built-in: the classic things are the fs, which you've covered, the motherboard drivers (SATA usually, but specific to your hard-drive controller) and scsi-disk which is needed to access modern drives. You might have accidentally done something to one of those while changing kernel config recently.

Another thing that struck me was that you have /boot listed before / in /etc/fstab: as man fstab says:
"The order of records in fstab is important because fsck(8), mount(8), and umount(8) sequentially iterate through fstab doing their thing."
I've always been careful of ordering, so /usr has to be listed before /usr/local or /usr/src, and / before anything apart from swap. Not sure if that's it, of course, but it doesn't hurt to try (I noticed /boot seemed stuck on at the top.)


Thanks for the tips. The changes I made in the kernel were about the card reader. ( I doubled checked, AHCI (sata controller) and AHCI PLATFORM appears in the kernel and I didn't touch it.

Regarding fstab, I will change the order, although this was the order for the last 4 months and I never had a problem.

But it's worth to try to re-write fstab.

OPTION 2 I might try to configure a newer kernel like 3.6.

Right now I DIDN'T chroot into the system and just mounted only /dev/sda3 which is root. I looked under / and found only /dev/null. is it normal? Or I was supposed to see more? I didn't run
Code:
 mount --rbind /dev /mnt/gentoo/dev


Is there a way to check if there is a problem with the hardware before I give it to the lab? lspci appears to be fine. Memtest showed there are no errors.


Last edited by queen on Fri Feb 01, 2013 9:54 pm; edited 1 time in total
Back to top
View user's profile Send private message
queen
Veteran
Veteran


Joined: 19 Jul 2005
Posts: 1554

PostPosted: Fri Feb 01, 2013 9:51 pm    Post subject: Reply with quote

padoor wrote:
cfdisk /dev/sda
may show if any partition table corruption has come up.
the delay is it is looking up for the root partition
i have had such troubles in new intallations only.
this makes me worry as i am also running a few months old new laptop gentoo-x32 and gentoo-x64 with windows 7 and 8 in partitions of the same disk.
i am also intersted in a solution to this problem


Thanks. I"ll give it a try.
Back to top
View user's profile Send private message
Chiitoo
l33t
l33t


Joined: 28 Feb 2010
Posts: 856
Location: Here and Away Again

PostPosted: Wed Feb 06, 2013 2:44 pm    Post subject: Re: Block device /dev/sda3 is not a valid root device Reply with quote

steveL wrote:
Another thing that struck me was that you have /boot listed before / in /etc/fstab: as man fstab says:
"The order of records in fstab is important because fsck(8), mount(8), and umount(8) sequentially iterate through fstab doing their thing."

I took a gander at mine, which has one partition for my own stuff, the /boot, and swap before / and then I checked the Handbook as I didn't think I would venture far from its guidance:
    Code Listing 1.3: A full /etc/fstab example
Code:
/dev/sda1   /boot        ext2    defaults,noatime     0 2
/dev/sda2   none         swap    sw                   0 0
/dev/sda3   /            ext3    noatime              0 1

/dev/cdrom  /mnt/cdrom   auto    noauto,user          0 0

Only thing regarding the fstab I have done after the first real install over 2 years ago, was that I recently changed /boot to 'noauto'. That doesn't mean that it doesn't matter at all for anything else. The order that is. But I doubt it would get overlooked in this particular case, so the comment in the man page is probably aimed at other stuff. Probably. ^^;


queen,

You probably have it 'covered', but it might be a good idea to pastebin your Kernel .config for a few more looks, just to be sure. Also, you could fire up something like SystemRescueCd or whatever you are using and if you haven't, check dmesg for any errors/faults\nasties.

Running some tests on the hard-drive(s) might not be a bad idea either (I forget the tool I last used myself (probably smartctl), but there exist a lot of info about such all over the place).


Good luck~
_________________
Kind Regards,
~ The Noob Unlimited ~

Sore wa sore, kore wa kore.
Back to top
View user's profile Send private message
queen
Veteran
Veteran


Joined: 19 Jul 2005
Posts: 1554

PostPosted: Sat Feb 09, 2013 9:16 am    Post subject: Re: Block device /dev/sda3 is not a valid root device Reply with quote

HI Chiitoo

Thanks for the tips. First, few things that I checked. During the boot, it fails before it even starts to read fstab. I did a small experiment. Wrote in fstab sda9 (which doesn't exist), instead of sda3 and it didn't complain. After that I changed in grub.conf real_root=sda9 and there it complained. So, it takes from grub. I also emerged again grub and ran grub install. Same error.

I suspect that /dev files were somehow wiped. If I mount /mnt/gentoo I see there only /dev/null and nothing more. I think there should be more there. If I mount /dev from live dvd to /mnt/gentoo/dev I see much more.

How do I create a normal /dev?

Regarding dmesg, from the live dvd (after mount of /mnt/gentoo ) i didn't see anything special. But I will take a look again.

I will post the kernel config later. HD control I ran fsck.ext4 /dev/sda3 also fsck dev/sda. This is clean. Besides, after I mount /mnt/gentoo I can see everything.

never Heard of smartctl. Will take a look.
Back to top
View user's profile Send private message
Chiitoo
l33t
l33t


Joined: 28 Feb 2010
Posts: 856
Location: Here and Away Again

PostPosted: Sat Feb 09, 2013 12:32 pm    Post subject: Re: Block device /dev/sda3 is not a valid root device Reply with quote

queen wrote:
I suspect that /dev files were somehow wiped. If I mount /mnt/gentoo I see there only /dev/null and nothing more. I think there should be more there. If I mount /dev from live dvd to /mnt/gentoo/dev I see much more.

How do I create a normal /dev?

I didn't say anything about that yet since my knowledge about udev is more than lacking; I never really looked into it, and simply let it do its thing. You also mentioned you didn't update udev. Anyblue, as I understand it, udev should create those device nodes for you, so perhaps your suspicions are not that much off.

If you haven't stumbled upon it before, here's some interesting (I think) read about it (and the wiki article for good measure), and some examples on how to manually create those nodes (might help with testing?):
queen wrote:
Regarding dmesg, from the live dvd (after mount of /mnt/gentoo ) i didn't see anything special. But I will take a look again.

Might be worth to pastebin that as well.

queen wrote:
never Heard of smartctl. Will take a look.

Apparently I forgot to add that it's a part of sys-apps/smartmontools.
_________________
Kind Regards,
~ The Noob Unlimited ~

Sore wa sore, kore wa kore.
Back to top
View user's profile Send private message
padoor
Advocate
Advocate


Joined: 30 Dec 2005
Posts: 4055
Location: india

PostPosted: Sat Feb 09, 2013 4:34 pm    Post subject: Reply with quote

the /dev will come up even if you delete everything in it.
it is supposed to be regenerating. previous /dev i have deleted and found t still booted correctly in an older installation.
it may not be your current roblem
_________________
reach out a little bit more to catch it (DON'T BELIEVE the advocate part under my user name)
Back to top
View user's profile Send private message
queen
Veteran
Veteran


Joined: 19 Jul 2005
Posts: 1554

PostPosted: Sat Feb 09, 2013 10:18 pm    Post subject: Reply with quote

padoor wrote:
the /dev will come up even if you delete everything in it.
it is supposed to be regenerating. previous /dev i have deleted and found t still booted correctly in an older installation.
it may not be your current roblem


Thanks. I think I found the problem and the solution.Cross fingers for me. Someone had a very similar problem like mine. Here is the link

http://forums.gentoo.org/viewtopic-t-949034-highlight-newroot.html

PS. Solved. The problem was in the grub line init=linuxrc. I removed it and it worked. I also followed the udev guide and ran from chroot
Code:
mknod -m 660 console c 5 1
because it disappeared.
Back to top
View user's profile Send private message
padoor
Advocate
Advocate


Joined: 30 Dec 2005
Posts: 4055
Location: india

PostPosted: Sun Feb 10, 2013 6:22 am    Post subject: Reply with quote

i am glad it works for you.
i have no init= lie in my grub menu.lst
i use old grub. not grub2
grub2 update has given me much more problems like hdd itself not recognised sometimes back.
anyways you could avoid a reinstall :)
_________________
reach out a little bit more to catch it (DON'T BELIEVE the advocate part under my user name)
Back to top
View user's profile Send private message
queen
Veteran
Veteran


Joined: 19 Jul 2005
Posts: 1554

PostPosted: Sun Feb 10, 2013 5:40 pm    Post subject: Reply with quote

padoor wrote:
i am glad it works for you.
i have no init= lie in my grub menu.lst
i use old grub. not grub2
grub2 update has given me much more problems like hdd itself not recognised sometimes back.
anyways you could avoid a reinstall :)


Yes, I didn't want to reinstall. Worse, I had a point when I started to think it's a hardware problem. And Jaglover also suggested it's a hardware problem.

I don't think it's grub problem. It's udev problem here. I had another udev problem a year ago. Udev upgrades cause problems.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming 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