-
Notifications
You must be signed in to change notification settings - Fork 25
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
Use hardlinks, bind mount and systemd-tmpfiles to simplify the logic #20
base: master
Are you sure you want to change the base?
Conversation
Brilliant idea. But there's one little flaw: what if the user would like to revert back to the running kernel without a reboot? The bind mounted old kernel would essentially block the downgrade path. |
Good point.
Maybe it can be solved with another hook which removes the bind mount on
upgrade if there is one matching the current kernel.
I'll think about that, a bit busy with life right now.
|
This looks wrong to ignore files in the repostory.
The Unlicense license is include in the licenses packages, not need to include it.
9497d34
to
cfa301a
Compare
Hi o/ So I reworked a bit the hooks: The pre-hook:
WARNING: I haven't tested it yet. Thoughts ? |
7768fbc
to
401c1fe
Compare
Great job! |
401c1fe
to
4c9caab
Compare
This use cp with hardlinks + a bind mount for keeping the removed kernel modules accessible. Cleaning up the backup is done by systemd-tmpfiles on next boot. Cleaning up the mount is either done on shutdown implicitly, or when we reinstall the running kernel by the pre-hook script. No systemd service enabling is needed.
Your script is faulty in several ways |
It's actually worse than that, because rollback is really problematic.
You end up with files present conflicting with files pacman want to
place in the fs.
A proper solution should be to use depmod to tell the kernel where the
modules are, but I need to look at documenation for that and I've been
missing the time.
|
I don't see any file conflict. |
should have removed the mount point after umount |
Hi folks,
I propose to simplify the logic by relying on bind mount and systemd-tmpfiles
instead of cleaning up ourselves.
High-level view of new workflow :
On kernel upgrade / or removal :
transaction to /usr/lib/modules/backup-$(kver)
/usr/lib/modules/$(kver)
-> we delete recursively dir matching
/usr/lib/modules/backup-*
-> we delete empty dir matching
/usr/lib/modules/*
(installed kernel is notemtpy so it will not be deleted, but the mount point for the old kernel is)
That's a pretty big change ; I'm ok forking if you think it does not fit that
project.
Thanks.