-
-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
/var/lib/nixos/uid-map corrupted when using nixos-rebuild build-vm many times #97305
Comments
should be fixed by #98544 |
I marked this as stale due to inactivity. → More info |
I still get something similar on unstable if I kill the machine while it's booting. Start a blank NixOS VM and kill the VM when systemd takes over in stage 2, and that VM will not have valid users upon reboot. |
What does the file look like in this case? |
I marked this as stale due to inactivity. → More info |
Something like this happened to me on my workstation. It may also have been more like #61755 or something completely different, can't tell. But what happened is that I rebuilt my local system multiple times with Initially I had an error saying something like
I solved this with the following magic. It takes the files from the journal and moves them to the folder
The files in the folder
I assume this is some error during activation, maybe even a problem with It might make sense to have some kind of check in the activation which makes sure that such broken symlinks and broken/unreadable |
I had a similar experience as @Melkor333 today, in the end I had to blow away |
I also encountered this issue. I run NixOS in a VM running multiple podman containers, one of them is qBittorrent, and it filled the entire rootfs. After enlarging the partition I still cannot log into the system, which lead me to investigate and found this issue. I'm using btrfs single inside and dup outside of the VM disk, so that might be why it was corrupted. Checking G/UID map shows the same symptom:
which is why I restored those 2 files from my backup and was able to log into my system again. |
This is still a problem. I got this today and had to delete the |
Describe the bug
I was using
nixos-rebuild build-vm
to test a PR i was working on. At some point i was not able to login and many services don't started./var/lib/nixos/uid-map
and/etc/shadow
contain only zerosRelated to #69365, #26788, #61755, #82755
To Reproduce
Steps to reproduce the behavior:
minimal config:
nixos-rebuild build-vm -I nixpkgs=~/code/nixpkgs/ -I nixos-config='/home/davidak/root'
/nix/store/js7vf96xzsvj6h23p3jcbixlx0qyvmhq-nixos-vm/bin/run-nixos-vm
Workaround:
remove disk image file:
rm ./nixos.qcow2
now it boots:
after removing it, i can't reproduce it anymore.
Expected behavior
NixOS boots into working system
The text was updated successfully, but these errors were encountered: