jeaye / nixos-in-place

Install NixOS on top of any existing Linux distribution without rebooting
MIT License
460 stars 57 forks source link

Use drive UUID instead of /dev name #49

Open werner291 opened 5 years ago

werner291 commented 5 years ago

Greetings!

I recently ran into a bizzarre problem where my NixOS installation suddenly wouldn't boot.

As it turned out, through some mysterious shenanigans that I have yet to exorcize, /dev/sda1 no longer referred to the partition that contained NixOS, instead referring to a small partition that contained what appeared to be some old Debian-related junk. The NixOS installation was suddenly in /dev/sda2. I finally did get the installation to boot again after re-labeling things in the partition table.

Proposed fix: During stage 1, mount the drive by UUID instead of its' name in /dev.