# Kernel 4.7.6 will not boot properly[SOLVED]

## jserink

Hello All:

Was having a small problem with 4.4.21 so switched to 4.7.6. I did this to upgrade to this kernel:

```

eselect kernel list

eselect kernel set [#]

zcat /proc/config.gz > /usr/src/linux/.config

cd /usr/src/linux

make oldconfig

make menuconfig

mount /dev/sda2 /boot

make -j3 && make modules_install
```

Here is what happens on boot:

```

Oct 07 14:22:44 [kernel] [    3.469138] ata4.00: configured for UDMA/133

Oct 07 14:22:44 [kernel] [    3.475482] scsi 3:0:0:0: CD-ROM            HL-DT-ST DVD+-RW GS30N    A102 PQ: 0 ANSI: 5

Oct 07 14:22:44 [kernel] [    3.502879] cdrom: Uniform CD-ROM driver Revision: 3.20

Oct 07 14:22:44 [kernel] [    3.811374] ata5: SATA link down (SStatus 0 SControl 300)

Oct 07 14:22:44 [kernel] [    4.115377] ata6: SATA link down (SStatus 0 SControl 300)

Oct 07 14:22:44 [kernel] [    4.118605] Freeing unused kernel memory: 1428K (ffffffff81f04000 - ffffffff82069000)

Oct 07 14:22:44 [kernel] [    4.118699] Write protecting the kernel read-only data: 14336k

Oct 07 14:22:44 [kernel] [    4.119533] Freeing unused kernel memory: 448K (ffff880001990000 - ffff880001a00000)

Oct 07 14:22:44 [kernel] [    4.132696] Freeing unused kernel memory: 1616K (ffff880001c6c000 - ffff880001e00000)

Oct 07 14:22:44 [kernel] [    4.169328] clocksource: Switched to clocksource tsc

Oct 07 14:22:44 [kernel] [   70.277494] x86/mm: Checked W+X mappings: passed, no W+X pages found.

Oct 07 14:22:44 [kernel] [   70.349403] dracut: dracut- dracut-024-

Oct 07 14:22:44 [kernel] [   70.398877] LoadPin: mnt_sb lacks block device, treating as: writable

Oct 07 14:22:44 [kernel] [   70.398991] LoadPin: load pinning can be disabled.

Oct 07 14:22:44 [kernel] [   70.399114] LoadPin: kernel-module pinned obj="/lib64/modules/4.7.6-gentoo/kernel/net/unix/unix.ko" pid=1635 cmdline="/sbin/modprobe -q -- net-pf-1"

Oct 07 14:22:44 [kernel] [   70.401548] NET: Registered protocol family 1

Oct 07 14:22:44 [kernel] [   70.405276] random: systemd-udevd: uninitialized urandom read (16 bytes read, 29 bits of entropy available)

Oct 07 14:22:44 [kernel] [   70.405640] random: systemd-udevd: uninitialized urandom read (16 bytes read, 29 bits of entropy available)

Oct 07 14:22:44 [kernel] [   70.405956] random: systemd-udevd: uninitialized urandom read (16 bytes read, 29 bits of entropy available)

Oct 07 14:22:44 [kernel] [   70.418657] random: udevadm: uninitialized urandom read (16 bytes read, 29 bits of entropy available)

Oct 07 14:22:44 [kernel] [   70.418844] random: udevadm: uninitialized urandom read (16 bytes read, 29 bits of entropy available)

Oct 07 14:22:44 [kernel] [   70.455046] random: systemd-udevd: uninitialized urandom read (16 bytes read, 29 bits of entropy available)

Oct 07 14:22:44 [kernel] [   70.455205] random: systemd-udevd: uninitialized urandom read (16 bytes read, 29 bits of entropy available)

Oct 07 14:22:44 [kernel] [   70.455326] random: systemd-udevd: uninitialized urandom read (16 bytes read, 29 bits of entropy available)

Oct 07 14:22:44 [kernel] [   70.457251] random: systemd-udevd: uninitialized urandom read (16 bytes read, 29 bits of entropy available)

Oct 07 14:22:44 [kernel] [   70.459598] random: systemd-udevd: uninitialized urandom read (16 bytes read, 29 bits of entropy available)

Oct 07 14:22:44 [kernel] [   70.885953] sdhci: Secure Digital Host Controller Interface driver

Oct 07 14:22:44 [kernel] [   70.886050] sdhci: Copyright(c) Pierre Ossman

Oct 07 14:22:44 [kernel] [   70.937827] firewire_ohci 0000:0b:00.0: added OHCI v1.10 device as card 0, 8 IR + 8 IT contexts, quirks 0x10

Oct 07 14:22:44 [kernel] [   70.938120] sdhci-pci 0000:0b:00.1: SDHCI controller found [1217:8320] (rev 5)

Oct 07 14:22:44 [kernel] [   70.944740] mmc0: SDHCI controller on PCI [0000:0b:00.1] using DMA

Oct 07 14:22:44 [kernel] [   71.439462] firewire_core 0000:0b:00.0: created device fw0: GUID 068ccac1374fc000, S400

Oct 07 14:22:44 [kernel] [   71.602888] random: nonblocking pool is initialized

Oct 07 14:22:44 [kernel] [   73.892574] EXT4-fs (sda10): mounted filesystem with ordered data mode. Opts: (null)

Oct 07 14:22:44 [kernel] [   74.022040] dracut: Checking ext4: /dev/disk/by-uuid/d9b11446-ae27-4ef4-8b79-a379ebdd9a79

Oct 07 14:22:44 [kernel] [   74.022197] dracut: issuing e2fsck -a  /dev/disk/by-uuid/d9b11446-ae27-4ef4-8b79-a379ebdd9a79

Oct 07 14:22:44 [kernel] [   74.103746] dracut: /dev/disk/by-uuid/d9b11446-ae27-4ef4-8b79-a379ebdd9a79: clean, 44256/610800 files, 621981/2441407 blocks

Oct 07 14:22:44 [kernel] [   74.108531] dracut: Mounting /dev/disk/by-uuid/d9b11446-ae27-4ef4-8b79-a379ebdd9a79 with -o noatime,ro

Oct 07 14:22:44 [kernel] [   74.166496] EXT4-fs (sda10): mounted filesystem with ordered data mode. Opts: (null)

Oct 07 14:22:44 [kernel] [   74.225382] dracut: -n Mounted root filesystem

Oct 07 14:22:44 [kernel] [   74.225518] dracut: /dev/sda10

Oct 07 14:22:44 [kernel] [   74.273869] dracut: Mounting /usr with -o noatime,noatime,ro

Oct 07 14:22:44 [kernel] [   74.304221] EXT4-fs (sda7): INFO: recovery required on readonly filesystem

Oct 07 14:22:44 [kernel] [   74.304308] EXT4-fs (sda7): write access will be enabled during recovery

Oct 07 14:22:44 [kernel] [   74.363549] EXT4-fs (sda7): recovery complete

Oct 07 14:22:44 [kernel] [   74.385678] EXT4-fs (sda7): mounted filesystem with ordered data mode. Opts: (null)

Oct 07 14:22:44 [kernel] [   74.449070] dracut: Switching root

Oct 07 14:22:44 [kernel] [   79.456243] LoadPin: kernel-module denied obj="/lib64/modules/4.7.6-gentoo/kernel/drivers/acpi/button.ko" pid=3195 cmdline="/lib/systemd/systemd-udevd --daemon"

Oct 07 14:22:44 [kernel] [   79.456250] LoadPin: kernel-module denied obj="/lib64/modules/4.7.6-gentoo/kernel/drivers/acpi/button.ko" pid=3199 cmdline="/lib/systemd/systemd-udevd --daemon"

Oct 07 14:22:44 [kernel] [   79.456303] LoadPin: kernel-module denied obj="/lib64/modules/4.7.6-gentoo/kernel/drivers/acpi/button.ko" pid=3197 cmdline="/lib/systemd/systemd-udevd --daemon"

Oct 07 14:22:44 [kernel] [   79.459732] LoadPin: kernel-module denied obj="/lib64/modules/4.7.6-gentoo/kernel/drivers/mfd/lpc_ich.ko" pid=3191 cmdline="/lib/systemd/systemd-udevd --daemon"

Oct 07 14:22:44 [kernel] [   79.463015] LoadPin: kernel-module denied obj="/lib64/modules/4.7.6-gentoo/kernel/drivers/acpi/ac.ko" pid=3196 cmdline="/lib/systemd/systemd-udevd --daemon"

Oct 07 14:22:44 [kernel] [   79.466487] LoadPin: kernel-module denied obj="/lib64/modules/4.7.6-gentoo/kernel/drivers/char/tpm/tpm.ko" pid=3201 cmdline="/lib/systemd/systemd-udevd --daemon"

Oct 07 14:22:44 [kernel] [   79.466504] LoadPin: kernel-module denied obj="/lib64/modules/4.7.6-gentoo/kernel/drivers/char/tpm/tpm.ko" pid=3192 cmdline="/lib/systemd/systemd-udevd --daemon"

Oct 07 14:22:44 [kernel] [   79.467138] LoadPin: kernel-module denied obj="/lib64/modules/4.7.6-gentoo/kernel/drivers/char/tpm/tpm.ko" pid=3181 cmdline="/lib/systemd/systemd-udevd --daemon"

Oct 07 14:22:44 [kernel] [   79.467153] LoadPin: kernel-module denied obj="/lib64/modules/4.7.6-gentoo/kernel/drivers/acpi/battery.ko" pid=3198 cmdline="/lib/systemd/systemd-udevd --daemon"

Oct 07 14:22:44 [kernel] [   79.467168] LoadPin: kernel-module denied obj="/lib64/modules/4.7.6-gentoo/kernel/drivers/char/tpm/tpm.ko" pid=3188 cmdline="/lib/systemd/systemd-udevd --daemon"

Oct 07 14:22:44 [kernel] [   79.467279] LoadPin: kernel-module denied obj="/lib64/modules/4.7.6-gentoo/kernel/drivers/char/tpm/tpm.ko" pid=3183 cmdline="/lib/systemd/systemd-udevd --daemon"

Oct 07 14:22:44 [kernel] [   79.467367] LoadPin: kernel-module denied obj="/lib64/modules/4.7.6-gentoo/kernel/drivers/char/tpm/tpm.ko" pid=3189 cmdline="/lib/systemd/systemd-udevd --daemon"

Oct 07 14:22:44 [kernel] [   79.467402] LoadPin: kernel-module denied obj="/lib64/modules/4.7.6-gentoo/kernel/drivers/acpi/ac.ko" pid=3196 cmdline="/lib/systemd/systemd-udevd --daemon"

Oct 07 14:22:44 [kernel] [   79.467407] LoadPin: kernel-module denied obj="/lib64/modules/4.7.6-gentoo/kernel/drivers/acpi/battery.ko" pid=3191 cmdline="/lib/systemd/systemd-udevd --daemon"

Oct 07 14:22:44 [kernel] [   79.467493] LoadPin: kernel-module denied obj="/lib64/modules/4.7.6-gentoo/kernel/drivers/char/tpm/tpm.ko" pid=3186 cmdline="/lib/syste

```

So, I have two problems very likley related:

1. its gets stuck for 65 seconds at "clocksource: Switched to clocksource tsc",

2. Then my modules won't load with what appears to be a system denied message.

Have gone back to kernel 4.4.21 for the time being.

Any tips on this?

Cheers,

John

[Moderator edit: added [code] tags to preserve output layout. -Hu]Last edited by jserink on Sat Oct 08, 2016 2:28 pm; edited 1 time in total

----------

## zino

Your modules won't load because you seem to have

```
CONFIG_SECURITY_LOADPIN
```

enabled in your kernel which blocks the loading of your modules. (That's where the 'LoadPin: kernel-module denied' messages come from.)

Here's a short description of the feature: https://www.kernel.org/doc/Documentation/security/LoadPin.txt

Do you actually want to use this feature or did you activate it by mistake or curiosity?

----------

## jserink

 *zino wrote:*   

> Your modules won't load because you seem to have
> 
> ```
> CONFIG_SECURITY_LOADPIN
> ```
> ...

 

Once again, why I love this forum!!!

Zino, thank you for this.

Ok, droped the two Loadpin options and the kernel now boots but I'm still getting that 65 second delay:

```

Oct 08 14:42:47 [kernel] [    3.413382] scsi 3:0:0:0: CD-ROM            HL-DT-ST DVD+-RW GS30N    A102 PQ: 0 ANSI: 5

Oct 08 14:42:47 [kernel] [    3.441583] sr 3:0:0:0: [sr0] scsi3-mmc drive: 24x/24x writer dvd-ram cd/rw xa/form2 cdda caddy

Oct 08 14:42:47 [kernel] [    3.441686] cdrom: Uniform CD-ROM driver Revision: 3.20

Oct 08 14:42:47 [kernel] [    3.750163] ata5: SATA link down (SStatus 0 SControl 300)

Oct 08 14:42:47 [kernel] [    4.057492] Freeing unused kernel memory: 1424K (ffffffff81f04000 - ffffffff82068000)

Oct 08 14:42:47 [kernel] [    4.057588] Write protecting the kernel read-only data: 14336k

Oct 08 14:42:47 [kernel] [    4.058452] Freeing unused kernel memory: 448K (ffff880001990000 - ffff880001a00000)

Oct 08 14:42:47 [kernel] [    4.071636] Freeing unused kernel memory: 1616K (ffff880001c6c000 - ffff880001e00000)

Oct 08 14:42:47 [kernel] [    4.138170] clocksource: Switched to clocksource tsc

Oct 08 14:42:47 [kernel] [   70.265866] x86/mm: Checked W+X mappings: passed, no W+X pages found.

Oct 08 14:42:47 [kernel] [   70.331448] dracut: dracut- dracut-024-

Oct 08 14:42:47 [kernel] [   70.382870] NET: Registered protocol family 1

Oct 08 14:42:47 [kernel] [   70.383741] systemd-udevd[1635]: starting version 3.1.5

Oct 08 14:42:47 [kernel] [   70.385092] random: systemd-udevd: uninitialized urandom read (16 bytes read, 30 bits of entropy available)

Oct 08 14:42:47 [kernel] [   70.385245] random: systemd-udevd: uninitialized urandom read (16 bytes read, 30 bits of entropy available)

Oct 08 14:42:47 [kernel] [   70.385394] random: systemd-udevd: uninitialized urandom read (16 bytes read, 30 bits of entropy available)

Oct 08 14:42:47 [kernel] [   70.409527] random: systemd-udevd: uninitialized urandom read (16 bytes read, 30 bits of entropy available)

Oct 08 14:42:47 [kernel] [   70.518500] random: systemd-udevd: uninitialized urandom read (16 bytes read, 30 bits of entropy available)

Oct 08 14:42:47 [kernel] [   70.577936] sdhci: Secure Digital Host Controller Interface driver

Oct 08 14:42:47 [kernel] [   70.578034] sdhci: Copyright(c) Pierre Ossman

Oct 08 14:42:47 [kernel] [   70.580841] sdhci-pci 0000:0b:00.1: SDHCI controller found [1217:8320] (rev 5)

Oct 08 14:42:47 [kernel] [   70.587665] mmc0: SDHCI controller on PCI [0000:0b:00.1] using DMA

```

Any tips on how to sort that one out?

Cheers,

John

[Moderator edit: added [code] tags to preserve output layout. -Hu]

----------

## Roman_Gruber

you may use the code tags to make posts more readable

```
Oct 08 14:42:47 [kernel] [ 4.138170] clocksource: Switched to clocksource tsc

Oct 08 14:42:47 [kernel] [ 70.265866] x86/mm: Checked W+X mappings: passed, no W+X pages found. 
```

You may look up these clock sources stuff, and what no W+X pages found implies ...

e.g...

https://classicforum.manjaro.org/index.php?topic=30400.0

Did you used the net to look up solutions yourself already?

Gentoo is a read up, fix stuff distro

----------

## jserink

Hi All:

Here is what I did to fix everything.

First, awesome tip by Zino on the CONFIG_SECURITY_LOADPIN option.

I found myself saying yes to all the 'great new features' during make oldconfig.....ooooooppppssss.

I will still having the stopping at the 'clocksource: Switched to clocksource tsc ' section so I changed a bunch of stuff and simply borked my kernel, would not boot at all.

Started again....

Went to /usr/src/linux-4.4.21-gentoo and copied over the .config to /usr/src/linux and ran make oldconfig again making sure to:

1. say no to CONFIG_SECURITY_LOADPIN,

2. Say no to Warn on W+X mappings at boot ,

3. Say no on Code coverage for fuzzing,

4. and anything else I did not understand that was not a module or driver, I said no to.

Booted and its sweet, all good.

Thanx for the help.

Cheers,

john

----------

## NeddySeagoon

jserink,

When you run makeoldconfig. It shows choices like (N/m/y)

The capital letter is the suggested setting.

Make your Gentoo work first, make it shiny/faster/etc later.

----------

## jserink

 *NeddySeagoon wrote:*   

> jserink,
> 
> When you run makeoldconfig. It shows choices like (N/m/y)
> 
> The capital letter is the suggested setting.
> ...

 

I didn't know that about the capital letter.

Good tip. 

Cheers

,john

----------

