# Can't mount rootfs (0,0) Error

## gentoo_noob_2000

Hello guys,

as my nick suggests i'm fairly new to gentoo and especially the whole kernel setup.

Thanks to the nice installation handbook I was able to get my system to boot. But after that when the kernel tries to mount the root fs my kernel panics and i do too  :Wink:  .

My kernel isn't able to detect my harddrive (in my case a eMMC Chip). Well after i tried several configs and even a genkernel all build i now don't know what to do anymore.

The appended build config was crafted by looking at the lsmod and lspci results and enabling the given modules in the menuconfig. 

Is there any other way to do it?

Is there some driver i missed?

lspci -k:

```
00:00.0 Host bridge: Intel Corporation Atom Processor Z36xxx/Z37xxx Series SoC Transaction Register (rev 0e)

   Subsystem: Lenovo Atom Processor Z36xxx/Z37xxx Series SoC Transaction Register

   Kernel driver in use: iosf_mbi_pci

00:02.0 VGA compatible controller: Intel Corporation Atom Processor Z36xxx/Z37xxx Series Graphics & Display (rev 0e)

   Subsystem: Lenovo Atom Processor Z36xxx/Z37xxx Series Graphics & Display

00:14.0 USB controller: Intel Corporation Atom Processor Z36xxx/Z37xxx, Celeron N2000 Series USB xHCI (rev 0e)

   Subsystem: Lenovo Atom Processor Z36xxx/Z37xxx, Celeron N2000 Series USB xHCI

   Kernel driver in use: xhci_hcd

00:17.0 SD Host controller: Intel Corporation Atom Processor E3800 Series eMMC 4.5 Controller (rev 0e)

   Subsystem: Lenovo Atom Processor E3800 Series eMMC 4.5 Controller

   Kernel driver in use: sdhci-pci

00:1a.0 Encryption controller: Intel Corporation Atom Processor Z36xxx/Z37xxx Series Trusted Execution Engine (rev 0e)

   Subsystem: Lenovo Atom Processor Z36xxx/Z37xxx Series Trusted Execution Engine

00:1b.0 Audio device: Intel Corporation Atom Processor Z36xxx/Z37xxx Series High Definition Audio Controller (rev 0e)

   Subsystem: Lenovo Atom Processor Z36xxx/Z37xxx Series High Definition Audio Controller

   Kernel driver in use: snd_hda_intel

00:1c.0 PCI bridge: Intel Corporation Atom Processor E3800 Series PCI Express Root Port 1 (rev 0e)

   Kernel driver in use: pcieport

00:1c.1 PCI bridge: Intel Corporation Atom Processor E3800 Series PCI Express Root Port 2 (rev 0e)

   Kernel driver in use: pcieport

00:1f.0 ISA bridge: Intel Corporation Atom Processor Z36xxx/Z37xxx Series Power Control Unit (rev 0e)

   Subsystem: Lenovo Atom Processor Z36xxx/Z37xxx Series Power Control Unit

00:1f.3 SMBus: Intel Corporation Atom Processor E3800 Series SMBus Controller (rev 0e)

   Subsystem: Lenovo Atom Processor E3800 Series SMBus Controller

01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)

   Subsystem: Lenovo RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller

   Kernel driver in use: r8169

02:00.0 Network controller: Intel Corporation Wireless 3160 (rev 93)

   Subsystem: Intel Corporation Dual Band Wireless AC 3160

   Kernel driver in use: iwlwifi
```

fstab:

```
/dev/mmcblk0p2      /boot      ext2      defaults,noatime   0 2

/dev/mmcblk0p4      /      ext4      noatime         0 1
```

grub.cfg

https://paste.pound-python.org/raw/2kxMY2viuQU3uwLnG8gQ/

kernel config

https://paste.pound-python.org/raw/Bh6Z9BjLfExDfdWeSZ1a/

Thanks for your help

----------

## NeddySeagoon

gentoo_noob_2000,

Welcome to Gentoo.

The (0,0) part of the error means that the kernel cannot see your root device at all.

eMMC devices cam be slow to initialise. Lets test that.

Add 

```
rootdelay=30
```

to your kernel command line.  That makes the kernel wait 30 seconds before it attempts to mount root.

If 30 seconds is not enough, there is something else wrong too.

At the grub menu, make your choice and press 'e' to edit the in memory kernel command line.

If this works, change rootdelay=30 to 

```
rootwait
```

rootwait will wait forever for the root filesystem to appear, so its not useful for debugging.

----------

## gentoo_noob_2000

Thanks for the reply NeddySeagoon.

I already tried rootwait and it didn't work (I waited for a minute or so). Sorry i didn't mention it.

Using

```
rootdelay=30
```

didn't make any difference except that my kernel tries to mount it after 30s and than fails to do so.

Any other suggestions especially regarding the kernel configuration and the driver?

----------

## P.Kosunen

I would guess you need MMC support enabled from kernel and also used partition type and file system support.

----------

## NeddySeagoon

gentoo_noob_2000,

You need your partition table driver, it one of

```
CONFIG_MSDOS_PARTITION=y

CONFIG_EFI_PARTITION=y
```

Thats good.

You need SCSI Disk support

```
CONFIG_SCSI=y

CONFIG_BLK_DEV_SD=y
```

so far so good.

You also have 

```
CONFIG_BLK_DEV_SR=y

CONFIG_BLK_DEV_SR_VENDOR=y

CONFIG_CHR_DEV_SG=y
```

which will come in handy later.

You need the low level MMC block driver. 

The e in eMMC just means the MMC card is soldered to the motherboard. 

CONFIG_PCI_MMCONFIG=y

# MMC/SD/SDIO Card Drivers

#

```
CONFIG_MMC_BLOCK=y

CONFIG_MMC_BLOCK_MINORS=8

CONFIG_MMC_BLOCK_BOUNCE=y

CONFIG_MMC_SDHCI=y

CONFIG_MMC_SDHCI_PCI=y
```

Note that the CONFIG_MMC_BLOCK_MINORS=8 limits you to a maximum of 7 partitions on any MMC device.

You need your root filesystem driver as built in, but if the kernel was getting that far, you would be getting different numbers in the (0,0) part of the error.  

So far so good. 

What exact system do you have? 

Google may know something I'm wissing.

----------

## gentoo_noob_2000

The exact system i have is a Lenovo Yoga 300-11iBY.

I didn't find much about the system via google but a very similar System the Yoga 300-11iBR. Someone even posted his whole dmesg here http://snarkybrill.blogspot.de/2016/01/linux-lenovo-yoga-300-11ibr.html.

Thanks for the help so far. I thought I had missed some eMMC drivers or something but gladly i didn't. 

I'm still not 100% sure what controller sits between eMMC and the CPU. In "normal" systems there is a SATA or IDE controller on the mainboard for which there needs to be a driver in the kernel right? 

Is there maybe some chipset driver i'm missing so the kernel can't load the rootfs?

-------------------EDIT-------------------------

I just found in the dmesg ->

mmc1: SDHCI controller on PCI [0000:01:00.0] using ADMA

and in my config i dont enable it ->

#

# SFF controllers with custom DMA interface

#

# CONFIG_PDC_ADMA is not set

maybe this will solve the problem.  :Smile:  brb

-------------------EDIT2------------------------

Nope

Here is the output of dmesg of my minimal-installation-stick -> https://paste.pound-python.org/raw/oIjCm9CHKom7H6X3VaQV/

----------

## NeddySeagoon

gentoo_noob_2000,

Keep your kernel .config file safe. We will probably come back to it later.

I'm not expecting this to just work but it provides a way to get some more debug information.

emerge genkernel.

Run 

```
genkernel all
```

This will build the kernel as used os the Gentoo minimal LiveCD.

If it boots, good. We can start taking things out until it breaks :)

I'm not expecting that though.

Your kernel will be fully modular, with an initrd.

When booting fails, you can get into a busybox shell and look around. 

Can you see /dev/mmcblk0 and its partitions ?

Maybe its not /dev/mmcblk0 but some other number?

The dmesg you linked contains

[    2.277687] mmc0: SDHCI controller on ACPI [80860F14:00] using ADMA

[    2.353948] mmc1: SDHCI controller on PCI [0000:01:00.0] using ADMA

That might be a hint that 

```
# CONFIG_MMC_SDHCI_ACPI is not set
```

is needed.

The help says 

```
SDHCI support for ACPI enumerated SDHCI controllers ──────────┐

  │ CONFIG_MMC_SDHCI_ACPI:                                                  │  

  │                                                                         │  

  │ This selects support for ACPI enumerated SDHCI controllers,             │  

  │ identified by ACPI Compatibility ID PNP0D40 or specific                 │  

  │ ACPI Hardware IDs. 
```

Either way, its a kernel rebuild.

-- edit --

This page suggests that you do indeed have two MMC 'slots'.

One in the eMMC built onte the motherboard, the other is the 4 in 1 slot × 1 (SD/SDHC/SDXC/MMC).

----------

## gentoo_noob_2000

WOW... 3 days of trial and error and finally...

Thanks a lot... The ACPI support did the trick for me!

Thank NeddySeagoon!

----------

## NeddySeagoon

gentoo_noob_2000,

We made a faulty assumption at the outset.

That the device you see in lspci is the one you want.

That reinforces rule 1 - Assume nothing.

I would be interested to see your working dmesg.

----------

