You are not logged in.

#1 2018-02-09 20:57:43

Ochi
Member
Registered: 2010-04-06
Posts: 51

[SOLVED] Linux 4.15.1 sometimes not booting with missing nvme device

Hello,

Please also read the update below.

I have a dual boot setup with Arch on /dev/nvme1n1 and Win 10 on /dev/nvme0n1. I'm using grub to select the OS to boot. Win is encrypted using BitLocker, Arch is encrypted using LUKS. The /boot partition is an unencrypted btrfs partition.

After updating to Linux 4.15.1 I was at first able to use Arch as usual and could reboot without obvious problems. Today I booted Windows 10 and after a while I wanted to reboot to Arch. However, after selecting Linux I was greeted with the following message instead of the usual encryption key entry:

"ERROR: Failed to open encryption mapping: The device /dev/nvme1n1p2 is not a LUKS volume and the crypto= parameter was not specified."

So I tried opening the LUKS device using an Arch boot stick and it worked without problems. However, even after rebuilding the initramfs or reinstalling the kernel I wasn't able to boot normally. Downgrading to Linux 4.14.13 helped, so I assumed it to be a kernel version issue. However, since I was able to boot 4.15.1 before, I dug a little deeper.

It turns out that I am able to reinstall and boot 4.15.1 normally _until_ I boot Windows 10 once. After that, the kernel shows the above message. Only downgrading to 4.14 seems to bring it back to life. Shutting down instead of rebooting doesn't seem to help either. I was able to reproduce this multiple times: Install 4.15, boot normally, start Windows, 4.15 is broken until I downgrade.

I also uninstalled intel-ucode in Linux since I had a vague feeling that this could be something about the current Meltdown/Spectre fixes. But uninstalling intel-ucode didn't seem to help. I'm not sure if this could have something to to in that direction.

I could try 4.15.2 from testing and see if this changes something. At least it has some more changes regarding the Spectre fixes. Nonetheless, I wanted to let you know what I'm observing and if anyone has seen similar problems.

Best regards
Ochi

UPDATE:
This might not be an issue related to Windows 10 after all. After more testing I noticed that the error also sometimes occurs when I reboot from Arch. Also tried kernel 4.15.2 from testing but it also occurred there. Once the issue occurs I may need to reboot (i.e. Ctrl-Alt-Del after the "Failed to open encryption mapping" error occurs) multiple times until I get a encryption password prompt. Maybe the nvme devices are sometimes not initialized quickly enough. That said, I never experienced this problem before with this very hardware since installing this Arch install 1.5 years ago.

Some specs, if relevant:
ASUS Z170-WS mainboard, latest BIOS
Intel Core i7-6700K
grub 2:2.02-4
Dual-booting with Windows 1709

Last edited by Ochi (2018-02-09 22:38:34)

Offline

#2 2018-02-09 22:13:41

progandy
Member
Registered: 2012-05-17
Posts: 5,190

Re: [SOLVED] Linux 4.15.1 sometimes not booting with missing nvme device

I'm not too familiar with nvme devices. Are the device names static or might they change if linux recognizes them in a different order? In that case, can you define the root partition with e.g.

/dev/disk/by-partuuid/ABCDEF01234
root=PARTUUID=ABCDEF01234

Last edited by progandy (2018-02-09 22:20:30)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#3 2018-02-09 22:37:44

Ochi
Member
Registered: 2010-04-06
Posts: 51

Re: [SOLVED] Linux 4.15.1 sometimes not booting with missing nvme device

Ohhh, that was a good guess. smile I was not expecting that but you are right. I checked the partuuids of nvme0n1p2 and nvme1n1p2 on the recovery console and they are in fact sometimes swapped. This must be a new behavior of kernel 4.15 as this was working for a long time, until now. Seems to be working well now using partuuids for opening the cryptdevice. Thank you smile

Offline

Board footer

Powered by FluxBB