# I got a problem with mounting root device....

## chaoxifer

Hi, 

I updated gentoo yesterday, but after updating, It fails to mount root device(/dev/sda3) when I boot computer.

I searched a resolution at forum, google... but I couldn't find it.

There're resolutions for same error message , but they couldn't fix my problem.

This is my problem : 

```

  :: Scanning for ...............

> Activating udev

> Determining root device...

> Mounting root...

> Using mount -t ext3 -o ro

!! The filesystem mounted at /dev/sda3 does not appear to be a valid /, try again.

!! 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...

root block device() ::  _

```

Here's my hardisk partition.

```

fdisk -l

Disk /dev/sda: 640.1 GB, 640135028736 bytes

255 heads, 63 sectors/track, 77825 cylinders, total 1250263728 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: 0xacd6acd6

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1              63      224909      112423+  83  Linux

/dev/sda2          224910     2345489     1060290   82  Linux swap / Solaris

/dev/sda3         2345490   673444799   335549655   83  Linux

/dev/sda4   *   673445888  1250260991   288407552    7  HPFS/NTFS/exFAT

```

/boot/grub/grub.conf :

```

title Gentoo LInux 3.2.12

root (hd0,0)

kernel /boot/kernel-genkernel-x86_64-3.2.12-gentoo root=/dev/ram0 real_root=/dev/sda3 rootfstype=ext3

initrd /boot/initramfs-genkernel-x86_64-3.2.12-gentoo

title Windows 7

rootnoverify (hd0,3)

chainloader +1

```

/etc/fstab : 

```

# <fs>                  <mountpoint>    <type>          <opts>          <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.

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

/dev/sda3               /               ext3            noatime         0 1

/dev/sda2               none            swap            sw              0 0

/dev/cdrom              /mnt/cdrom      auto            noauto,users    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

```

I can't understand this problem... Please help me.Last edited by chaoxifer on Sat Mar 31, 2012 2:14 pm; edited 3 times in total

----------

## BillWho

chaoxifer,

Add 

```
root=UUID=b3bfd853-2f66-4946-9a08-428af6f50ba1 rootfstype=ext3
```

or

```
root=/dev/sda3 rootfstype=ext3
```

to the kernel grub line.

Use the proper uuid ,dev and fstype. Either one will work

Good luck   :Wink: 

----------

## chaoxifer

Unfortunately... It doesn't work...

I think that the partition is broken....

Anyway, thanks for reply.

----------

## BillWho

chaoxifer,

Is CONFIG_DEVTMPFS_MOUNT set to =y ?

----------

## Hu

If you drop to a shell, what is in the initramfs /dev?

----------

## chaoxifer

Thanks for reply.

```

grep DEVTMPFS /usr/src/linux/.config

CONFIG_DEVTMPFS=n

# CONFIG_DEVTMPFS_MOUNT is not set

```

And I tried to drop to shell, and check initramfs /dev, but there's no way to use redirection to file because of read-only.

----------

## chaoxifer

I tried to recompile with option CONFIG_DEVTMPFS=y, but it still failing to mount.

----------

## BillWho

chaoxifer,

Change this

```
kernel /boot/kernel-genkernel-x86_64-3.2.12-gentoo root=/dev/ram0 real_root=/dev/sda3 rootfstype=ext3

initrd /boot/initramfs-genkernel-x86_64-3.2.12-gentoo

```

to

```
kernel /kernel-genkernel-x86_64-3.2.12-gentoo root=/dev/sda3  rootfstype=ext3

initrd  /initramfs-genkernel-x86_64-3.2.12-gentoo

```

I didn't notice you had /boot earlier. Regardless, not having CONFIG_DEVTMPFS_MOUNT=y would have caused other boot woes.

This should do it   :Wink: 

----------

## chaoxifer

I have changed grub.conf to 

```

default 0

timeout 30

#splashimage=(hd0,0)/boot/grub/splash.xpm.gz

#title Gentoo Linux 2.6.24-r5

#root (hd0,0)

#kernel /boot/kernel-genkernel-x86-2.6.24-gentoo-r5 root=/dev/ram0 real_root=/dev/sda3

#initrd /boot/initramfs-genkernel-x86-2.6.24-gentoo-r5

title Gentoo LInux 2.6.32-gentoo-r7

root (hd0,0)

#kernel /boot/kernel-genkernel-x86_64-2.6.32-gentoo-r7 root=/dev/sda3

#initrd /boot/initramfs-genkernel-x86_64-2.6.32-gentoo-r7

kernel /kernel-genkernel-x86_64-3.2.12-gentoo root=/dev/sda3  rootfstype=ext3

initrd  /initramfs-genkernel-x86_64-3.2.12-gentoo

# Update at 2012/01/17

# vim:ft=conf:

#

title Windows 7

rootnoverify (hd0,3)

chainloader +1

```

 :Sad:  ....but it still having a problem..  Is there something wrong with kernel config?

----------

## BillWho

chaoxifer,

I didn't see a proc entry in your fstab.

```
proc              /proc              proc       defaults               0 0
```

If you have CONFIG_EXT3_FS=m (for module) set it to CONFIG_EXT3_FS=y

The grub entries look OK now.

Are you still getting the same root block device() ::  _  message?

If so, enter "shell" for a shell and check the contents of /dev

Cross your fingers when you boot too   :Wink: 

----------

## chaoxifer

Here's contents of /dev when I dropped to shell.

```

2:0:0:0

5:0:0:0

bsg

bus

console

cpu_dma_latency

dac960_gam

device-mapper

event0

event1

event2

event3

full

fuse

hidraw0

hidraw1

hidraw2

input

kmem

kmsg

loop0

loop1

loop2

loop3

loop4

loop5

loop6

loop7

mapper

mcelog

megadev0

mem

mice

mouse0

mouse1

network_latency

network_throughput

null

oldmem

port

psaux

ptmx

pts

ram0

ram1

ram10

ram11

ram12

ram13

ram14

ram15

ram2

ram3

ram4

ram5

ram6

ram7

ram8

ram9

random

sda

sda1

sda2

sda3

sda4

sg0

sg1

snapshot

sr0

tgt

tty

tty0

tty1

tty10

tty11

tty12

tty13

tty14

tty15

tty16

tty17

tty18

tty19

tty2

tty20

tty21

tty22

tty23

tty24

tty25

tty26

tty27

tty28

tty29

tty3

tty30

tty31

tty32

tty33

tty34

tty35

tty36

tty37

tty38

tty39

tty4

tty40

tty41

tty42

tty43

tty44

tty45

tty46

tty47

tty48

tty49

tty5

tty50

tty51

tty52

tty53

tty54

tty55

tty56

tty57

tty58

tty59

tty6

tty60

tty61

tty62

tty63

tty7

tty8

tty9

ttyS0

ttyS1

ttyS2

ttyS3

urandom

vcs

vcs1

vcsa

vcsa1

vga_arbiter

zero

```

I add the proc entry in fstab. but it can't resolve the problem.

Anyway, BillWho, I really appreciate your reply and effort.   :Smile: 

----------

## Veldrin

ok - proc is no longer needed. I get automounted by the kernel.

all tried grub hacks are doomed to fail, as the OP is using genkernel to build kernel. all options for the real system need to be prefixed by real_.

that said, revert your grub settings to 

```
title Gentoo LInux 2.6.32-gentoo-r7 

root (hd0,0) 

kernel /kernel-genkernel-x86_64-3.2.12-gentoo real_root=/dev/sda3 real_rootfstype=ext3 

initrd  /initramfs-genkernel-x86_64-3.2.12-gentoo 
```

second if your boot fails again, verify that your are really using the new grub settings, by hitting e (for edit) in grub. 

if they are not there, then you probably have edited the wrong grub.conf/menu.lst.

V.

----------

## BillWho

chaoxifer,

According to this thread https://forums.gentoo.org/viewtopic-t-917956.html

you should be using pcie_aspm=force on the grub line in addition to the others. I didn't recognize the kernel version at first   :Sad: 

 *Quote:*   

> all options for the real system need to be prefixed by real_.

 

I've been using gerkernel and my entry is 

```
linux /kernel root=UUID=b3bfd853-2f66-4946-9a08-428af6f50ba1 rootfstype=ext3 vga=794
```

I use the kernel symlink to eliminate the need to modify the line after a subsequent compile. 

Lets hope   :Wink: 

----------

## Veldrin

ok - let me reprhase - genkernel with initrd.

----------

## chaoxifer

I checked the /dev/sda3 with fsck but there's no problem.

And then I reboot system, suddenly all of filesystem was broken...(What thu..)  :Shocked: 

I'm just reinstalling all of systems.

----------

