Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
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 Installing Gentoo
View previous topic :: View next topic  
Author Message
LoTeK
Apprentice
Apprentice


Joined: 26 Jul 2012
Posts: 270

PostPosted: Mon Aug 27, 2012 12:26 pm    Post subject: block device /dev/sda3 is not a valid root device... Reply with quote

hi
i've installed gentoo with genkernel (after i did it with manual configuration and lvm,gpt and i didnt worked :-) ) and now i get the message:
...
Code:

>>Determining root device..
!! Block device /dev/sda3 is not a valid root device...
!! could not find the root block device in .


i googled about the problem and it seems to be very common, but the tipps dont work for me.

Code:
 fdisk -l /dev/sda
Disk /dev/sda: 128.0 GB, 128035676160 bytes
255 heads, 63 sectors/track, 15566 cylinders, total 250069680 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0002f290

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      616447      307200   83  Linux
/dev/sda2          616448     9005055     4194304   82  Linux swap / Solaris
/dev/sda3         9005056   250069679   120532312   83  Linux

fdisk -l /dev/sdb
Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00038184

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048    41945087    20971520   83  Linux
/dev/sdb2        41945088    83888127    20971520   83  Linux
/dev/sdb3        83888128  3907029167  1911570520   83  Linux

fstab:
# <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/sda2      none      swap      sw      0 0
/dev/sda3      /      ext4      defaults   0 1

/dev/sdb1      /var      ext4      noatime      0 1
/dev/sdb2       /tmp      ext4      noatime      0 1
/dev/sdb3      /home      ext4      noatime      0 1

/dev/cdrom      /mnt/cdrom   auto      noauto,ro   0 0
#/dev/fd0      /mnt/floppy   auto      noauto      0 0

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

title Gentoo Linux Kernel 3.4.9
root (hd0,0)
kernel /boot/kernel-genkernel-x86_64-3.4.9-gentoo root=/dev/ram0 root=/dev/sda3 udev
initrd /boot/initramfs-genkernel-x86_64-3.4.9-gentoo

# vim:ft=conf:

Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1600
Location: US

PostPosted: Mon Aug 27, 2012 12:56 pm    Post subject: Reply with quote

LoTeK.

Welcome to gentoo :D

First. did you compile in-kernel support for the ext4 file system :?:

If so try root=/dev/ram0 real_root=/dev/sda3 rootfstype=ext4
_________________
Good luck :wink:

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


Joined: 26 Jul 2012
Posts: 270

PostPosted: Mon Aug 27, 2012 1:24 pm    Post subject: Reply with quote

thank you! i think i have finally found my distro:-)

isn't with genkernel all possible support compiled?

root=/dev/ram0 real_root=/dev/sda3 rootfstype=ext4 don't work, so i have to recompile my kernel manually?
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1600
Location: US

PostPosted: Mon Aug 27, 2012 1:49 pm    Post subject: Reply with quote

LoTeK,

I use the make && make modules_install method so I'm not sure about genkernel. I think genkernel uses a .config in a different location - not /usr/src/linux so I'm not exactly sure what the default configuration is. However, the genkernel .config should be identical to how the Installation CD kernel is configured - some I'm a little stumped here. These are my settings:


│ │ <*> Second extended fs support │ │
│ │ [*] Ext2 extended attributes │ │
│ │ [*] Ext2 POSIX Access Control Lists │ │
│ │ [ ] Ext2 Security Labels │ │
│ │ [ ] Ext2 execute in place support │ │
│ │ <*> Ext3 journalling file system support │ │
│ │ [*] Default to 'data=ordered' in ext3 │ │
│ │ [*] Ext3 extended attributes │ │
│ │ [ ] Ext3 POSIX Access Control Lists │ │
│ │ [ ] Ext3 Security Labels │ │
│ │ <*> The Extended 4 (ext4) filesystem │ │
│ │ [*] Ext4 extended attributes │ │
│ │ [*] Ext4 POSIX Access Control Lists │ │
│ │

I would wait until someone else can chime in with some assistance before making any changes or compiling manually :wink:
_________________
Good luck :wink:

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


Joined: 09 Dec 2006
Posts: 6754
Location: Goose Creek SC

PostPosted: Mon Aug 27, 2012 3:26 pm    Post subject: Reply with quote

try a slight change to grub.conf

title Gentoo Linux Kernel 3.4.9
root (hd0,0)
kernel /boot/kernel-genkernel-x86_64-3.4.9-gentoo root=/dev/ram0 real_root=/dev/sda3 udev
initrd /boot/initramfs-genkernel-x86_64-3.4.9-gentoo

BTW
Code:
genkernel --menuconfig all
will allow you to effect changes to the config within the genkernel framework. current preferred config for extfs if ext4fs is in use:
Quote:
< > Second extended fs support
< > Ext3 journalling file system support
<*> The Extended 4 (ext4) filesystem
[*] Use ext4 for ext2/ext3 file systems (NEW)
[*] Ext4 extended attributes (NEW)

_________________
Defund the FCC.
Back to top
View user's profile Send private message
LoTeK
Apprentice
Apprentice


Joined: 26 Jul 2012
Posts: 270

PostPosted: Mon Aug 27, 2012 8:20 pm    Post subject: Reply with quote

i've tried:
kernel /boot/kernel-genkernel-x86_64-3.4.9-gentoo root=/dev/ram0 real_root=/dev/sda3 udev
but it won't work either, so i've reinstalled my system with genkernel --menuconfig all and ext4 support was enabled by default. i thought my system couldn't boot because i have /var on a separate partition and with initramfs is something wrong.
but after the reinstallation i've get a kernel panic:
kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)

on my laptop i've installed linux mint and after that gentoo without a bootloader (all other settings are the same, genkernel etc) and it all works, so my error must be in the grub.conf?!
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 6754
Location: Goose Creek SC

PostPosted: Mon Aug 27, 2012 9:41 pm    Post subject: Reply with quote

Quote:
VFS: Unable to mount root fs on unknown-block(1,0)
says your grub.conf is telling the machine to load root from a ramdisk but there is no ram disk.
can you post your current grub.conf?
boot cd, mount gentoo partitions, nominally
Code:
mount /dev/sda3 /mnt/gentoo
mount /dev/sda1 /mnt/gentoo/boot
cat /mnt/gentoo/boot/grub/grub.conf

while you are at it:
Code:
fdisk -l
ls /mnt/gentoo/boot
and post results
_________________
Defund the FCC.
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 6754
Location: Goose Creek SC

PostPosted: Mon Aug 27, 2012 11:13 pm    Post subject: Reply with quote

alternative method, perhaps easier, definitely accurate
boot cd, enter chroot, nominally:
Code:
mount /dev/sda3 /mnt/gentoo
mount /dev/sda1 /mnt/gentoo/boot
cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
mount -t proc none /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile
export PS1="(chroot) $PS1"
then
Code:
emerge wgetpaste
fdisk -l | wgetpaste
wgetpaste /boot/grub/grub.conf
ls-l /boot | wgetpaste
post the url's returned
_________________
Defund the FCC.
Back to top
View user's profile Send private message
LoTeK
Apprentice
Apprentice


Joined: 26 Jul 2012
Posts: 270

PostPosted: Tue Aug 28, 2012 10:01 am    Post subject: Reply with quote

grub.conf:

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

    title Gentoo Linux Kernel 3.4.9
    root (hd0,0)
    kernel /boot/kernel-genkernel-x86_64-3.4.9-gentoo root=/dev/ram0 real_root=/dev/sda3
    #initrd /boot/initramfs-genkernel-x86-2.6.24-gentoo-r5

    # vim:ft=conf:

fdisk -l /dev/sda:

    Disk /dev/sda: 128.0 GB, 128035676160 bytes
    255 heads, 63 sectors/track, 15566 cylinders, total 250069680 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x0002f290

    Device Boot Start End Blocks Id System
    /dev/sda1 * 2048 616447 307200 83 Linux
    /dev/sda2 616448 9005055 4194304 82 Linux swap / Solaris
    /dev/sda3 9005056 250069679 120532312 83 Linux

ls /mnt/gentoo/boot:

    System.map-genkernel-x86_64-3.4.9-gentoo
    boot
    grub
    kernel-genkernel-x86_64-3.4.9-gentoo
    lost+found


after that i deleted "root=/dev/ram0" in the grub.conf but i get the same kernel panic
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 6754
Location: Goose Creek SC

PostPosted: Tue Aug 28, 2012 1:57 pm    Post subject: Reply with quote

Code:
genkernel all
and
Code:
genkernel --menuconfig all
Each of these commands install 3 files in /boot; kernel, initramfs, and system map.
Your /boot contains kernel-genkernel-x86_64-3.4.9-gentoo and System.map-genkernel-x86_64-3.4.9-gentoo but not initramfs-genkernel-x86_64-3.4.9-gentoo.
Do you know why there is no initramfs-genkernel-x86_64-3.4.9-gentoo? possibilities: error during genkernel all, made but deleted, genkernel command used without the all,

Unless genkernel --menuconfig is used and the menuconfig heavily edited; a genkernel kernel will not boot but will panic. As I understand your genkernel kernel, initramfs-genkernel-x86_64-3.4.9-gentoo is needed and your grub.conf needs the initrd /boot/initramfs-genkernel-x86_64-3.4.9-gentoo line.

Because grub.conf does not include an initrd line no attempt is made to create a ramdisk. kernel /boot/kernel-genkernel-x86_64-3.4.9-gentoo causes the kernel to load and start but the option phrase root=/dev/ram0 tries to transfer to a root file system in a nonexisting ramdisk.

Bottom line: you need a valid initramfs in /boot and a valid initrd line in grub.conf

Suggest, from the chroot:
Code:
genkernel all
watch for errors, when complete
Code:
 ls /boot
check for kernel-genkernel-x86_64-3.4.9-gentoo, initramfs-genkernel-x86_64-3.4.9-gentoo, and System.map-genkernel-x86_64-3.4.9-gentoo .
Code:
nano /boot/grub/grub.conf
edit to look like
Quote:
default 0
timeout 5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title Gentoo Linux Kernel 3.4.9
root (hd0,0)
kernel /boot/kernel-genkernel-x86_64-3.4.9-gentoo root=/dev/ram0 real_root=/dev/sda3
initrd /boot/initramfs-genkernel-x86_64-3.4.9-gentoo
names in grub.conf must be letter for letter match to those in /boot.
then
Code:
exit
reboot

_________________
Defund the FCC.
Back to top
View user's profile Send private message
LoTeK
Apprentice
Apprentice


Joined: 26 Jul 2012
Posts: 270

PostPosted: Tue Aug 28, 2012 2:38 pm    Post subject: Reply with quote

i've run:
Code:
genkernel all

and again initramfs isn't created!
output of cat /var/log/genkernel.log | grep -i error:
Code:
Enable recovery from hardware memory errors (MEMORY_FAILURE) [N/y/?] n
  Hardware Error Device (ACPI_HED) [N/m/y/?] n
  Boottime Graphics Resource Table support (ACPI_BGRT) [N/m/y/?] (NEW)   ACPI Platform Error Interface (APEI) (ACPI_APEI) [N/y/?] n
    Root Port Advanced Error Reporting support (PCIEAER) [Y/n/?] y
      PCIe AER error injector support (PCIEAER_INJECT) [N/m/y/?] n
  Verbose ATA error reporting (ATA_VERBOSE_ERROR) [Y/n/?] y
CPU notifier error injection module (CPU_NOTIFIER_ERROR_INJECT) [N/m/y/?] n
  CC      drivers/acpi/acpica/utxferror.o
  CC      drivers/scsi/scsi_error.o
  CC      fs/xfs/xfs_error.o
  CC [M]  net/9p/error.o
  CC [M]  net/rxrpc/ar-error.o
cc1: warnings being treated as errors
drivers/scsi/lpfc/lpfc_scsi.c:1900:11: error: unused variable 'rc'
drivers/scsi/lpfc/lpfc_scsi.c:2037:11: error: unused variable 'rc'
drivers/scsi/lpfc/lpfc_scsi.c:2256:11: error: unused variable 'rc'
drivers/scsi/lpfc/lpfc_scsi.c:2386:11: error: unused variable 'rc'
make[3]: *** [drivers/scsi/lpfc/lpfc_scsi.o] Error 1
make[2]: *** [drivers/scsi/lpfc] Error 2
make[1]: *** [drivers/scsi] Error 2
make: *** [drivers] Error 2
* ERROR: Failed to compile the "modules" target...
* errors that were reported above.

i've checked the boot partition from my laptop and initramfs is created!
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 6754
Location: Goose Creek SC

PostPosted: Tue Aug 28, 2012 2:59 pm    Post subject: Reply with quote

boot cd, enter chroot:
Code:
genkernel --menuconfig all

edit to
Quote:
:Device Drivers --->
SCSI device support --->
[*] SCSI low-level drivers --->
< > Emulex LightPulse Fibre Channel Support
or, preferred if no scsi controller on board
Quote:
Device Drivers --->
SCSI device support --->
[ ] SCSI low-level drivers --->
exit saving your configuration and reboot
_________________
Defund the FCC.
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1600
Location: US

PostPosted: Tue Aug 28, 2012 3:13 pm    Post subject: Reply with quote

LoTeK, If all else fails try this:

Copy the config file that genkernel is using to /usr/src/linux/.config Then
Code:
make menuconfig

In General Setup unset
Code:
[ ] Initial RAM filesystem and RAM disk (initramfs/initrd) support

Make sure these are set:
Symbol: DEVTMPFS [=y] │
│ Type : boolean │
│ Prompt: Maintain a devtmpfs filesystem to mount at /dev │
│ Defined at drivers/base/Kconfig:24 │
│ Depends on: HOTPLUG [=y] │
│ Location: │
│ -> Device Drivers │
│ -> Generic Driver Options │
│ │
│ │
│ Symbol: DEVTMPFS_MOUNT [=y] │
│ Type : boolean │
│ Prompt: Automount devtmpfs at /dev, after the kernel mounted the rootfs │
│ Defined at drivers/base/Kconfig:44 │
│ Depends on: DEVTMPFS [=y] │
│ Location: │
│ -> Device Drivers │
│ -> Generic Driver Options │
│ -> Maintain a devtmpfs filesystem to mount at /dev (DEVTMPFS [=y]) │

Exit and save the .config, make sure /boot is mounted then
Code:
make mrproper && make && make modules_install
cp -v /usr/src/linux/arch/x86_64/boot/bzImage /boot/kernel-3.4.9-gentoo

Naturally, you're going to adjust the kernel name. In grub.conf remove the initrd line
_________________
Good luck :wink:

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


Joined: 09 Dec 2006
Posts: 6754
Location: Goose Creek SC

PostPosted: Tue Aug 28, 2012 3:44 pm    Post subject: Reply with quote

@lotek
found it, thought i read about lpfc/genkernel problem before
https://forums.gentoo.org/viewtopic-t-934434-highlight-lpfc.html refers
_________________
Defund the FCC.
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 6754
Location: Goose Creek SC

PostPosted: Tue Aug 28, 2012 3:54 pm    Post subject: Reply with quote

oops duplicate
_________________
Defund the FCC.


Last edited by DONAHUE on Tue Aug 28, 2012 5:19 pm; edited 1 time in total
Back to top
View user's profile Send private message
LoTeK
Apprentice
Apprentice


Joined: 26 Jul 2012
Posts: 270

PostPosted: Tue Aug 28, 2012 5:15 pm    Post subject: Reply with quote

thank you both very much..!! my system finally boots without problems!!!
@DONAHUE:
i did
Code:
:Device Drivers --->
SCSI device support --->
[*] SCSI low-level drivers --->
<> Emulex LightPulse Fibre Channel Support

btw how can i figure out if an scsi controller on board? :oops:

@BillWho:
i'll try your suggestion as soon as i'll reinstall my system without genkernel and gpt,lvm when i'm a little bit more experienced:-)

should i'll mark the thread as solved? the initialproblem isn't solved but the bootproblem is...
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 6754
Location: Goose Creek SC

PostPosted: Tue Aug 28, 2012 5:24 pm    Post subject: Reply with quote

lspci will give a list of devices, look for scsi
user manual for motherboard and/or computer, look for scsi
scsi gets bragged about and costs lots more
_________________
Defund the FCC.


Last edited by DONAHUE on Sun Nov 10, 2013 5:27 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: Tue Aug 28, 2012 5:35 pm    Post subject: Reply with quote

LoTeK,

Glad to hear you got it going :D

Since you got past the "block device /dev/sda3 is not a valid root device" it's probably best to close it.

You can always revisit the lvm,gpt problem at a later date :wink:
_________________
Good luck :wink:

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


Joined: 09 Dec 2006
Posts: 6754
Location: Goose Creek SC

PostPosted: Tue Aug 28, 2012 6:03 pm    Post subject: Reply with quote

@LoTeK
sent you a private message about future plans, check header bar.
_________________
Defund the FCC.
Back to top
View user's profile Send private message
jrussia
Tux's lil' helper
Tux's lil' helper


Joined: 29 Aug 2012
Posts: 89
Location: Chicago

PostPosted: Wed Aug 29, 2012 5:34 pm    Post subject: Reply with quote

http://www.gentoo.org/doc/en/kernel-config.xml

Section 3 - Common problems and areas of confusion

"Most modern desktop systems ship with storage devices (hard disk and CD/DVD drives) on a Serial ATA bus, rather than the older IDE (ribbon cable) bus type.

SATA support in Linux is implemented in a layer referred to as libata, which sits below the SCSI subsystem. For this reason, SATA drivers are found in the SCSI driver section of the configuration."

this is probably the source of your problem - more info is up on that page.
Back to top
View user's profile Send private message
korilius
n00b
n00b


Joined: 30 Oct 2013
Posts: 18

PostPosted: Sun Nov 10, 2013 2:52 pm    Post subject: Reply with quote

BillWho wrote:

Exit and save the .config, make sure /boot is mounted then
Code:
make mrproper && make && make modules_install
cp -v /usr/src/linux/arch/x86_64/boot/bzImage /boot/kernel-3.4.9-gentoo

Naturally, you're going to adjust the kernel name. In grub.conf remove the initrd line


Sorry to resurrect this thread, but isn't there something wrong that command in the code? I didn't realize it until it was too late - make mrproper gets rid of .config! Right?
_________________
-Thanks!-
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 6754
Location: Goose Creek SC

PostPosted: Sun Nov 10, 2013 5:05 pm    Post subject: Reply with quote

@ korillus --> you are correct
you can get an excellent starter config repacement from kernel-seeds.org - plus instructions for installing and use
_________________
Defund the FCC.
Back to top
View user's profile Send private message
korilius
n00b
n00b


Joined: 30 Oct 2013
Posts: 18

PostPosted: Mon Nov 11, 2013 2:09 am    Post subject: Reply with quote

I've got it bookmarked from a previous post about and will be digesting it in small chunks really REALLY soon. :-)
_________________
-Thanks!-
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