Skip to content
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

Fix owner group ids #134

Closed
wants to merge 4 commits into from
Closed

Fix owner group ids #134

wants to merge 4 commits into from

Conversation

Mic92
Copy link
Contributor

@Mic92 Mic92 commented Oct 11, 2023

Why

Create images with owner 11000 / group 11000 so that they do not come up as the nobody user in the repl.it.

What changed

We switched to an lkl fork that supports this feature. An upstream pull request has been opened: lkl/linux#532

This is the second attempt for this. We also noticed that lkl doesn't properly flush the journal as it reboots too quickly. This is now addressed by lkl/linux#534 The no-recovery option is no longer required after that, even for read-only mounts.

Test plan

$ nix build .#bundle-image
$ sudo mount -o ro,loop ./result/disk.raw /mnt
$ ls -lan /mnt
total 37
drwxr-xr-x  5     0     0  4096 Feb  2  1970 .
drwxr-xr-x 21     0     0    21 Oct  6 13:08 ..
drwxr-xr-x  3 11000 11000  4096 Oct  6 14:24 etc
drwx------  2     0     0 16384 Oct  6 14:29 lost+found
drwxr-xr-x  3 11000 11000  4096 Feb  2  1970 nix

Rollout

  • This is fully backward and forward compatible (assuming that no one depends on quirky behavior where files are owned by nobody)

In the other version we had the issue that umount wouldn't sync the journal correctly (maybe because of some other regression in lkl)
This is now fixed by mounting the filesystem read-only prior to umounting
@Mic92 Mic92 marked this pull request as ready for review October 11, 2023 14:33
@Mic92 Mic92 requested a review from a team as a code owner October 11, 2023 14:33
@Mic92 Mic92 requested review from airportyh and removed request for a team October 11, 2023 14:33
@ryantm ryantm mentioned this pull request Oct 11, 2023
@ryantm ryantm closed this in #135 Oct 11, 2023
@Mic92 Mic92 deleted the fix-owner-group-ids branch October 12, 2023 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant