# [SOLVED] kernel panic on Chromebook

## mrfabiolo

I tried to install Gentoo amd64 on my Chromebook (Acer CB3-111).

I used SystemRescueCD.

I compiled the kernel by myself (latest stable gentoo-sources), adding just few things. I thought everything was fine. But after reboot...

I took a screenshot, these are the errors,

https://image.ibb.co/g7aHpp/IMG_20180908_013333.jpg

Previously, on this chromebook, I successfully installed ArchLinux, GalliumOS ecc.

Any ideas? I could re-enter with chroot if I know what to do.Last edited by mrfabiolo on Tue Sep 25, 2018 11:03 am; edited 1 time in total

----------

## NeddySeagoon

mrfabiolo,

We need the panic message text that appeared before the CPU and kernel state dump.

Some things to try ...

Post your lspci output and put your kernel .config file onto a pastebin site.

I suspect that your 'HDD' is actually eMMC and you don't have the driver in the kernel, or its something that needs GPIO enabled and you don't have it.

Those two things will let helpers check that your kernel matches your hardware.

Boot to your grub screen and press 'e' follow the instructions to find the kernel line and append rootwait=30 

The kernel will wait for 30 seconds before trying to mount root.

If there is a pause before the panic, its probably related to mounting root.

----------

## mrfabiolo

I don't know how to view the panic message text that appeared before the CPU and kernel state dump, can you explain?

I have an eMMC with only one ext4 partition.

This is my /etc/fstab

```
/dev/mmcblk0p1    /    ext4    noatime,discard  0 1
```

This is my lspci -k (from SystemRescueCD):

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

   Subsystem: Intel Corporation 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: Intel Corporation Atom Processor Z36xxx/Z37xxx Series Graphics & Display

   Kernel driver in use: i915

   Kernel modules: i915

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

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

   Kernel driver in use: xhci_hcd

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

   Kernel modules: mei_txe

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

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

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

   Kernel driver in use: pcieport

   Kernel modules: shpchp

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

   Kernel driver in use: lpc_ich

   Kernel modules: lpc_ich

01:00.0 Network controller: Intel Corporation Wireless 7260 (rev 6b)

   Subsystem: Intel Corporation Dual Band Wireless-AC 7260

   Kernel driver in use: iwlwifi

   Kernel modules: iwlwifi
```

This is the .config of kernel which panic:

https://pastebin.com/XvRGivn2

I appended "rootwait=30" in grub, like this:

```
setparams 'Gentoo GNU/Linux'

    [...]

    linux   /boot/vmlinuz-4.14.65-gentoo root=/dev/mmcblk0p1 rootwait=30 ro
```

but after boot it takes just two seconds before panicking.

I'm sure I've included mei_txe in kernel.

----------

## Jaglover

I'd look at dmesg to figure out what driver is used for your block device by SRCD.

----------

## NeddySeagoon

mrfabiolo,

You did what I said correctly but I messed up with rootwait.  rootwait does not take a time. It waits forever for the root filesystem to become available.

I meant to say rootdelay=30.

I was thinking about both rootwait will stall the boot process with no error.

rootdelay=30 will give you a 30 second delay before the panic.

Sorry about that.

Looking at your lspci and kernel together. Your eMMC controller is not a PCI device, or it would be listed there.

You don't have Kernel modules: shpchp enabled in your kernel.

In the MMC hardware drivers list, they are all off.

```
# MMC/SD/SDIO Host Controller Drivers

#

# CONFIG_MMC_DEBUG is not set

# CONFIG_MMC_SDHCI is not set

# CONFIG_MMC_WBSD is not set

# CONFIG_MMC_TIFM_SD is not set

# CONFIG_MMC_SDRICOH_CS is not set

# CONFIG_MMC_CB710 is not set

# CONFIG_MMC_VIA_SDMMC is not set

# CONFIG_MMC_VUB300 is not set

# CONFIG_MMC_USHC is not set

# CONFIG_MMC_USDHI6ROL0 is not set

# CONFIG_MMC_TOSHIBA_PCI is not set

# CONFIG_MMC_MTK is not set
```

 you will need one of those but not anything with PCI in its name.

----------

## mrfabiolo

with "rootdelay=30" now it stops 30 seconds before panicking:

https://image.ibb.co/e3nkAU/IMG_20180908_173024.jpg

I tried with all flags set, and also without the flags with "PCI ", but nothing changed.

https://image.ibb.co/gF5Bjp/IMG_20180908_175344.jpg

this is "dmesg | grep -i mmc" (from SystemRescueCD)

```
[    0.037745] PCI: MMCONFIG for domain 0000 [bus 00-ff] at [mem 0xe0000000-0xefffffff] (base 0xe0000000)

[    0.038009] PCI: MMCONFIG at [mem 0xe0000000-0xefffffff] reserved in E820

[    5.604248] sr 0:0:0:1: [sr0] scsi3-mmc drive: 48x/48x tray

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

[   18.753330] mmc1: SDHCI controller on ACPI [80860F16:00] using ADMA

[   18.963980] mmc0: new HS200 MMC card at address 0001

[   19.606466] mmcblk0: mmc0:0001 HAG2e 14.7 GiB 

[   19.606564] mmcblk0boot0: mmc0:0001 HAG2e partition 1 4.00 MiB

[   19.606646] mmcblk0boot1: mmc0:0001 HAG2e partition 2 4.00 MiB

[   19.606720] mmcblk0rpmb: mmc0:0001 HAG2e partition 3 4.00 MiB

[   19.631771]  mmcblk0: p1

[  529.185586] scsi 1:0:0:0: Direct-Access     Generic- SD/MMC/MS PRO    1.00 PQ: 0 ANSI: 4
```

----------

## NeddySeagoon

mrfabiolo,

It looks like the panic is due to not mounting root.

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

[   18.753330] mmc1: SDHCI controller on ACPI [80860F16:00] using ADMA 
```

You need the SDHCI MMC controller and you have two mmc slots.

I suspect that one is external and the other is your internal eMMC memory.

```
SDHCI controller on ACPI
```

is the kernel hint.

```
[   19.606466] mmcblk0: mmc0:0001 HAG2e 14.7 GiB 
```

 That will be 16GB (salesmans)

I guess that's the eMMC.

ACPI is important here.

```
# CONFIG_HOTPLUG_PCI_ACPI is not set

# CONFIG_HOTPLUG_PCI_CPCI is not set

# CONFIG_HOTPLUG_PCI_SHPC is not set
```

I suspect you need either  CONFIG_HOTPLUG_PCI_ACP or CONFIG_HOTPLUG_PCI_SHPC. Your lspci shovs that the latter is in use.

I knew I remembered something about similar hardware.

----------

## mrfabiolo

Yes, I have an internal eMMC (16GB), and a slot for external SDCards.

I compiled the kernel with:

CONFIG_HOTPLUG_PCI_ACPI

and

CONFIG_HOTPLUG_PCI_SHPC

I've got CONFIG_MMC_SDHCI, CONFIG_INTEL_MEI_TXE etc.

But nothing changed. Still panicking, same errors.

----------

## NeddySeagoon

mrfabiolo,

Lets do some sanity checking.

Mount your gentoo root but there is no need to chroot. If you don't put /mnt/gentoo/ on the front of the pathnames.

Check the timestamps on the following files, 

```
/usr/src/linux/.config 
```

 It all starts here, this should be the oldest file.

```
/usr/src/linux/arch/x86/boot/bzImage 
```

This is the kernel binary. If it was made from the .config above, it must be newer.

```
/boot/<kernel>
```

It should have the same timestamp as bzImage.

If you have several kernel files in /boot, are you sure that grub is loading the newest one?

```
CONFIG_MMC_SDHCI
```

is a menu. You also need the 

```
<*>     SDHCI support for ACPI enumerated SDHCI controllers
```

inside that menu.

I'm not sure if 

```
<*>     SDHCI platform and OF driver helper
```

is needed too.

----------

## mrfabiolo

Everything seems fine. I did the sanity checking. But it panics.

So I tried this way: I removed everything and recompile from scratch:

```
emerge --unmerge gentoo-sources

rm -r /usr/src/*

rm -r /lib/modules/*

rm /boot/vmlinuz*

rm /boot/config*
```

and recompile:

```
emerge gentoo-sources

make menuconfig

make -j2 && make -j2 modules_install

make install

grub-install /dev/mmcblk0

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

and reboot
```

Inside "make menuconfig" I selected almost everything, all the flags we mentioned up to now, just to be sure.

But it panics anyway.

NeddySeagoon, you are very kind helping me, if you have any other idea, I'm all ears.

----------

## NeddySeagoon

mrfabiolo,

Try genkernel as a workaround.

```
emerge genkernel

genkernel all
```

If that still fails, there is genkernel-next, which is still in testing.

I have a feeling that you need PINCTL and one of the options in the PINCTL menu but I don't know which and google is not being my friend.

genkernel will build you a fully modular kernel and an initrd, then put the bits into /boot

You will need to tell grub about the genkernel kernel.

Its not a fix, its just to get you a working kernel, so you can move on with your install, then come back to the kernel later.

----------

## mrfabiolo

I tried with genkernel, but It still fails:

https://image.ibb.co/k33kUp/IMG_20180909_210704.jpg

Then I tried with genkernel-next, but It's the same.

It's strange. With other distros it worked.

I tried putting root=/dev/mmcblk0p1 inside grub, and even rootfstype=ext4, but nothing.

----------

## russK

mrfabiolo,

At this point and can sometimes be helpful to enter 'shell" and start looking around with the busybox tools available.

----------

## Jaglover

Can you please pastebin your latest kernel .config.

----------

## mrfabiolo

This is my latest kernel .config:

https://pastebin.com/TKV15zak

----------

## Jaglover

I see no PINCTRL options activated as Neddy suggested.

----------

## mrfabiolo

I tried adding PINCTRL but nothing. Still the same.

Here is my .config:

http://dpaste.com/2QZ0DZP

----------

## Jaglover

I have no such hardware, I'm guessing you may need some GPIO option enabled, too. Have a good look at dmesg, perhaps there is a clue.

----------

## NeddySeagoon

mrfabiolo,

Boot the broken genkernel kernel, we need the shell.

When mounting root fails, type shell, as the message suggests.

In the shell have a look around /dev

```
ls /dev/mmc*
```

will be particularly interesting.

I suspect it returns nothing, meaning the (e)MMC cards are not visible to the kernel.

What about

```
ls /dev/sd*
```

is case your block devices have been mapped to the SCSI subsystem.

Whatever, the initrd is looking for root by the filesystem UUID and its not found. That means that there is no available filesystem with the given UUID.

Either because the UUID itself is not correct or the filesystem is not on any visible device.

-- edit --

From your kernel .config, genkernel has 

```
# CONFIG_MMC_SDHCI_ACPI is not set
```

 and we know from previous dmesg that you need that.

genkernel isn't clever. It uses a .config file that is distributed with the package.

You need to help it.

```
genkernel -menuconfig all
```

It might be --menuconfig will let you adjust the config before the build goes ahead.

Set MMC_SDHCI_ACPI to <*> because I have no idea if the module will get loaded.

That may mean that you have to go back up the menu system and set other things from <m> to <*>.

That's OK, its not an error to attempt to load a module thats already loaded or built in.  

CONFIG_PINCTRL and the menu items are already set.

----------

## mrfabiolo

Sorry for making you wait so long.

I've solved everything. All of my hardware now works perfectly: eMMC (internel and external), wifi, audio, etc.

After a clean install of Gentoo, These are the only items I set with "make --menuconfig":

```
Processor type and features  --->

  [*] Intel Low Power Subsystem Support (PINCTRL)

Bus options (PCI etc.)  --->

  [*] Support for PCI Hotplug  --->

    <*>    SHPC PCI Hotplug driver

[*] Networking support  --->

  <*> Bluetooth subsystem support  --->

    <*> HIDP protocol support

    Bluetooth device drivers  --->

      <*> HCI USB driver

Device Drivers  --->

  Multifunction device drivers  --->

    <*> Intel ICH LPC

  Misc devices  --->

    <M>   Intel Trusted Execution Environment with ME Interface # MEI_TXE

  <*> MMC/SD/SDIO card support  --->

    <*> Secure Digital Host Controller Interface support

      <*>    SDHCI support for ACPI enumerated SDHCI controllers

  [*] USB support  --->

    <*>    xHCI HCD (USB 3.0) support

  I2C support  --->

    I2C Hardware Bus support  --->

      <*> Synopsys DesignWare Platform

      [*] Intel Baytrail I2C semaphore support

  Input device support  --->

    [*] Mice  --->

      <*> ELAN I2C Touchpad support

  [*] Network device support  --->

    <*> USB Network Adapters --->

      <*> Multi-purpose USB Networking Framework

    Wireless LAN  ---> (solo Chromebook)

      <M>   Intel Wireless WiFi Next Gen AGN - Wireless-N/Advanced-N/Ultimate-N (iwlwifi)

      <M>   Intel Wireless WiFi MVM Firmware support

  <*> Multimedia support  --->

   [*] Cameras/video grabbers support

    [*] Media USB Adapters  --->

      <*> USB Video Class (UVC)

  [*] GPIO Support  --->

  Pin controllers  --->

  [*] Intel Baytrail GPIO pin control

  <*> Sound card support  --->

    <*> Advanced Linux Sound Architecture  --->

      <*> ALSA for SoC audio support  --->

        <M> ASoC Audio driver for Intel Baytrail with MAX98090 codec

FileSystem  --->

    DOS/FAT/NT Filesystems  --->

      <*> NTFS file system support

      <*>    NTFS write support
```

There are many others items that make these ones non-selectable. And there are others that do not need to be selected otherwise the kernel will panic.

----------

## NeddySeagoon

mrfabiolo,

Well done!

Thank you for your post, others will find it in the future.

----------

