anatol/booster

Add support for gz-compressed initramfs files

Closed this issue · 11 comments

Currently booster generates zstd-compressed initramfs files. zstd compression is supported by Linux kernel since 5.9 version. But the older kernels (like Arch linux linux-lts) needs gz compressed files.

Add support for gz compression. Add a configuration option for used compression.

I just added support for gzip and none compression to master branch. Booster should work with Arch LTS kernels now. Please try it and let me know if you see any issues with it.

The default compression is still zstd. To use gzip compression one need to set it to /etc/booster.yaml config file.

I was looking for a more automatic way to configure compression at generation time, something like "if kernel was compiled with CONFIG_RD_ZSTD then use zstd initramfs, otherwise check for CONFIG_RD_GZIP". But I do not see how one can read kernel configuration from on-disk binary like /boot/vmlinuz-linux.

libcg commented

I just built booster-git and regenerated the initramfs image for linux-lts using gzip/none. I'm not seeing any errors but it's hanging during boot just before "Welcome to Arch Linux" is displayed. When I add i915 in the modules, I can see modesetting is happening which indicates modules get loaded at least. 5.10 kernel boots fine.

@libcg the most likely reason you have this issue is a missed module needed to detect the root block device.

Could you please share output of lsmod when running your 5.4 kernel?

libcg commented

I don't have access to my computer right now, but I'm using btrfs on my root partition. Might be related.

Btrfs detection should work at 5.4 (and it seems works for you at 5.10).

Another way to debug the problem is to add booster.debug=1 and record the serial console output (easier to do with a phone camera).

libcg commented

lsmod.txt

booster.debug=1 output:
PXL_20210102_044010790

Thank you @libcg for the information.

Checking your lsmod I see you have several modules that are currently not added to booster images by default: ahci and sg. Try adding the modules to your config one-by-one and see if it helps you to boot to LTS kernel. And then let me know what driver is missing - it should be part of default module set.

PS you can inspect the content of the generated booster image using lsinitcpio /boot/booster-linux-lts.img.

libcg commented

@anatol it works fine after adding ahci to the list of modules. Makes sense since I'm using a SATA drive.

@libcg thank you for your feedback. I added 'ahci' to the default modules list and with the recent commit you don't need to keep it in your config file.

Your issue should be resolved now. Please let me know if you still have any additional issues.