#1622 modify koji to that it can accept configurable rootfs image type
Opened 5 years ago by chrismurphy. Modified a year ago

This issue starts here
https://pagure.io/releng/issue/8646#comment-591085

Gist is that lorax/livemedia-creator supports two kinds of images now. The default (no option), creates an ext4 rootfs file that's nested in a squashfs file. The new option is --squashfs-only which creates a plain (no ext4) squashfs file.

It might be useful to make this configurable, for future image types, or for testing and revert capability. But it's also valid to just change koji's default to always call lmc with --squashfs-only.

In case it's useful to see all the related changes to lorax, what it's doing with/without --squashfs-only

https://github.com/weldr/lorax/pull/822/files


@breilly please take a look and provide an estimate for the level of effort needed to implement this.

Metadata Update from @dgregor:
- Custom field Size adjusted to None

5 years ago

BTW the Anaconda change only affects "Lives" for now, and it sounds like boot.iso/DVD/netinstall could already do this via a lorax option. I guess the advantage of having a switch to control this at a higher level (in koji) is keeping the change isolated. Plausibly releng or even spin owners might want different options? There is a 3rd type of image I'm thinking of down the road that has advantages, that isn't squashfs based.

https://github.com/rhinstaller/anaconda/pull/2070#issuecomment-523505070

It would be nice to have option of what type and compression level. That would allow us flexability...

@bcl Is there zstd support in lorax/lmc? I'm too stupid to find it if it is. Also, squashfs-tools 4.4 is the first upstream version with zstd support. The 4.3-xx in koji for Fedora right now has it added by the Fedora maintainer and I have no idea if it's the same thing as what upstream merged into 4.4.

Don't feel bad, I had to look at the code :)

lorax doesn't have a cmdline option to set it, but there is the obscure and undocumented lorax.conf file which has a section for it../src/pylorax/__init__.py:configure() reads it and sets the defaults to xz
If you change it, it will (should) get passed down to the mksquashfs -comp argument.
You can point lorax to a custom lorax.conf with lorax --config /path/to/file, something like this should work:

[compression]
type=zstd

(untested, but now I'm curious...)

Is there a way to control the level of compression? The zstd default of 3 does not compare favorably to xz's default in terms of compression ratio, but is much better on speed. I expect releng will prefer zstd:16 but that's just me guessing based on rudimentary testing.

Contains a grid comparing various compression algos and levels in squashfs, including xz and zstd. I think this is using appimage data so it should be a semi-sane representation of what we'd get.
https://github.com/AppImage/AppImageKit/issues/478

Update: Funny enough, that issue shows squashfs-tools master has had zstd support for at least a couple years, which is almost certainly how Fedora has had it included. It's just that upstream only got around to having an official release with it a few months ago in 4.4. So it's not like this is uncharted code.

You can pass extra args using 'args' in that section. It's a space separated string of arguments that gets split for passing to mksquashfs.

According to the F31 mksquashfs manpage the default for zstd is 15, not sure where you saw 3 at.

Ohhh. The zstd default is 3. I spaced out (again) that squashfs folks have set their own default for it. My brain is stuck in Btrfsland where it also defaults to 3.

Parent ticket this request comes from has been updated:
https://pagure.io/releng/issue/8646#comment-855960

The gist is the feature is still desired. LiveOS images still use a nested ext4 image in an xz compressed squashfs image.

A plain squashfs with zstd image would be much more performant to use for all our Lives than what we have today.

Even more optimal would be a btrfs seed image, which would bring additional features mentioned in more detail in the releng comment.

Kiwi plugin should be theoretically able to do this. @ngompa?

Log in to comment on this ticket.

Metadata