-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
nixos/etc: file content missing in generated erofs when using overlay #392109
Comments
I'm not able to reproduce the issue after modifying nixpkgs' NixOS tests related to |
Thank you for your kind reply. I know nothing about etc.overlay feature, but I'm just wondering does the line in etc-dump
looks like a correct result? because I think its nix store source path is missing here, while appears in the etc-json file, so it should looks like
please correct me if I got it wrong :P If the line in etc-dump is actually not right, maybe there's something wrong in the python script used to generate it. So maybe I can provide the origin etc-json file, to make the debug process easier. So the etc-json and etc-dump is in the attachment. n9wqbdwz4q5zv4kyrihxggnakl3vh6k6-etc-json.json 7zrclhm261smhj278lmchl5ifimr26v8-etc-dump.txt (I manually appended .json and .txt to the filenames to make my file picker can recognize them as files to upload)
I'm glad to help providing more information. But my configuration files are messed up and ... I need some time to clean up. |
I made a search on the etc-dump file and found that the sudoers is the only "file", all other things are symlinks. I don't know why. But I think here's the direct cause: And the sudoers file, the only edit: I misunderstood how composefs works. It only stores metadata. So previous lines are wrong, and I need to find now the backing dir for overlay etc works now... |
I found something new: nix-repl> (builtins.elemAt nixosConfigurations.SaltyKitkat.config.boot.initrd.systemd.mounts 1).options
"relatime,redirect_dir=on,metacopy=on,lowerdir=/run/nixos-etc-metadata::/etc-basedir,rw,upperdir=/sysroot/.rw-etc/upper,workdir=/sysroot/.rw-etc/work"
nix-repl> "${nixosConfigurations.SaltyKitkat.config.system.build.etcBasedir}"
"/nix/store/68n1pxl1dsijrrrr0z0pff3jxfbkszaa-etc-lowerdir" The lowerdir seems not set correctly. It should be |
Nixpkgs version
Describe the bug
I notice the
sudoers
is not working as expected after enabling the etc.overlay option. Then I dumped the erofs generated by nix. I found the sudoers file is filled with all 0x00 bytes, but the same size as the sudoers source in the nix store. Then I learnt how the erofs image is generated, so I checked the etc-json and etc-dump file. In etc-json, I gotwhile in etc-dump, I got
It seems there's something wrong when converting the json to the dump file, since the source info is lost.
Steps to reproduce
set
system.etc.overlay.enable = true;
Expected behaviour
generate a normal etc erofs image
Screenshots
No response
Relevant log output
Additional context
By the way, I found that there's a lot of char files named from
00
toff
in the erofs image. Is this expected?System metadata
Notify maintainers
@ivan770 @nikstur
Note for maintainers: Please tag this issue in your pull request description. (i.e.
Resolves #ISSUE
.)I assert that this issue is relevant for Nixpkgs
Is this issue important to you?
Add a 👍 reaction to issues you find important.
The text was updated successfully, but these errors were encountered: