# Init hangs with gentoo-4.4.0-r1

## medaron

Hello,

I recently switched to gentoo (at first the stable branch) following the excellent installation guide.

On my system, / and swap are logical volumes and /boot is on an ESP. I am using genkernel to build the kernel with the command 

```
genkernel --lvm all
```

.

Everything worked until I switched to the testing branch. I updated all packages and built a kernel from the gentoo-4.4.0.r1 sources with genkernel. I emerged @module-rebuild, @x11-module-rebuild, and @preserved-rebuild. Additionally, I re-emerged lvm2 as one-shot. When booting the new kernel however, the init hangs at "Setting up Logical Volume Manager" (C-c won't skip it). Booting back into 4.1.15-r1 works fine.

I don't believe the LVM is the actual problem. Booting to init=/bin/bash shows that the logical volume is mounted and I can read the files on the disk. Proceeding from there with exec /sbin/init results in hanging after the LVM meta data daemon was successfully started. After that there is no further output and the system is frozen.

My emerge --info: http://pastebin.com/PZJg9ibC

It would be great if someone could point me into the right direction how to properly debug this problem.

Thanks,

medaron

----------

## Buffoon

You sure it is LVM that hangs, not the next service after it? What is the next one?

----------

## medaron

No, I don't think it's the LVM. I tried a few more boots and the step at which it hangs changes each time.

It is sometimes 

```
 * Setting hardware clock using the system clock [UTC] ...
```

 and sometimes the subsequent step 

```
 * Executing: /lib64/rc/sh/openrc-run.sh /lib64/rc/sh/openrc-run.sh /etc/init.d/modules start
```

. For some reason OpenRC does not log the failed boot attempts. The only entries in the rc.log are from booting the 4.1.15 kernel. For the successful boot attempts, the log says  * Autoloaded 0 module(s) after modules start.

----------

## medaron

I now started OpenRC in interactive mode. It only hangs if I allow the udev-trigger service to run. I suppose the next step should be to check, which rule in /lib/udev/rules.d/ is causing the problem. Is there a convenient way to let udev load rules interactively during boot or do I need to comment out the content of each rule file one at a time?

----------

## charles17

 *medaron wrote:*   

> I now started OpenRC in interactive mode. It only hangs if I allow the udev-trigger service to run.

 

What about completely removing that udev-trigger service from the runlevels? 

I know there is https://www.gentoo.org/support/news-items/2015-06-08-udev-init-scripts-changes.html but my system runs without udev-trigger.

----------

## medaron

Apologies for not replying earlier. A system without udev triggers would have solved/avoided the problem, too.

Further investigation showed that the system did not freeze, only the display. Starting the SSH daemon at boot allowed my to  ssh into the machine after the display froze. This occurred for the rule 

```
/lib64/udev/rules.d/80-drivers.rules
```

.

I avoided the problem by compiling the Intel GPU driver into the kernel instead of as a module.

Notably, in another test I overwrote aforementioned rule and loaded the module via modprobe without problem. Should this be reported as udev bug?

----------

## charles17

 *medaron wrote:*   

> I avoided the problem by compiling the Intel GPU driver into the kernel instead of as a module.
> 
> Notably, in another test I overwrote aforementioned rule and loaded the module via modprobe without problem. Should this be reported as udev bug?

 

I don't understand what's the benefit of having that driver as a module.

----------

## medaron

I previously used the default config for the gentoo-sources. I suppose that makes sense for the default config since at packaging time it is unknown what hardware the user has and compiling all drivers into the kernel would increase the memory use.

----------

## The Main Man

Funny thing, I can only build that driver as a module, dunno why it doesn't offer me a <*> , just <M> or nothing.

I'm on 4.4.3 gentoo-sources

----------

## medaron

I cannot check right now but IIRC, building the driver with <*> requires another option to be set to <*>, which is <M> in the gentoo default config.

----------

## The Main Man

Ah yes, DRM has to be <*> , thanks !

----------

