Sample Header Ad - 728x90

Compress Linux Kernel with xz

0 votes
1 answer
1451 views
Just out of curiosity, is it possible to compress the Linux kernel with xz, and if so, how would I go about this? I actually tried compressing a raw kernel image with xz [a silly idea] and loading it from the grub prompt and got the following:
grub> linux /vmlinuz-6.0.5.xz root=/dev/sda2 rootfstype=ext4 rootwait ro
Invalid magic number
grub>
Like I stated before, this was a hopeless idea and I had expected an error. But is there an actual method of compressing the Linux kernel with xz? Please note that I normally develop for Raspberry Pi, so some configuration options available in x86_64 may not be present there.
Asked by rando (125 rep)
Dec 28, 2022, 01:12 PM
Last activity: Dec 28, 2022, 05:55 PM