Originally created by @ryan4yin on GitHub (Jan 16, 2024).
After enabling LUKS encryption, NixOS has a high probability of reporting an error on boot:
/dev/nvme01px is not a valid luks device
Multiple restarts can avoid this problem.
Originally created by @ryan4yin on GitHub (Jan 16, 2024).
After enabling LUKS encryption, NixOS has a high probability of reporting an error on boot:
```
/dev/nvme01px is not a valid luks device
```
Multiple restarts can avoid this problem.
adam
added the bug label 2025-12-28 23:18:54 +01:00
Every time I reboot, /dev/nvme0n1 is randomly assigned to any of my hard drives.
NixOS will start properly only if it is correctly assigned to my NixOS's drive.
Resolution: Replace device name with drive UUID in my configuration.
@ryan4yin commented on GitHub (Jan 16, 2024):
NickCao: When you have multiple disks of the same type(SSD/HDD), their disk number is random on every boot.
So the problem is caused by: https://github.com/ryan4yin/nix-config/blob/c4a28eb/hosts/idols/ai/hardware-configuration.nix#L48
```
boot.initrd = {
luks.devices."crypted-nixos" = {
device = "/dev/nvme0n1p2";
# ...
};
};
```
Every time I reboot, `/dev/nvme0n1` is randomly assigned to any of my hard drives.
NixOS will start properly only if it is correctly assigned to my NixOS's drive.
Resolution: **Replace device name with drive UUID in my configuration**.
@ryan4yin commented on GitHub (Jan 28, 2024):
fix: failed to boot - replace device name by uuid https://github.com/ryan4yin/nix-config/commit/0504d0503ba7d62882f47798ff77c2449d2da4ff
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @ryan4yin on GitHub (Jan 16, 2024).
After enabling LUKS encryption, NixOS has a high probability of reporting an error on boot:
Multiple restarts can avoid this problem.
@ryan4yin commented on GitHub (Jan 16, 2024):
NickCao: When you have multiple disks of the same type(SSD/HDD), their disk number is random on every boot.
So the problem is caused by: https://github.com/ryan4yin/nix-config/blob/c4a28eb/hosts/idols/ai/hardware-configuration.nix#L48
Every time I reboot,
/dev/nvme0n1is randomly assigned to any of my hard drives.NixOS will start properly only if it is correctly assigned to my NixOS's drive.
Resolution: Replace device name with drive UUID in my configuration.
@ryan4yin commented on GitHub (Jan 28, 2024):
fix: failed to boot - replace device name by uuid https://github.com/ryan4yin/nix-config/commit/0504d0503ba7d62882f47798ff77c2449d2da4ff