Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
"Could not find the root block device in ."
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
sterlingm
n00b
n00b


Joined: 09 Apr 2012
Posts: 27

PostPosted: Mon Apr 09, 2012 3:24 pm    Post subject: "Could not find the root block device in ." Reply with quote

Hi, I am trying to install Gentoo and am stuck. First of all, I should say that this is the first time I have ever manually installed an OS. Its taken me about 4 attempts of starting over to get to this point. I hope my questions are not redundant or too "noob". I am very new to this so please be explicit as possible when answering.

I have gotten to the reboot part, but when I boot into Gentoo, it tells me

"!!Block device 801 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..."

And then it prompts me with "root block device() ::"

What does this mean? Do I have to start over or is there a way I can just fix it? I could never get grub installed (another issue in itself because I've used grub when I had ubuntu and debian so why wouldn't it work? :( ), so I just used lilo. Could that be the issue?

I felt very uncertain when I was messing around all of the conf files, so my guess is the problem is in there - but where? What do I check for? How do I know I am using the correct values?

Any help is much appreciated.
Back to top
View user's profile Send private message
avx
Advocate
Advocate


Joined: 21 Jun 2004
Posts: 2152

PostPosted: Mon Apr 09, 2012 5:04 pm    Post subject: Reply with quote

If it can't find a root device, that usually means of these things:
a) you did not built support for your mainboard controller into the kernel, ie. it must be built in, not as a module
b) same as a), except for the filesystem you are using for /
c) specified a wrong device in the boot loader

As for GRUB, it seems to be working, at least I wouldn't know what else would offer to drop to a shell this early in the boot process.

As far as rescuing goes, just boot up your live medium again, mount the partitions and chroot, then you're back in your system and can try to fix the problems layed out above.

If that doesn't help, please provide your grub config and relevant parts of your kernel config together with a list of your hardware (lspci). If it get's long, please use a pastebin such as pastebin.com. You can paste from the commandline with `wgetpaste` (need to `emerge wgetpaste` for that to work).

Welcome to the forums :)
_________________
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
Back to top
View user's profile Send private message
sterlingm
n00b
n00b


Joined: 09 Apr 2012
Posts: 27

PostPosted: Mon Apr 09, 2012 5:40 pm    Post subject: Reply with quote

avx wrote:
If it can't find a root device, that usually means of these things:
a) you did not built support for your mainboard controller into the kernel, ie. it must be built in, not as a module
b) same as a), except for the filesystem you are using for /
c) specified a wrong device in the boot loader

As for GRUB, it seems to be working, at least I wouldn't know what else would offer to drop to a shell this early in the boot process.

As far as rescuing goes, just boot up your live medium again, mount the partitions and chroot, then you're back in your system and can try to fix the problems layed out above.

If that doesn't help, please provide your grub config and relevant parts of your kernel config together with a list of your hardware (lspci). If it get's long, please use a pastebin such as pastebin.com. You can paste from the commandline with `wgetpaste` (need to `emerge wgetpaste` for that to work).

Welcome to the forums :)


I will try these out this evening when I get home. Can you tell me how I would "build support for my mainbaord controller into the kernel"? Same for b. Or if that is layed out in the handbook, where at in the handbook?

I am trying to install it on my whole hard disk so I only have /dev/sda1. So my grub.conf just looks like -

default 0
timeout 10

title Gentoo
root (hd0,0)
kernel /boot/kernel root=/dev/sda1

Does this seem correct? Is there anywhere else that only having /dev/sda1 could affect? The handbook and quick install guide I went by has 3 partitions, so I tried to just use /dev/sda1 everywhere. I may have put it at the wrong place though. My fstab looks like -

/dev/sda1 /boot ext3 noauto,noatime 1 2
/dev/sda1 / ext3 noatime 0 1

As for grub, it always tells me the grub command cannot be found. I tried emerge grub and emerge grub-install and a grep command I can't remember off my head right now. I could never get it to recognize the 'grub' command or 'grub-install'.

What other relevant parts should I include if necessary?
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1600
Location: US

PostPosted: Mon Apr 09, 2012 6:11 pm    Post subject: Reply with quote

sterlingm.

Try adding rootfstype=ext3 to your kernel line.

With /boot/kernel make sure the symlink is set in the boot directory.
Code:
kernel -> kernel-genkernel-x86_64-3.4.0-rc1

Also, there is a change with udev that requires CONFIG_DEVTMPFS to be set. You might want to set that now rather than encountering errors after an update.

Good luck :wink:

EDIT: Inportant -> you don't need
Code:
 /dev/sda1 /boot ext3 noauto,noatime 1 2
in fstab; remove it :!:
Back to top
View user's profile Send private message
avx
Advocate
Advocate


Joined: 21 Jun 2004
Posts: 2152

PostPosted: Mon Apr 09, 2012 6:18 pm    Post subject: Reply with quote

Quote:
Can you tell me how I would "build support for my mainbaord controller into the kernel"?
When configuring the kernel, ie `make menuconfig`, there should be <*> in front of the relevant options, not a <M>. Relevant here meaning S-ATA support, if you've got a fairly recent/common system. The same applies for your filesystem, ie. "<*> ext3..." or whatever filesystem it is you're using. (Here's some info: http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=1&chap=7 )

Quote:
kernel /boot/kernel root=/dev/sda1

Does this seem correct?
Yes.

Quote:
My fstab looks like -

/dev/sda1 /boot ext3 noauto,noatime 1 2
/dev/sda1 / ext3 noatime 0 1
That won't work, if you only have a single partition, /boot is included in /, thus the first line is wrong because it's not needed.

Quote:
As for grub, it always tells me the grub command cannot be found. I tried emerge grub and emerge grub-install and a grep command I can't remember off my head right now. I could never get it to recognize the 'grub' command or 'grub-install'.

You just need to `emerge grub` while being in chroot of course!

Then run
Code:

grub
> root (hd0,0)
> setup (hd0)
> exit
(the ">" means, you are in a grub-subshell)

That's about it, except copying the grub.conf in it's place and editing it as needed.

If these things are fixed, that should be it, if not, give the outputs the commands produce, if needed, try to make a photo with some camera and upload it, if it still hangs at booting.

Good luck.

Edit, meh, getting old, too slow :(
_________________
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
Back to top
View user's profile Send private message
sterlingm
n00b
n00b


Joined: 09 Apr 2012
Posts: 27

PostPosted: Mon Apr 09, 2012 9:26 pm    Post subject: Reply with quote

Okay I am now able to reboot, select in Gentoo (in grub!!), and login with root. My problem now is that my networking is not working. Currently, I am connected through an ethernet cable to a modem in my dorm room. The quick install guide says to do this before rebooting -

livecd etc # cd init.d
livecd init.d # ln -s net.lo net.eth0
livecd init.d # cd ../conf.d
livecd conf.d # echo 'config_eth0="192.168.1.10 netmask 255.255.255.0 brd 192.168.1.255"' >> net
livecd conf.d # echo 'routes_eth0="default via 192.168.1.1"' >> net
livecd conf.d # echo 'hostname="myhostname"' > hostname
livecd conf.d # rc-update add net.eth0 default
(If you compiled your network card driver as a module, add it to /etc/conf.d/modules
livecd conf.d # echo 'modules="r8169"' >> /etc/conf.d/modules

I guess I should have changed the ip address, but I don't know what to. As root, I try to do net-setup eth0 - it tells me '-bash: net-setup: command not found'. When I ifconfig, it only shows lo. My /etc/conf.d/net looks like -

config_eth0="192.168.1.10 netmask 255.255.255.0 brd 192.168.1.255"
routes_eth0="default via 182.168.1.1"

Its this way from the commands I did in the install. How can I fix this? Thank you all so much for the help so far!
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1600
Location: US

PostPosted: Mon Apr 09, 2012 9:49 pm    Post subject: Reply with quote

sterlingm,

Quote:
I am connected through an ethernet cable to a modem in my dorm room

If you're not connected to a wired or wireless router, then you can't assign an ip address.
In /etc/conf.d/net try setting
Code:
config_eth0="dhcp"

You should use nano (app-editors/nano) and remove the cruft.
Also make sure you have the correct driver (module) for your card.

Good luck :wink:
Back to top
View user's profile Send private message
sterlingm
n00b
n00b


Joined: 09 Apr 2012
Posts: 27

PostPosted: Mon Apr 09, 2012 9:56 pm    Post subject: Reply with quote

BillWho wrote:
sterlingm,

Quote:
I am connected through an ethernet cable to a modem in my dorm room

If you're not connected to a wired or wireless router, then you can't assign an ip address.
In /etc/conf.d/net try setting
Code:
config_eth0="dhcp"

You should use nano (app-editors/nano) and remove the cruft.
Also make sure you have the correct driver (module) for your card.

Good luck :wink:


So now it just looks like
config_eth0="dhcp"
routes_eth0="dhcp"

So now that I have it setup like this...what do I do? Will it just connect right away? That is not happening for me. It cannot find the lspci or net-setup commands.
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1600
Location: US

PostPosted: Mon Apr 09, 2012 10:04 pm    Post subject: Reply with quote

sterlingm,

remove routes_eth0="dhcp"

Code:
emerge  sys-apps/pciutils

for lspci
Back to top
View user's profile Send private message
sterlingm
n00b
n00b


Joined: 09 Apr 2012
Posts: 27

PostPosted: Mon Apr 09, 2012 10:08 pm    Post subject: Reply with quote

I do that and it has no affect. I try to modprobe r8169, but it cannot find modprobe command. I try to do ifconfig eth0 dhcp and it says "Host name lookup failure".
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1600
Location: US

PostPosted: Mon Apr 09, 2012 10:24 pm    Post subject: Reply with quote

sterlingm,

Are you doing this while chrooted ? How are you chrooting ?

Do you have any gentoo mirrors setup?

Paste back /etc/make.conf
Back to top
View user's profile Send private message
sterlingm
n00b
n00b


Joined: 09 Apr 2012
Posts: 27

PostPosted: Mon Apr 09, 2012 10:28 pm    Post subject: Reply with quote

BillWho wrote:
sterlingm,

Are you doing this while chrooted ? How are you chrooting ?

Do you have any gentoo mirrors setup?

Paste back /etc/make.conf


I'm doing this logged in as the root user. What would I chroot into?

The /etc/make.conf is (taking out all comments) -

CFLAGS="-02 -pipe"
CXXFLAGS="${CFLAGS}"
GHOST="x86_64-pc-linux-gnu"
USE="mmx sse sse2"
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1600
Location: US

PostPosted: Mon Apr 09, 2012 10:46 pm    Post subject: Reply with quote

sterlingm,

You skipped or missed important pages of the gentoo installation handbook :!:

I would suggest going through them starting with Chapter 4 given you have no swap partition in fstab. There's a lot missing in make.conf too :!:

Quote:
I'm doing this logged in as the root user. What would I chroot into?

Chapter five will cover chrooting.

Good luck :wink:
Back to top
View user's profile Send private message
sterlingm
n00b
n00b


Joined: 09 Apr 2012
Posts: 27

PostPosted: Mon Apr 09, 2012 10:48 pm    Post subject: Reply with quote

Well I am installing on my whole hard disk so is swap really necessary? And what is missing from make.conf?
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1600
Location: US

PostPosted: Mon Apr 09, 2012 11:26 pm    Post subject: Reply with quote

Code:
And what is missing from make.conf?

Just to mention a couple

MAKEOPTS
GENTOO_MIRRORS
INPUT_DEVICES
VIDEO_CARDS
Quote:
Well I am installing on my whole hard disk so is swap really necessary?

You could create a file that acts as swap space if the system is looking for it, but it's best to setup a small swap partition.
Back to top
View user's profile Send private message
sterlingm
n00b
n00b


Joined: 09 Apr 2012
Posts: 27

PostPosted: Mon Apr 09, 2012 11:34 pm    Post subject: Reply with quote

BillWho wrote:
Code:
And what is missing from make.conf?

Just to mention a couple

MAKEOPTS
GENTOO_MIRRORS
INPUT_DEVICES
VIDEO_CARDS
Quote:
Well I am installing on my whole hard disk so is swap really necessary?

You could create a file that acts as swap space if the system is looking for it, but it's best to setup a small swap partition.


I've been following this quick install guide here -
http://www.gentoo.org/doc/en/gentoo-x86-quickinstall.xml

I was actually at the point to get MAKEOPTS and GENTOO_MIRRORS. But I can't emerge them with no networking. That is the problem right now...the lack of networking. Should the INPUT_DEVICES and VIDEO_CARDS already be on there? Remember that I have just gotten to the reboot, and am logged in as root. I'm confused about how to get my networking right now. But if I should have INPUT_DEVICES and VIDEO_CARDS in make.conf already, where did I go wrong for those?
Back to top
View user's profile Send private message
avx
Advocate
Advocate


Joined: 21 Jun 2004
Posts: 2152

PostPosted: Mon Apr 09, 2012 11:42 pm    Post subject: Reply with quote

Quote:
Just to mention a couple

MAKEOPTS
GENTOO_MIRRORS
INPUT_DEVICES
VIDEO_CARDS
While these things are what makes Gentoo, they aren't really needed and certainly don't help here.

sterlingm,

as root in your real system aka not chroot'ed, do
Code:
/etc/init.d/net.eth0 start
ifconfig eth0
ping -c1 google.com
and post the output here. May be, that you're only missing DNS. If `ifconfig` shows you an IP, try
Code:
echo nameserver 8.8.8.8 > /etc/resolv.conf
(that's a DNS server from Google) and then try pinging some server again.

If the r8169 module is loaded correctly, that should be about it, at least I've got the same one working without problems here.
_________________
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
Back to top
View user's profile Send private message
sterlingm
n00b
n00b


Joined: 09 Apr 2012
Posts: 27

PostPosted: Tue Apr 10, 2012 12:24 am    Post subject: Reply with quote

avx wrote:
Quote:
Just to mention a couple

MAKEOPTS
GENTOO_MIRRORS
INPUT_DEVICES
VIDEO_CARDS
While these things are what makes Gentoo, they aren't really needed and certainly don't help here.

sterlingm,

as root in your real system aka not chroot'ed, do
Code:
/etc/init.d/net.eth0 start
ifconfig eth0
ping -c1 google.com
and post the output here. May be, that you're only missing DNS. If `ifconfig` shows you an IP, try
Code:
echo nameserver 8.8.8.8 > /etc/resolv.conf
(that's a DNS server from Google) and then try pinging some server again.

If the r8169 module is loaded correctly, that should be about it, at least I've got the same one working without problems here.


I login with root and try /etc/init.d/net.eth0 start. It tells me -
Code:

Bringing up interface eth0
ERROR: interface eth0 does not exist
Ensure that you have loaded the correct kernel module for your hardware
ERROR: net.eth0 failed to start


When I ifconfig, it only shows lo. Okay...so I have the wrong (or no) kernel module. Where do I go to fix this? Is this something in make menuconfig that I missed? If so, what would I be looking for?
Back to top
View user's profile Send private message
avx
Advocate
Advocate


Joined: 21 Jun 2004
Posts: 2152

PostPosted: Tue Apr 10, 2012 1:09 am    Post subject: Reply with quote

If you are sure that r8169 is the driver you need for your network card, check if you've got either CONFIG_R8169=y or CONFIG_R8169=M in your kernel config by doing
Code:
grep R8169 /usr/src/linux/.config


If that still does not work, boot back into the livecd, check if you've got network connection there and if that is the case, find out which driver you need by
Code:
lspci -k -s $(lspci | awk '/Ethernet/ {print $1}')

_________________
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
Back to top
View user's profile Send private message
sterlingm
n00b
n00b


Joined: 09 Apr 2012
Posts: 27

PostPosted: Tue Apr 10, 2012 2:31 am    Post subject: Reply with quote

avx wrote:
If you are sure that r8169 is the driver you need for your network card, check if you've got either CONFIG_R8169=y or CONFIG_R8169=M in your kernel config by doing
Code:
grep R8169 /usr/src/linux/.config


If that still does not work, boot back into the livecd, check if you've got network connection there and if that is the case, find out which driver you need by
Code:
lspci -k -s $(lspci | awk '/Ethernet/ {print $1}')


When I do that it tells me CONFIG_R8169 is not set. So I try to just CONFIG_R8169=y. But that doesn't change anything. I run the grep right afterwards and it tells me again that its not set. I apologize if this is a ridiculous question, but how do I set CONFIG_R8169?
Back to top
View user's profile Send private message
avx
Advocate
Advocate


Joined: 21 Jun 2004
Posts: 2152

PostPosted: Tue Apr 10, 2012 2:37 am    Post subject: Reply with quote

Either open /usr/src/linux/.config in an editor and define it there, or `cd /usr/src/linux ; make menuconfig`

Either way, after you did that, you've got to recompile your kernel - if you just build it as a module, you can just recompile modules alone and modprobe it right away.
_________________
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
Back to top
View user's profile Send private message
sterlingm
n00b
n00b


Joined: 09 Apr 2012
Posts: 27

PostPosted: Tue Apr 10, 2012 3:16 am    Post subject: Reply with quote

Okay I am connected to the Internet, but I don't understand this.

I went into /usr/src/linux/.config, changed #CONFIG_R8169 is not set to CONFIG_R8169=y. I then tried to modprobe it and it told me it could not find the "Module r8169".

When I reboot into the livecd and do lspci -k -s $(lspci | awk '/Ethernet/ {print $1}'), it tells me
"44:00.0 Ethernes controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 03)
Subsystem: Hewlett-Packard Company Device 1423
Kernel driver in use: r8169
Kernel modules: r8169"

So I am using r8169, but it cannot find it? So what happened to allow the networking to work whenever I cannot modprobe r8169?
Back to top
View user's profile Send private message
sterlingm
n00b
n00b


Joined: 09 Apr 2012
Posts: 27

PostPosted: Tue Apr 10, 2012 4:06 am    Post subject: Reply with quote

I am nearly complete I believe. I am now trying to install and start gnome. Gnome appears to emerge fine. However, when I get to the line - /etc/init.d/dbus start - it tells me '/etc/init.d/dbus: no such file or directory.' Why would this happen? I have dbus in my USE in /etc/make.conf. The guide doesn't mention anything else about it - just put it in your USE and then call that line followed by an rc-update. I tried to just skip it and go to 'getent group plugdev'. An error does not occur, but I get no feedback (the guide says it should return plugdev:x:104:. Then whenever I exit the root and login as a user to startx, it tells me it cannot find the startx command. Does this stem from dbus?

My USE in /etc/make.conf is -

USE="mmx sse sse2 nptl nptlonly ipv6 -fortran unicode -qt4 -kde X dbus gtk gnome branding"
Back to top
View user's profile Send private message
avx
Advocate
Advocate


Joined: 21 Jun 2004
Posts: 2152

PostPosted: Tue Apr 10, 2012 10:48 am    Post subject: Reply with quote

Quote:
I went into /usr/src/linux/.config, changed #CONFIG_R8169 is not set to CONFIG_R8169=y. I then tried to modprobe it and it told me it could not find the "Module r8169".
Read again what I wrote above! This won't magically give you networking, it's just a configuration telling the kernel you want it. To really get it, you must recompile the whole kernel or build the module.

As for dbus, just wait till emerge is finished without errors, then rc-update again.
_________________
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
Back to top
View user's profile Send private message
sterlingm
n00b
n00b


Joined: 09 Apr 2012
Posts: 27

PostPosted: Tue Apr 10, 2012 2:43 pm    Post subject: Reply with quote

avx wrote:
Quote:
I went into /usr/src/linux/.config, changed #CONFIG_R8169 is not set to CONFIG_R8169=y. I then tried to modprobe it and it told me it could not find the "Module r8169".
Read again what I wrote above! This won't magically give you networking, it's just a configuration telling the kernel you want it. To really get it, you must recompile the whole kernel or build the module.

As for dbus, just wait till emerge is finished without errors, then rc-update again.


Oh, yeah I did that I just forgot to include it in the post. Whenever my computer boots, it tells me it fails to load the module r8169. Why would that be?

I tried to do rc-update add dbus, but it tells me dbus not exist. The /etc/init.d/dbus file also still does not exist. What am I waiting to finish emerge with no errors?

I thought it might be gnome so I tried to emerge gnome again, but now it won't work. The first time I tried to emerge gnome again, it told me I needed more USE. So I added all of the ones it said so my USE in make.conf now looks like this -
USE="mmx sse sse2 nptl nptlonly ipv6 -fortran unicode -qt4 -kde X dbus gtk gnome branding cdda gdu sqlite policykit cairo python consolekit jpeg"

Now, everytime I try to emerge anything now I get an error saying "econf failed" when it tries to install a dependency. I could only find one thread online and it said the solution was to just emerge gcc again...so I tried that, but I get the same error on sys-devel/bison-2.4.3!


I don't know what I did :? ...Could changing the USE have that much of an effect on emerge?
EDIT: I was informed the actual configuration error is the important part, not "econf failed". I am away from the laptop right now, but I can post that if I cannot figure it out when I can. Thanks again for all of the help so far, I'm not giving up on this :lol:
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
Goto page 1, 2  Next
Page 1 of 2

 
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