-
Notifications
You must be signed in to change notification settings - Fork 29
fix typo #266
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 typo #266
Conversation
controlled by the 'late_resume' parameter, will move the trigger point for resume to after devices have been decrypted or discovered allows resume from encrypted swap or devices requiring extra handling be visible to the kernel
currently it's more of a rearrangment of the original code, with some added safety/integrity checks `resume` is now a separate function, the plan is to have the code for actually resuming within this function and code for locating the device outside. in the more general case, if `late_resume` is enabled, the initram will check at both the `init_early` and again at the `init_premount` stage for the presence of the resume device. Once host-only is implemented then it'll be able to determine at build time which state it'll need to check at. For safety checks, currently it checks whether the device is a valid block device, whether resume has already been attempted previous (based on the content of `/sys/power/resume`) & whether there are are any other mounted block devices.
builds successfully, but still need to figure out why qemu fails
Support for resume from encrypted swap
Thanks linuxanddos2 for finding this Signed-off-by: Zen <[email protected]>
Signed-off-by: Zen <[email protected]>
62f8287 to
ae88de5
Compare
|
Thanks for this, I think I was able to rebase it to do about the same thing. Please let me know if I missed anything. I may go through it and "upgrade" some of the functions to use larger strings, instead of lists where possible as well |
|
the formatting should be a bit easier to work with now, I'm hoping this didn't break anything too much. I've just noticed some other changes which make config parsing stricter break the loading of the resume module. I'll look into a fix for that. |
|
should be fixed now, please let me know if I broke something in this rebase. edit: found some broken quotes, should work now. |
|
Tested: |
|
Used this config: What do you think about this: Foresee an parameter: Autodetect the UUID of other encrypted partitions. Also is [cryptsetup.xxx] necessary? |
Thanks for testing that stuff :D There is already an option to include the key file into the image, if I can see some value in setting a default key to be used for any mounts, but I think in most cases it's probably a best practice to use a unique key per LUKS container. [cryptsetup.xxx] is only necessary if you're specifying a mount which is not autodetected, or needs additional config, such as header/key files. I updated the example a fair bit to hopefully better explain how this stuff works: |
You'r welcome. Also tested on system without luks. ==> OK |
Thanks for the thorough testing :D Yes, it would be possible to detect that info, just a little bit tricky. I think a lot of the current code could be reused, but a lot of it operates off of mountpoints, like from /proc/mounts, as the place to start looking for info. This doesn't make it impossible to detect, it's just a bit different from current detection methods. Ideally, it should also do something like check for hibernation support before enabling the resume module, and then once the resume module is enabled, that can check for things like swap devices. There is also the case that a user may enable the resume module because they want to add swap/hibernate later, but it's not setup yet. |
|
c005a0d (a lot of the trouble is that this is a big pr and was done before/during a somewhat substantial project overhaul) |
|
I've double checked and this patch works flawlessly on my old test VM for resumes which has not been updated in a very long time, so I'm feeling pretty confident in these changes being good. I'll have to make a new vm with swap under lvm under luks or similar to test the more advanced stuff, but I'm happy this has not broken the most basic setups. |
536c593 to
c27b67d
Compare
|
I'm closing this as I think all relevant changes were integrated into the current resume branch. Current work is being done here: The important bit is that testing is added for these changes, covering a basic resume case, and an encrypted resume case. thanks for the help and fixes added here! |
sync resume with main