You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When my darwin.linux-builder stopped working, I realized that pre-#236656 NixOS disk images no longer work, showing an error like:
starting device mapper and LVM...
waiting for device /dev/disk/by-label/nixos to appear.......................
Timed out waiting for device /dev/disk/by-label/nixos, trying to mount anyway.
mounting /dev/disk/by-label/nixos on /...
[ 21.840445] /dev/disk/by-label/nixos: Can't open blockdev
mount: mounting /dev/disk/by-label/nixos on /mnt-root/ failed: No such file or directory
An error occurred in stage 1 of the boot process, which must mount the
root filesystem on `/mnt-root' and then start stage 2. Press one
of the following keys:
r) to reboot immediately
*) to ignore the error and continue
As we can't drop into a shell here, we can't manually mount the root partition which means we are unable to use our old disk image.
The main breaking change in that PR is that the rootfs needs to be labelled as nixos.
You can migrate your VM disk images manually by using the old VM run script, then running sudo e2label /dev/vda nixos. In the case of darwin.linux-builder, the path to this script can be found in your old profiles e.g. /nix/var/nix/profiles/system-N-link/Library/LaunchDaemons/org.nixos.linux-builder.plist.
Expected behavior
It would be nice if there was an automated migration as most, if not all, disk images are going to be ext4, so it should be possible to use the old logic to find the rootfs and use e2label to change its label. Alternatively, a manual migration script which users can run on their disk images would be great too for users who want to retain the disk images after this PR.
Describe the bug
When my
darwin.linux-builder
stopped working, I realized that pre-#236656 NixOS disk images no longer work, showing an error like:As we can't drop into a shell here, we can't manually mount the root partition which means we are unable to use our old disk image.
The main breaking change in that PR is that the rootfs needs to be labelled as
nixos
.You can migrate your VM disk images manually by using the old VM run script, then running
sudo e2label /dev/vda nixos
. In the case ofdarwin.linux-builder
, the path to this script can be found in your old profiles e.g./nix/var/nix/profiles/system-N-link/Library/LaunchDaemons/org.nixos.linux-builder.plist
.Expected behavior
It would be nice if there was an automated migration as most, if not all, disk images are going to be ext4, so it should be possible to use the old logic to find the rootfs and use
e2label
to change its label. Alternatively, a manual migration script which users can run on their disk images would be great too for users who want to retain the disk images after this PR.Notify maintainers
@nikstur
The text was updated successfully, but these errors were encountered: