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

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
dinominant
Tux's lil' helper
Tux's lil' helper


Joined: 27 Oct 2006
Posts: 87

PostPosted: Tue Oct 01, 2013 2:47 pm    Post subject: Could not find the root block device in . Reply with quote

I'm trying to install Gentoo on one of my laptops. I've had it installed before by building the various modules into the kernel but now I'm trying to use genkernel with an initrd and I cannot get it to fully boot without intervention. When Gentoo boots, I see:

Code:
...
>> Hint: Use parameter scandelay[=seconds] if you need waiting here
>> Activating iSCSI via iBFT
iscsistart: transport class version 2.0-870. iscsid version 2.0-872
Could not get boot entry.
>> Determining root device...
Block device 802 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 root block device() ::


When I press Enter for the same, it repeats that message. So then I enter "shell" to get the emergency shell, however my block devices are detected and working because I can see /dev/sda[12] exist. So after entering the emergency shell, I immediately type "exit" to get back to the "Please specify another value..." and then I enter /dev/sda2 and the system continues booting.

In fact, I can just enter /dev/sda2 and the system will continue booting. I don't even have to enter the emergency shell. I can see it detects the /dev/sda device very early in the boot process before it starts loading lots of moduels, so why can't it find my root block device?

/etc/lilo.conf
Code:
default=3.10.12
prompt
timeout=50

boot=/dev/disk/by-id/wwn-0x50014ee258c33c18
root=/dev/disk/by-uuid/7e383317-bd97-4840-91e9-7d081b3f91f6

image=/boot/kernel-genkernel-x86_64-3.10.12
        label=3.10.12
        read-only
        append="rootdelay=15,rootfstype=ext4,real_root=UUID=7e383317-bd97-4840-91e9-7d081b3f91f6"
        initrd="/boot/initramfs-genkernel-x86_64-3.10.12"


/etc/fstab
Code:
# /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.
UUID=103ecc46-e8a2-4888-b1e1-5effd52c1826  /boot  ext4  noauto,noatime  1 2
UUID=7e383317-bd97-4840-91e9-7d081b3f91f6  /      ext4  noatime         0 1
/swap.bin                                  none   swap  sw              0 0

_________________
BTC: 18wdrw8sLtruvdwr5kB3RxbbxzjDeXUpRh
LTC: LYynwaSeBLb4gHaMnkB7NQ27H6wF3Fjyxo
Back to top
View user's profile Send private message
eyoung100
Veteran
Veteran


Joined: 23 Jan 2004
Posts: 1428

PostPosted: Tue Oct 01, 2013 6:07 pm    Post subject: Reply with quote

I hate UUID's for this reason. See this Post:
[HOWTO] UUID with Gentoo

I have a feeling you missed the --disklabel option...
_________________
The Birth and Growth of Science is the Death and Atrophy of Art -- Unknown
Registerd Linux User #363735
Adopt a Post | Strip Comments| Emerge Wrapper
Back to top
View user's profile Send private message
dinominant
Tux's lil' helper
Tux's lil' helper


Joined: 27 Oct 2006
Posts: 87

PostPosted: Tue Oct 01, 2013 6:30 pm    Post subject: Reply with quote

Hi eyoung100, did you mean to link to [HOWTO] UUID with Gentoo instead of screen visible?

My kernel was vanilla-sources-3.10.12, but I switched to gentoo-sources-3.10.13 so I could get some better support. When I built my initrd with genkernel I ran this sequence of commands:
Code:
# pwd
/usr/src/linux
# eselect kernel list
Available kernel symlink targets:
  [1]   linux-3.10.12
  [2]   linux-3.10.13-gentoo *
# genkernel --oldconfig --lvm --mdadm --e2fsprogs --iscsi --disklabel all
# make modules_install
# lilo

I even tried replacing all those UUID's with /dev/sda1 and /dev/sda2 in lilo.conf and fstab to see if it would help (and it didn't).
_________________
BTC: 18wdrw8sLtruvdwr5kB3RxbbxzjDeXUpRh
LTC: LYynwaSeBLb4gHaMnkB7NQ27H6wF3Fjyxo
Back to top
View user's profile Send private message
eyoung100
Veteran
Veteran


Joined: 23 Jan 2004
Posts: 1428

PostPosted: Tue Oct 01, 2013 6:48 pm    Post subject: Reply with quote

I did mean that one...
Lets start with a clean slate. Remove the UUID's from /etc/fstab

Boot with a live CD and post your dmesg here. Try
Code:
livecd # dmesg | grep sd

_________________
The Birth and Growth of Science is the Death and Atrophy of Art -- Unknown
Registerd Linux User #363735
Adopt a Post | Strip Comments| Emerge Wrapper
Back to top
View user's profile Send private message
dinominant
Tux's lil' helper
Tux's lil' helper


Joined: 27 Oct 2006
Posts: 87

PostPosted: Wed Oct 02, 2013 4:54 am    Post subject: Reply with quote

Code:
# dmesg | grep sd                                                                                                                                                         
[    2.766844] sd 0:0:0:0: [sda] 1250263728 512-byte logical blocks: (640 GB/596 GiB)
[    2.766876] sd 0:0:0:0: [sda] Write Protect is off
[    2.766878] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    2.766892] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    2.791469]  sda: sda1 sda2
[    2.791768] sd 0:0:0:0: [sda] Attached SCSI disk
[    4.142225] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   40.166271] sdhci: Secure Digital Host Controller Interface driver
[   40.166272] sdhci: Copyright(c) Pierre Ossman
[   40.166447] sdhci-pci 0000:03:01.1: SDHCI controller found [1180:0822] (rev 21)
[   40.199206] sdhci-pci 0000:03:01.2: SDHCI controller found [1180:0843] (rev 11)

_________________
BTC: 18wdrw8sLtruvdwr5kB3RxbbxzjDeXUpRh
LTC: LYynwaSeBLb4gHaMnkB7NQ27H6wF3Fjyxo
Back to top
View user's profile Send private message
eyoung100
Veteran
Veteran


Joined: 23 Jan 2004
Posts: 1428

PostPosted: Wed Oct 02, 2013 6:10 pm    Post subject: Reply with quote

From the livecd:
Code:
livecd #cfdisk /dev/sda <--Make sure your partition map exists
nano -w /mnt/gentoo/etc/genkernel.conf <--Edit the options


Set oldconfig to y
Set lvm to y
mdadm/raid to y
verbose to 5
menuconfig to y <-- This will allow you to compile iSCSI as built-in, along with SCSI disk support
bootloader to lilo
busybox to y <--Includes e2fsprogs

Now:
Code:
genkernel --disklabel all <--Run inside chroot


No need to make modules_install as genkernel does that with the all option
_________________
The Birth and Growth of Science is the Death and Atrophy of Art -- Unknown
Registerd Linux User #363735
Adopt a Post | Strip Comments| Emerge Wrapper
Back to top
View user's profile Send private message
dinominant
Tux's lil' helper
Tux's lil' helper


Joined: 27 Oct 2006
Posts: 87

PostPosted: Wed Oct 02, 2013 7:06 pm    Post subject: Reply with quote

OK,

Code:
# parted /dev/sda unit b print
Model: ATA WDC WD6400BEVT-0 (scsi)
Disk /dev/sda: 640135028736B
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number  Start       End            Size           Type     File system  Flags
 1      1048576B    135266303B     134217728B     primary  ext4         boot
 2      135266304B  640135028735B  639999762432B  primary  ext4
livecd ~ # mount /dev/sda2 /mnt/gentoo
livecd ~ # mount /dev/sda1 /mnt/gentoo/boot
livecd ~ # mount -t proc none /mnt/gentoo/proc
livecd ~ # mount --rbind /sys /mnt/gentoo/sys
livecd ~ # mount --rbind /dev /mnt/gentoo/dev
livecd ~ # chroot /mnt/gentoo /bin/bash
livecd / # source /etc/profile
livecd / # grep OLDCONFIG= /etc/genkernel.conf
OLDCONFIG="yes"
livecd / # grep LVM= /etc/genkernel.conf
LVM="yes"
livecd / # grep MDADM= /etc/genkernel.conf
MDADM="yes"
livecd / # grep DMRAID= /etc/genkernel.conf
DMRAID="yes"
livecd / # grep DISKLABEL= /etc/genkernel.conf
DISKLABEL="yes"
livecd / # grep LOGLEVEL= /etc/genkernel.conf
LOGLEVEL=5
livecd / # grep MENUCONFIG= /etc/genkernel.conf
MENUCONFIG="yes"
livecd / # grep BOOTLOADER= /etc/genkernel.conf
BOOTLOADER="lilo"
livecd / # grep BUSYBOX= /etc/genkernel.conf
BUSYBOX="yes"


After running the genkernel command and rebooting I still have to enter /dev/sda2 for the system to boot.
_________________
BTC: 18wdrw8sLtruvdwr5kB3RxbbxzjDeXUpRh
LTC: LYynwaSeBLb4gHaMnkB7NQ27H6wF3Fjyxo
Back to top
View user's profile Send private message
eyoung100
Veteran
Veteran


Joined: 23 Jan 2004
Posts: 1428

PostPosted: Wed Oct 02, 2013 7:28 pm    Post subject: Reply with quote

Look at this Archive

Are you using an MSDOS Based Partition Table?
_________________
The Birth and Growth of Science is the Death and Atrophy of Art -- Unknown
Registerd Linux User #363735
Adopt a Post | Strip Comments| Emerge Wrapper
Back to top
View user's profile Send private message
dinominant
Tux's lil' helper
Tux's lil' helper


Joined: 27 Oct 2006
Posts: 87

PostPosted: Thu Oct 03, 2013 12:26 am    Post subject: Reply with quote

I am using an msdos partition table. So now I changed my partition table from msdos to gpt with resize2fs and parted:

Code:
livecd ~ # parted /dev/sda unit b print
Model: ATA WDC WD6400BEVT-0 (scsi)
Disk /dev/sda: 640135028736B
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number  Start       End            Size           Type     File system  Flags
 1      1048576B    135266303B     134217728B     primary  ext4         boot
 2      135266304B  640135028735B  639999762432B  primary  ext4
Code:
livecd ~ # e2fsck -f /dev/sda2
e2fsck 1.42.7 (21-Jan-2013)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Code:
livecd ~ # resize2fs /dev/sda2 120G
resize2fs 1.42.7 (21-Jan-2013)
Resizing the filesystem on /dev/sda2 to 31457280 (4k) blocks.
The filesystem on /dev/sda2 is now 31457280 blocks long.
Code:
livecd ~ # parted /dev/sda unit b print                                   
Model: ATA WDC WD6400BEVT-0 (scsi)
Disk /dev/sda: 640135028736B
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start       End            Size           File system  Name     Flags
 1      1048576B    135266303B     134217728B     ext4         primary  boot
 2      135266304B  639999999999B  639864733696B  ext4         primary
Code:
livecd ~ # resize2fs /dev/sda2
resize2fs 1.42.7 (21-Jan-2013)
Resizing the filesystem on /dev/sda2 to 156216976 (4k) blocks.
The filesystem on /dev/sda2 is now 156216976 blocks long.
Code:
livecd ~ # mount /dev/sda2 /mnt/gentoo
livecd ~ # mount /dev/sda1 /mnt/gentoo/boot
livecd ~ # mount -t proc none /mnt/gentoo/proc
livecd ~ # mount --rbind /dev /mnt/gentoo/dev
livecd ~ # mount --rbind /sys /mnt/gentoo/sys
livecd ~ # chroot /mnt/gentoo /bin/bash
livecd / # source /etc/profile
livecd / # lilo
Warning: LBA32 addressing assumed
Added 3.10.12  +  *
One warning was issued.
livecd / # exit
exit
livecd ~ # shutdown -r now


I still had to enter /dev/sda2 for the initrd to mount my root filesystem.

Once into the fresh install I looked at the variuos labels and UUID's:

Code:
e6400 ~ # ls -l /dev/disk/by-*
/dev/disk/by-id:
total 0
lrwxrwxrwx 1 root root  9 Oct  2 20:15 ata-MATSHITA_DVD+_-RW_UJ862A_HF73_032839 -> ../../sr0
lrwxrwxrwx 1 root root  9 Oct  2 20:15 ata-WDC_WD6400BEVT-00A0RT0_WD-WX70A99H6714 -> ../../sda
lrwxrwxrwx 1 root root 10 Oct  2 20:15 ata-WDC_WD6400BEVT-00A0RT0_WD-WX70A99H6714-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Oct  2 20:15 ata-WDC_WD6400BEVT-00A0RT0_WD-WX70A99H6714-part2 -> ../../sda2
lrwxrwxrwx 1 root root  9 Oct  2 20:15 wwn-0x50014ee258c33c18 -> ../../sda
lrwxrwxrwx 1 root root 10 Oct  2 20:15 wwn-0x50014ee258c33c18-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Oct  2 20:15 wwn-0x50014ee258c33c18-part2 -> ../../sda2

/dev/disk/by-label:
total 0
lrwxrwxrwx 1 root root 9 Oct  2 20:15 Gentoo\x20Linux\x20amd64\x2020130816 -> ../../sr0

/dev/disk/by-partlabel:
total 0
lrwxrwxrwx 1 root root 10 Oct  2 20:15 primary -> ../../sda1

/dev/disk/by-partuuid:
total 0
lrwxrwxrwx 1 root root 10 Oct  2 20:15 8e677d1a-3b8d-431a-bdc4-14bae3bd8417 -> ../../sda1
lrwxrwxrwx 1 root root 10 Oct  2 20:15 d6e22428-7c67-4b5e-9a1d-eb1946e7b2d3 -> ../../sda2

/dev/disk/by-uuid:
total 0
lrwxrwxrwx 1 root root 10 Oct  2 20:15 103ecc46-e8a2-4888-b1e1-5effd52c1826 -> ../../sda1
lrwxrwxrwx 1 root root  9 Oct  2 20:15 2013-08-16-06-43-21-00 -> ../../sr0
lrwxrwxrwx 1 root root 10 Oct  2 20:15 7e383317-bd97-4840-91e9-7d081b3f91f6 -> ../../sda2


And I updated the /etc/lilo.conf to use the partuuid instead of the filesystem uuid:

Code:
default=3.10.12
prompt
timeout=50

boot=/dev/disk/by-id/wwn-0x50014ee258c33c18
root=/dev/disk/by-partuuid/d6e22428-7c67-4b5e-9a1d-eb1946e7b2d3

image=/boot/kernel-genkernel-x86_64-3.10.12
        label=3.10.12
        read-only
        append="rootdelay=15,rootfstype=ext4,real_root=UUID=d6e22428-7c67-4b5e-9a1d-eb1946e7b2d3"
        initrd="/boot/initramfs-genkernel-x86_64-3.10.12"


Then I mounted /boot, re-ran lilo, and rebooted. I still had to enter /dev/sda2 to get the genkernel initrd to continue booting.

So then I tried changing my /etc/lilo.conf so it uses real_root=PARTUUID:
Code:
default=3.10.12
prompt
timeout=50

boot=/dev/disk/by-id/wwn-0x50014ee258c33c18
root=/dev/disk/by-partuuid/d6e22428-7c67-4b5e-9a1d-eb1946e7b2d3

image=/boot/kernel-genkernel-x86_64-3.10.12
        label=3.10.12
        read-only
        append="rootdelay=15,rootfstype=ext4,real_root=PARTUUID=d6e22428-7c67-4b5e-9a1d-eb1946e7b2d3"
        initrd="/boot/initramfs-genkernel-x86_64-3.10.12"


And I still had to enter /dev/sda2 to get the genkernel initrd to continue booting. Thanks for the help on this BTW, we'll figure it out eventually :)
_________________
BTC: 18wdrw8sLtruvdwr5kB3RxbbxzjDeXUpRh
LTC: LYynwaSeBLb4gHaMnkB7NQ27H6wF3Fjyxo
Back to top
View user's profile Send private message
dinominant
Tux's lil' helper
Tux's lil' helper


Joined: 27 Oct 2006
Posts: 87

PostPosted: Thu Oct 03, 2013 12:51 am    Post subject: Reply with quote

OK, I tried booting without the genkernel initrd using the bzimage that genkernel created and it worked with root=PARTUUID:

/etc/lilo.conf
Code:
default=3.10.12
prompt
timeout=50

boot=/dev/disk/by-id/wwn-0x50014ee258c33c18
root=/dev/disk/by-partuuid/d6e22428-7c67-4b5e-9a1d-eb1946e7b2d3

image=/boot/kernel-genkernel-x86_64-3.10.12
        label=3.10.12
        read-only
        append="root=PARTUUID=d6e22428-7c67-4b5e-9a1d-eb1946e7b2d3"

image=/boot/kernel-genkernel-x86_64-3.10.12
        label=3.10.12-initrd
        read-only
        append="rootdelay=15,rootfstype=ext4,real_root=PARTUUID=d6e22428-7c67-4b5e-9a1d-eb1946e7b2d3"
        initrd="/boot/initramfs-genkernel-x86_64-3.10.12"


So, while I can boot the system it doesn't actually solve the problem of using a genkernel initrd to boot my laptop.
_________________
BTC: 18wdrw8sLtruvdwr5kB3RxbbxzjDeXUpRh
LTC: LYynwaSeBLb4gHaMnkB7NQ27H6wF3Fjyxo
Back to top
View user's profile Send private message
Eusaphious
n00b
n00b


Joined: 12 Dec 2006
Posts: 17

PostPosted: Sat Mar 08, 2014 7:25 am    Post subject: Reply with quote

I ran into a similar issue while trying to get a diskless node booting via ipxe + iscsi.

On boot the system would fail at connecting to the iscsi target:

Code:
Activating iSCSI via iBFT
iscsistart: transport class version 2.0-870. iscsid version 2.0-872
Could not get boot entry.


In my case the iscsi device was not mounted but I was able to drop into the shell and mount it manually with iscsistart cmd and then continue booting the rest of the system normally.

What I found was that I had missed a kernel option for iBFT. The iscsi_ibft driver is at / -> Firmware Drivers -> iSCSI Boot Firmware Table Attributes. After selecting this and recompile of the kernel the system connected to the iscsi target automatically on next boot.
Back to top
View user's profile Send private message
Pednick
n00b
n00b


Joined: 19 Nov 2014
Posts: 19

PostPosted: Sun Dec 21, 2014 5:09 pm    Post subject: Reply with quote

That's strange, I installed Gentoo to an external usb harddrive dock and I get the "Determining root device...
!! Could not find the root block device in UUID=..." during bootup, The strange thing is if I load the liveDVD back in my drive, then it boots all the way fine.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun Dec 21, 2014 8:31 pm    Post subject: Reply with quote

Pednick,

USB booting has a few wrinkles.

Normally, root is mounted before USB is initalised. That means that mouting root has already failed before USB gets started.
You need a delay before root is mounted to get USB started.

Provided you do not use an initrd, the kernel parameter rootdelay=X gets you going. A value of X about 7, thats seconds, works on most hardware.
Older hardware may need up to 30 seconds.

If you are an initrd user, the delay needs te be in the init script in the initrd, since waiting to mount the initrd as the root filesystem does not help at all.
_________________
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
Pednick
n00b
n00b


Joined: 19 Nov 2014
Posts: 19

PostPosted: Sun Dec 21, 2014 10:43 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Pednick,

USB booting has a few wrinkles.

Normally, root is mounted before USB is initalised. That means that mouting root has already failed before USB gets started.
You need a delay before root is mounted to get USB started.

Provided you do not use an initrd, the kernel parameter rootdelay=X gets you going. A value of X about 7, thats seconds, works on most hardware.
Older hardware may need up to 30 seconds.

If you are an initrd user, the delay needs te be in the init script in the initrd, since waiting to mount the initrd as the root filesystem does not help at all.


Thanks for the suggestion, I'll try that, I screwed up today trying to install gallium-nine mesa and wine, so reinstalling right now, trying dos instead of gpt too as my partitioning, also found out forgot to install firmware.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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