# [solved] unable to mount root

## skiwarz

Good day,

When attempting to boot my computer, I am greeted with a kernel panic, stating:

```
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown block(0,0)
```

My machine boots fine with the 4-14-59 kernel, but as soon as I tried upgrading to 4-14-60 or newer, I got a kernel panic. I used my same config file with "olddefconfig". This changed nothing ("diff .config1 .config2" returns nothing). So I'm using the same .config for both kernels. My question is, what changed in 4-14-60 that breaks my kernel?

I looked at the changelog for 4-14-60, but I don't really know what to look for, I guess. I also tried compiling the newest gentoo-sources (4-17-12) with the same result. Additionally, I emerged genkernel and ran a "genkernel kernel" on the 4-14-60 sources, which again gave me a kernel panic.

My setup:

HP Stream 11 laptop (uses an eMMC for storage)

Config:

https://pastebin.com/KY6VKSbN

I'm not using an initramfs

I don't have any modules, everything is compiled into the kernel (except for maybe a couple that I've missed).

If anyone can help, I would greatly appreciate it. Let me know if I omitted any helpful information.Last edited by skiwarz on Sat Aug 11, 2018 1:13 am; edited 1 time in total

----------

## Keruskerfuerst

What filesystem are you using for /(root) ?

1. Could be filesystem driver

2. - fstab not read correctly

3. driver for SATA controller 

This is what i can imagine.

----------

## Blind_Sniper

Put your old .config to new kernel sources directory. Without any oldconfig/olddefconfig/menuconfig.

Run make && make modules_install with that old config, as usual.

If there are any changes in kernel configuration you will be asked for new options before build process start.

----------

## skiwarz

 *Keruskerfuerst wrote:*   

> What filesystem are you using for /(root) ?
> 
> 1. Could be filesystem driver
> 
> 2. - fstab not read correctly
> ...

 

Here's my fstab:

```
/dev/mmcblk0p1    /boot/efi    vfat    defaults    0 2

/dev/mmcblk0p2    /    ext4    noatime    0 1

/dev/mmcblk0p3    none    swap    sw    0 0
```

I have the ext4 drivers compiled in the kernel. I don't know about SATA. I assume it is set correctly because it worked fine with the same .config on the previous kernel.

----------

## skiwarz

 *Blind_Sniper wrote:*   

> Put your old .config to new kernel sources directory. Without any oldconfig/olddefconfig/menuconfig.
> 
> Run make && make modules_install with that old config, as usual.
> 
> If there are any changes in kernel configuration you will be asked for new options before build process start.

 

I did you one better...

I re-compiled my 4.14.59 kernel with my original config, and it too gives me a kernel panic...

----------

## Keruskerfuerst

Which system files have been upgraded?

----------

## Blind_Sniper

 *skiwarz wrote:*   

> 
> 
> I re-compiled my 4.14.59 kernel with my original config, and it too gives me a kernel panic...

 

I think it's filesystem damage and/or hardware fault.

I'd try to run fsck.ext4 on your root partition. And fsck.vfat on boot partition too.

----------

## NeddySeagoon

skiwarz,

```
unknown block(0,0)
```

tells that your kernel cannot communicate with you HDD.

If you use SATA a piece of your SCSI stack is missing.

If its eMMC or nvme, its a bit harder.

We need to see your lspci output, so we knom your hardware. That will fit in a post.

Also put your kernel .config file onto a pastebin site and post a link to it.

Lastly, we need to know how you are building and installing your kernel.

-- edit --

I should have read better, your .config is in your opening post.

----------

## skiwarz

Here is my lspci output:

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

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

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

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

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

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

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

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

01:00.0 Network controller: Broadcom Limited BCM43142 802.11b/g/n (rev 01)

```

Also, here is my 'lshw' output: https://pastebin.com/4r1sWGn5

As far as building/installing, I have a script that does this:

```
emerge gentoo-sources

copy my current config to the new source directory

make olddefconfig

make && make modules_install

cp arch/x86/boot/bzImage /boot/kernel-xxxxx

grub-mkconfig -o /boot/grub/grub.cfg
```

This script has been running fine for a little over a year since I implemented it. Also, my kernel is on my root partition. So Grub loads the kernel from the same location that the kernel can't seem to detect. Don't know if that's worth mentioning.

Thank you

----------

## skiwarz

 *Keruskerfuerst wrote:*   

> Which system files have been upgraded?

 

My last working kernel was 4.14.59. After that was installed, I've only made one notable change to my machine. I spent a couple hours cleaning up my package.use and package.accept_keywords files. Had to re-emerge some things like firefox, nspr, and skype. But nothing related to the kernel or drivers.

----------

## Blind_Sniper

I do not see "make clean" in your script, without it kernel will not be actually rebuilt, if you didn't change config. Even if you changed it, only changed part will be rebuilt, not entire the kernel.

I would run "make clean" and then rebuilt an old 4.14.59 kernel again. Just to be sure that kernel was really rebuilt.

I think it's a good idea to rebuild stuffs by hand, without any scripts, at least now, while a problem is not solved yet.

----------

## skiwarz

 *Blind_Sniper wrote:*   

> I do not see "make clean" in your script, without it kernel will not be actually rebuilt, if you didn't change config. Even if you changed it, only changed part will be rebuilt, not entire the kernel.
> 
> I would run "make clean" and then rebuilt an old 4.14.59 kernel again. Just to be sure that kernel was really rebuilt.
> 
> I think it's a good idea to rebuild stuffs by hand, without any scripts, at least now, while a problem is not solved yet.

 

Sorry, I should have been more clear. That script is only my daily "everything works, just update what you can" script. I have not been using it to troubleshoot this issue.

When I re-built my 4.14.59 kernel, I had to emerge the sources, as I had previously erased them. I save my configs, though, just in case. Thus, I was starting from scratch with nothing pre-built.

Everything I've tried so far:

-emerge genkernel and run "genkernel kernel" on my 4.14.61 sources.

-emerge 4.17.12 sources and compile with my 4.14.59 config.

-"make clean" my 4.14.61 sources and compile with my 4.14.59 config.

-emerge 4.14.59 sources again and compile with my 4.14.59 config

-now I'm working on switching on kernel drivers and re-compiling my 4.14.61 kernel just to see if a random driver will make it work. (Not using make clean for this).

----------

## Blind_Sniper

 *skiwarz wrote:*   

> 
> 
> -now I'm working on switching on kernel drivers and re-compiling my 4.14.61 kernel just to see if a random driver will make it work. (Not using make clean for this).

 

Just to make sure it's a driver issue i would run

```
make allyesconfig && make && make_modules install
```

it will take some time to compile huge kernel, but if you will able to boot with this kernel -you will be sure that your current kernel is misconfigured.

----------

## Jaglover

Well, there are two ways, as always. 

You could use common sense and make sure three conditions are met:

0. Correct driver for your boot device [controller] is enabled. You could boot SystemRescueCD and use lspci -k to check what driver is needed.

1. Support for partition table in use is enabled. Not your problem, currently, as your kernel is unable to access the boot device.

2. Support for root filesystem is enabled, also not your problem currently.

Or you could try "random driver" approach, which I understand is your current line of action. May take a few years to hit the correct driver using this method. Maybe never.

----------

## NeddySeagoon

skiwarz,

Your lspci is interesting for what it does not show.

There in no eMMC/MMC controller on your PCI bus. 

Your lshw shows a removable 32G  SD/MMC/MS on the USB bus. Thats not your eMMC either, as its a single FAT partition and installing onto a FAT filesystem is a real challenge, since FAT does not support symbolic links. Further, that volume is /dev/sda, not /dev/mmcblk0.

So your eMMC is not on the PCI bus and not on the USB bus.

----------

## skiwarz

 *NeddySeagoon wrote:*   

> skiwarz,
> 
> Your lspci is interesting for what it does not show.
> 
> There in no eMMC/MMC controller on your PCI bus. 
> ...

 

I'm not super familiar with emmc. So you're saying it SHOULD be showing up in lspci? I figured storage wasn't handled by pci, so I didn't question it. 

And yes, that 32GB card is just what I use for documents and stuff.

----------

## NeddySeagoon

skiwarz,

Your eMMC card is just an MMC card soldered to the motherboard. It saves a connector.

I don't know how its actually connected but its not PCI or USB because those buses support vendor and device IDs that are read from the devices during bus scanning.

There are a few more busses in your system that are not so user friendly, like i2c and SPI. By comparison to PCI and USB they are slow too.

Lastly, you have a System on a Chip (SoC). These often provide General Purpose I/O (GPIO) pins that you need a driver for to make some peripherals work.

It has be there, it works with older kernels.

----------

## Jaglover

I'm not sure, but I think it uses SDHCI controller and rtsx_pci driver, it shows up in lspci as PCI Express Card Reader. I may be wrong ... don't have this hardware myself.

Edit: If it just stopped working it may be dead.  :Sad: 

----------

## skiwarz

Got it!

I enabled CONFIG_X86_INTEL_LPSS, which also turns on CONFIG_PINCTRL.

Kernel boots fine now.

In case anyone's curious:

This machine has a broadcom chip that uses a very old, proprietary driver. Every time I emerge it (broadcom_sta), I get a message that says it is not compatible with X86_INTEL_LPSS  and that I need to disable it. I must have done that at some point (I can't remember doing so). Long story short, I'm ridiculous.

Thank you all for your help and taking time to help talk me through this.

----------

## NeddySeagoon

skiwarz,

Its called "the school of hard knocks" something learned there is never forgotten.

Thank you for posting the solution. Others may benefit from it too.

----------

