# [SOLVED] mount root on LVM "no such file or directory"

## VinzC

Hi.

I've just finished upgrading my laptop and it went well, at least I can boot it with kernel 4.9.75. But when I boot with kernel 4.14.63-r1, I'm gratified with an error message from the initramfs such as this:

```
mount -t ext4 -o ro,relatime,data=ordered /dev/dm-0 /newroot

mount: mounting /dev/dm-0 on /newroot failed: No such file or directory
```

But *all* of the logical volumes were detected (6 actually);

directory /newroot exists — it's from the initramfs!

/dev/dm-0 exists and is the root filesystem. Now I'm stuck and I don't know what to check.

Note that I have (as you guessed) my root filesystem on LVM2;

I generate my initramfs with genkernel initramfs --lvm;

after the upgrade I rejuvenated the initramfs for kernel 4.9.75 and it works fine;

I'm not using systemd but openrc;

I'm not using Grub but extlinux (don't know why it should matter but for completeness' sake);

the root filesystem is passed to the kernel as root=UUID=xxx and it's OK since the initramfs successfully translated that into /dev/dm-0;

lvm2 is not compiled with static-libs but it seems no longer seems to matter with kernel 4.9 lineage at least, so I guess...

I tried running the mount instruction manually in rescue mode (typed "shell" when prompted from the initramfs) and even that fails (  :Shocked:  WTF?!?)

I ran blkid /dev/dm-0 from safe mode and it returned the root file system's label and UUID so it looks like only the mount operation is the root cause...

A little help would be appreciated as I don't remember having ever run into this kind of trouble  :Sad:  .

Thanks a whole lot in advance.

----------

## VinzC

Turned out to be a missing module *facepalm*. I peeked at dmesg and I saw the following error message (approximately)

```
modprobe: could not load crc32c
```

So I compiled my kernel again and moved CRC32C into the kernel, rebooted and... voilààààà!

Under the hood: I had that module compiled as an external module. However it looks like genkernel misses that essential component (with kernel 4.14 at least) when building the initramfs. Flipping the {M} into a {*} in menuconfig did the job:

```
    Library routines  --->

        -*- CRC32/CRC32c functions

        {*} CRC32c (Castagnoli, et al) Cyclic Redundancy-Check  <-- that one is required to boot with an initramfs!
```

Case closed.

----------

