mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-01-11 14:20:23 +01:00
[BUG] /dev/nvme01px is not a valid luks device. #23
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
0504d0503b