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

image-boot: use loopback mounts for all filesystems #398

Merged
merged 7 commits into from
Apr 12, 2024
Merged

image-boot: use loopback mounts for all filesystems #398

merged 7 commits into from
Apr 12, 2024

Conversation

dsd
Copy link
Member

@dsd dsd commented Apr 12, 2024

dsd added 5 commits April 9, 2024 13:37
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.
@dsd dsd requested a review from wjt April 12, 2024 01:18
@wjt
Copy link
Member

wjt commented Apr 12, 2024

Reviewing this…

Copy link
Member

@wjt wjt left a 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.

dracut/image-boot/eos-image-boot-setup Outdated Show resolved Hide resolved
dsd added 2 commits April 12, 2024 14:13
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
@dsd dsd merged commit da3b16e into master Apr 12, 2024
2 checks passed
@dsd dsd deleted the T35126 branch April 12, 2024 20:18
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.

2 participants