View previous topic :: View next topic |
Author |
Message |
degras Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/709161560458452a52c18c.gif)
Joined: 05 Jan 2006 Posts: 460
|
Posted: Mon Aug 31, 2009 2:18 pm Post subject: Block device /dev/sda3 is not a valid root device [SOLVED] |
|
|
After updating the kernel and using genkernel I get the following message after booting my machine.
Code: | >> Determening root device
>> Block device /dev/sda3 is not a valid root device...
>> Could not find the root block device in .
Please specify a device to boot, or "shell" for a shell..
boot() :: |
I think I forgot a step or steps.
Last edited by degras on Mon Sep 28, 2009 6:49 pm; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
d2_racing Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/1190120345458c61e31ec3c.jpg)
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Mon Aug 31, 2009 2:26 pm Post subject: |
|
|
Hi, can you boot from a LiveCD, chroot your box and post this :
Code: |
# fdisk -l
# cat /etc/fstab
# cat /boot/grub/grub.conf
|
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
degras Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/709161560458452a52c18c.gif)
Joined: 05 Jan 2006 Posts: 460
|
Posted: Mon Aug 31, 2009 3:04 pm Post subject: |
|
|
d2_racing wrote: | Hi, can you boot from a LiveCD, chroot your box and post this :
Code: |
# fdisk -l
# cat /etc/fstab
# cat /boot/grub/grub.conf
|
|
I booted from a liveCD, how do I chroot to my box? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bobspencer123 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/1654067861444cbc0a199f9.jpg)
Joined: 19 Dec 2005 Posts: 544
|
Posted: Mon Aug 31, 2009 3:50 pm Post subject: |
|
|
this should do it for you:
Code: |
# mount /dev/sdxy /mnt/gentoo
[where "x" is the letter of your / partition and "y" is the number .. typically sda3 if you followed handbook]
# mount -t proc none /mnt/gentoo/proc
# mount -o bind /dev /mnt/gentoo/dev
# chroot /mnt/gentoo /bin/bash
# env-update && source /etc/profile
|
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
degras Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/709161560458452a52c18c.gif)
Joined: 05 Jan 2006 Posts: 460
|
Posted: Mon Aug 31, 2009 4:02 pm Post subject: |
|
|
bobspencer123 wrote: | this should do it for you:
Code: |
# mount /dev/sdxy /mnt/gentoo
[where "x" is the letter of your / partition and "y" is the number .. typically sda3 if you followed handbook]
# mount -t proc none /mnt/gentoo/proc
# mount -o bind /dev /mnt/gentoo/dev
# chroot /mnt/gentoo /bin/bash
# env-update && source /etc/profile
|
|
Oh dear, I need to be root to mount, but when I su to root it won't accept the usual password,
is the root password different for the liveCD ? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bobspencer123 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/1654067861444cbc0a199f9.jpg)
Joined: 19 Dec 2005 Posts: 544
|
Posted: Mon Aug 31, 2009 4:12 pm Post subject: |
|
|
you are automagically root ... no su'ing needed.
Just issue commands as listed. (obviously leaving out the # ...) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Roman_Gruber Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 03 Oct 2006 Posts: 3846 Location: Austro Bavaria
|
Posted: Mon Aug 31, 2009 4:20 pm Post subject: |
|
|
hi
in grub.conf or menu.lst in /boot/grub check this out
title bla bla
root (hd0,0)
kernel .... realroot
realroot must point to your boot partition not your root partition dont forget
e.g. working old setup
title 2.6.30-tuxonice-r4_27_July_2009_r2
root(hd0,0)
kernel /2.6.30-tuxonice-r4_27_July_2009_r2 resume=swap:/dev/sdb5 fastboot
title 2.6.30-tuxonice-r4_a
root(hd0,0)
kernel /2.6.30-tuxonice-r4_a resume=swap:/dev/sdb5
or really failsafe
title /2.6.29-tuxonice-r2_26_May mit powertop unterstuetzung
root(hd0,0)
kernel /2.6.29-tuxonice-r2_26_May realroot=/dev/sda5 resume=swap:/dev/sdb5 vga=0x37c fastboot |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
degras Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/709161560458452a52c18c.gif)
Joined: 05 Jan 2006 Posts: 460
|
Posted: Mon Aug 31, 2009 4:24 pm Post subject: |
|
|
OK, I issued the commands, but after rebooting I still get the message:
Code: | >> Determening root device
>> Block device /dev/sda3 is not a valid root device...
>> Could not find the root block device in .
Please specify a device to boot, or "shell" for a shell..
boot() :: |
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
signal11 n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/15079155453ea71c3be6a55.gif)
Joined: 16 Mar 2003 Posts: 46
|
Posted: Mon Aug 31, 2009 4:37 pm Post subject: |
|
|
degras wrote: | OK, I issued the commands, but after rebooting I still get the message:
Code: | >> Determening root device
>> Block device /dev/sda3 is not a valid root device...
>> Could not find the root block device in .
Please specify a device to boot, or "shell" for a shell..
boot() :: |
|
it's a long shot, but did you create your root file-system on some other device ? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
degras Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/709161560458452a52c18c.gif)
Joined: 05 Jan 2006 Posts: 460
|
Posted: Mon Aug 31, 2009 5:41 pm Post subject: |
|
|
tw04l124 wrote: | hi
in grub.conf or menu.lst in /boot/grub check this out
|
In this shell I don't have /boot directory. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bobspencer123 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/1654067861444cbc0a199f9.jpg)
Joined: 19 Dec 2005 Posts: 544
|
Posted: Mon Aug 31, 2009 5:45 pm Post subject: |
|
|
after you chroot (as per the instructions above)
you need to provide us with the output of the originally requested command:
Code: |
# fdisk -l
# cat /etc/fstab
# cat /boot/grub/grub.conf
|
those are three distinct commands which should spit out some information for us. So execute each one ... and then post the result for us. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
signal11 n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/15079155453ea71c3be6a55.gif)
Joined: 16 Mar 2003 Posts: 46
|
Posted: Mon Aug 31, 2009 5:49 pm Post subject: |
|
|
degras wrote: | tw04l124 wrote: | hi
in grub.conf or menu.lst in /boot/grub check this out
|
In this shell I don't have /boot directory. |
you need to mount /boot somewhere. for example, assume that you have 3 partitions as follows:
/dev/sda1 (is boot-device)
/dev/sda2 (is swap)
/dev/sda3 (is root-file-system)
then you can do the following (after you have booted the machine with the live-cd)
Code: | mount /dev/sda3 /mnt/gentoo (no need to explicitly supply the file-system type)
mkdir -p /mnt/gentoo/boot (create /mnt/gentoo/boot if not present already)
mount /dev/sda1 /mnt/gentoo/boot
|
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
degras Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/709161560458452a52c18c.gif)
Joined: 05 Jan 2006 Posts: 460
|
Posted: Mon Aug 31, 2009 7:21 pm Post subject: |
|
|
bobspencer123 wrote: | after you chroot (as per the instructions above)
you need to provide us with the output of the originally requested command:
...
those are three distinct commands which should spit out some information for us. So execute each one ... and then post the result for us. |
OK, here are the results:
Code: |
livecd / # fdisk -l
Disk /dev/sda: 81.9 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00042e91
Device Boot Start End Blocks Id System
/dev/sda1 * 1 5 40131 83 Linux
/dev/sda2 6 68 506047+ 82 Linux swap / Solaris
/dev/sda3 69 9964 79489620 83 Linux
livecd / # cat /etc/fstab
# /etc/fstab: static file system information.
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed; notail increases performance of ReiserFS (at the expense of storage
# efficiency). It's safe to drop the noatime options if you want and to
# switch between notail / tail freely.
#
# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# See the manpage fstab(5) for more information.
#
# <fs> <mountpoint> <type> <opts> <dump/pass>
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/sda1 /boot ext2 noauto,noatime 1 2
/dev/sda3 / ext3 noatime 0 1
/dev/sda2 none swap sw 0 0
/dev/cdrom /mnt/cdrom auto noauto,ro 0 0
#/dev/fd0 /mnt/floppy auto noauto 0 0
# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
# use almost no memory if not populated with files)
shm /dev/shm tmpfs nodev,nosuid,noexec 0 0
livecd / # cat /boot/grub/grub.conf
cat: /boot/grub/grub.conf: No such file or directory
|
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bobspencer123 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/1654067861444cbc0a199f9.jpg)
Joined: 19 Dec 2005 Posts: 544
|
Posted: Mon Aug 31, 2009 7:36 pm Post subject: |
|
|
ok ... now to get the command: cat /boot/grub/grub.conf ...... to work
I need to modify my chroot directions slightly:
Code: |
# mount /dev/sda3 /mnt/gentoo
# mkdir /mnt/gentoo/boot
# mount /dev/sda1 /mnt/gentoo/boot
# mount -t proc none /mnt/gentoo/proc
# mount -o bind /dev /mnt/gentoo/dev
# chroot /mnt/gentoo /bin/bash
# env-update && source /etc/profile
|
now:
Code: |
cat /boot/grub/grub.conf
|
edit: also have a look at this page of the handbook for instructions on editing grub for a genkernel based kernel install. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
degras Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/709161560458452a52c18c.gif)
Joined: 05 Jan 2006 Posts: 460
|
Posted: Mon Aug 31, 2009 7:45 pm Post subject: |
|
|
bobspencer123 wrote: | ok ... now to get the command: cat /boot/grub/grub.conf ...... to work
I need to modify my chroot directions slightly:
...
|
the cat command worked this time, now what:
Code: |
livecd / # env-update && source /etc/profile
--- Invalid atom in /etc/portage/package.mask: dev-util/scons-0.98.3
>>> Regenerating /etc/ld.so.cache...
livecd / # cat /boot/grub/grub.conf
default 30
timeout 0
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
title=Gentoo Linux (2.6.23-gentoo-r8)
root (hd0,0)
kernel /boot/kernel-genkernel-x86_64-2.6.23-gentoo-r8 root=/dev/ram0 init=linuxrc ramdisk=8192 real_root=/dev/sda3
initrd /boot/initramfs-genkernel-x86_64-2.6.23-gentoo-r8
title=Gentoo Linux 2.6.22
root (hd0,0)
kernel /boot/kernel-genkernel-x86_64-2.6.22-gentoo-r9 root=/dev/ram0 init=linuxrc ramdisk=8192 real_root=/dev/sda3
initrd /boot/initramfs-genkernel-x86_64-2.6.22-gentoo-r9
title=Gentoo Linux 2.6 rescue
root (hd0,0)
kernel /boot/kernel-genkernel-x86_64-2.6.22-gentoo-r9 root=/dev/ram0 init=linuxrc ramdisk=8192 real_root=/dev/sda3
initrd /boot/initramfs-genkernel-x86_64-2.6.22-gentoo-r9
|
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bobspencer123 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/1654067861444cbc0a199f9.jpg)
Joined: 19 Dec 2005 Posts: 544
|
Posted: Mon Aug 31, 2009 7:53 pm Post subject: |
|
|
can you now post the output of (while chrooted)
Code: |
ls /boot/kernel* /boot/initramfs*
|
edit:
and
also here is a helpful guide for upgrading kernel and genkernel |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
degras Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/709161560458452a52c18c.gif)
Joined: 05 Jan 2006 Posts: 460
|
Posted: Mon Aug 31, 2009 7:58 pm Post subject: |
|
|
bobspencer123 wrote: | can you now post the output of (while chrooted)
...
|
OK
Code: | livecd / # ls /boot/kernel* /boot/initramfs*
/boot/initramfs-genkernel-x86_64-2.6.22-gentoo-r9
/boot/initramfs-genkernel-x86_64-2.6.23-gentoo-r8
/boot/kernel-genkernel-x86_64-2.6.22-gentoo-r9
/boot/kernel-genkernel-x86_64-2.6.23-gentoo-r8
livecd / # ls -all /usr/src
total 20
drwxr-xr-x 5 root root 4096 Aug 30 22:26 .
drwxr-xr-x 16 root root 4096 Jun 15 2008 ..
-rw-r--r-- 1 root root 0 Apr 17 2007 .keep
lrwxrwxrwx 1 root root 22 Aug 30 22:26 linux -> linux-2.6.23-gentoo-r8
drwxr-xr-x 19 root root 4096 Feb 7 2008 linux-2.6.22-gentoo-r9
drwxr-xr-x 19 root root 4096 Dec 22 2007 linux-2.6.23-gentoo-r3
drwxr-xr-x 20 root root 4096 Aug 30 23:27 linux-2.6.23-gentoo-r8
|
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bobspencer123 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/1654067861444cbc0a199f9.jpg)
Joined: 19 Dec 2005 Posts: 544
|
Posted: Tue Sep 01, 2009 12:32 am Post subject: |
|
|
My untrained eye can't find any blatant errors with any of your config settings.
Hopefully someone else has some ideas. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Roman_Gruber Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 03 Oct 2006 Posts: 3846 Location: Austro Bavaria
|
Posted: Tue Sep 01, 2009 10:07 am Post subject: |
|
|
well some idea, if you cant boot.
backup your /usr/src/linux/.config
This file is your kernel config, safe it somewhere safe.
then emerge genkernel and make a genkernel kernel
try, if you are able to boot into your system with a genkernel kernel |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
gatonero n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/5935710814a9e17732f78e.jpg)
Joined: 01 Sep 2009 Posts: 5 Location: Aachen
|
Posted: Wed Sep 02, 2009 12:02 am Post subject: |
|
|
Today I got the same error. My mistake is, that I formated all partitions with ext3 and didn't adapt /etc/fstab. So I will follow your chroot instructions tomorrow and hopefully fix that error. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
gatonero n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/5935710814a9e17732f78e.jpg)
Joined: 01 Sep 2009 Posts: 5 Location: Aachen
|
Posted: Wed Sep 02, 2009 6:55 am Post subject: |
|
|
As I presumed, my /etc/fstab wasn't correct. Now my system is still looking for /dev/sda3 while it is /dev/hda3. But after entering at the prompt /dev/hda3 the system boots and I am able to login. Now I am searching where I have to change from /dev/sda3 to /dev/hda3. /etc/fstab is correct. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
d2_racing Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/1190120345458c61e31ec3c.jpg)
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Wed Sep 02, 2009 12:07 pm Post subject: |
|
|
It's inside /boot/grub/grub.conf |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
gatonero n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/5935710814a9e17732f78e.jpg)
Joined: 01 Sep 2009 Posts: 5 Location: Aachen
|
Posted: Wed Sep 02, 2009 5:23 pm Post subject: |
|
|
Thank You, exactly that was the reason. Now I have a very basic gentoo installation in a virtualbox. I will collect some experiences for installing it later as my main system. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
d2_racing Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/1190120345458c61e31ec3c.jpg)
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Wed Sep 02, 2009 10:34 pm Post subject: |
|
|
Good luck ![Razz :P](images/smiles/icon_razz.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
degras Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/709161560458452a52c18c.gif)
Joined: 05 Jan 2006 Posts: 460
|
Posted: Thu Sep 03, 2009 2:23 pm Post subject: |
|
|
I typed:
Code: | livecd gentoo # mount /dev/sda3 /mnt/gentoo
livecd gentoo # mkdir /mnt/gentoo/boot
mkdir: cannot create directory `/mnt/gentoo/boot': File exists
livecd gentoo # mount /dev/sda1 /mnt/gentoo/boot
livecd gentoo # mount -t proc none /mnt/gentoo/proc
livecd gentoo # mount -o bind /dev /mnt/gentoo/dev
livecd gentoo # chroot /mnt/gentoo /bin/bash
livecd / # env-update && source /etc/profile
--- Invalid atom in /etc/portage/package.mask: dev-util/scons-0.98.3
>>> Regenerating /etc/ld.so.cache...
livecd / # emerge -Dup world
--- Invalid atom in /etc/portage/package.mask: dev-util/scons-0.98.3
These are the packages that would be merged, in order:
Calculating world dependencies /
!!! All ebuilds that could satisfy "sys-apps/man-pages-posix" have been masked.
!!! One of the following masked packages is required to complete your request:
- sys-apps/man-pages-posix-2003a (masked by: ~amd64 keyword)
For more information, see MASKED PACKAGES section in the emerge man page or
refer to the Gentoo Handbook.
(dependency required by "sys-apps/man-pages-3.00" [ebuild])
!!! Problem resolving dependencies for sys-apps/man-pages
!!! Depgraph creation failed.
livecd / # emerge -u gentoo-sources
...
!!! Couldn't download 'genpatches-2.6.24-9.base.tar.bz2'. Aborting.
* Fetch failed for 'sys-kernel/gentoo-sources-2.6.24-r8'
!!! can't process invalid log file: merge.ERROR
|
Oh dear, what next ? Somebody help please!
...
I had to reinstall gentoo. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|