-
Notifications
You must be signed in to change notification settings - Fork 5
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
image-boot: use loopback mounts for all filesystems #398
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sfdisk from util-linux 2.38.1 additionally outputs the sector size. Adjust the test accordingly.
Current exfatprogs (v1.2.0) cannot format a 2M partition, fails with: boundary alignment is too big Work around this by increasing to 4mb.
We stopped creating swap partitions in 2018.
This was needed for Endless Mini which is now discontinued.
StandardOutput/StandardError values syslog and syslog+console are obsolete and cause systemd to complain during boot. Remove the pipes configuration here. StandardInput defaults to null, StandardOutput and StandardError default to journal, and that seems sufficient.
Reviewing this… |
wjt
approved these changes
Apr 12, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM except for a now-misleading comment and associated potential simplification/clarification.
Debian has changed to another upstream for exfatprogs which does not have the extent-listing functionality we were relying on for image boot from exfat. Now that both exfat and ntfs have decent kernel drivers, we have made the decision to avoid the complexity of the extent-mapping approach, and simply use the kernel's loopback mount functionality within partitions mounted with those new drivers to access the image files we are trying to boot from. In turn, we are able to remove /dev/mapper/endless-image-device and the corresponding /run/media/eoslive mount which only existed because in the extent-mapped approach it was not possible to mount the partition holding the image file. With the loopback approach it can now be mounted as normal. https://phabricator.endlessm.com/T35126
After removing the extent mapping approach for image booting, we are left with a simpler code flow logic with some obvious calls for simplification. After we set up the loopback device, we were setting up a device-mapper linear mapping against it. That had the function of handling non-standard sector sizes when booting from DVD (which we no longer care about). Then another linear mapping was placed on top when creating partitions. Another useful function of the mapping was to give the final root device a stable name (/dev/mapper/endless-image*), used by the subsequent initramfs logic, and also by eos-installer when seeking source image for installation. Eliminating the device mapper bits for simplicity, we now set up a symlink at /dev/disk/endless-image which points to the loop device that we are booting from. https://phabricator.endlessm.com/T35126
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
https://phabricator.endlessm.com/T35126