Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

LZ4 decompression on Boot

296 views
Skip to first unread message

Andre Massena

unread,
Oct 29, 2014, 5:30:07 AM10/29/14
to
Hello all,


having trawled through several search engines and perused various Debian
lists, I am still in the dark...

I am running Debian Jessie (Kernel 3.17.1) on a Thinkpad X230. I would like
to use LZ4 to compress/decompress the kernel on booting.
As per apt-get, the release of liblz4-1 I am running is r122-2.

I have the following kernel settings -

CONFIG_HAVE_KERNEL_LZ4=y
CONFIG_KERNEL_LZ4=y
CONFIG_KERNEL_LZ4=y
CONFIG_ZRAM_LZ4_COMPRESS=y
CONFIG_CRYPTO_LZ4=y
CONFIG_CRYPTO_LZ4HC=y
CONFIG_LZ4_COMPRESS=y
CONFIG_LZ4HC_COMPRESS=y
CONFIG_LZ4_DECOMPRESS=y
CONFIG_DECOMPRESS_LZ4=y

in /etc/initramfs-tools/conf.d I have a file called "lz4" which contains the
line
COMPRESS=lz4c.
I subsequently run update-initramfs with the appropriate switches and reboot.


Result is a "initramfs unpacking failed: junk in compiled archive" message
at boot.


Does anyone have an idea what I might have done wrong/incorrect or indeed
any pointers?



Regards,



Andre

--------------------------------------------------------------------------------
www.lavache.com : l'email gratuit sans pub, vachement meuh.
www.hugolescargot.com : coloriage, fiches recettes et bricolage, chansons, etc.
www.jeux-gratuits.com : des jeux en ligne pour toute la famille.


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: https://lists.debian.org/1414574536.5...@lavache.alinto.com

John-John Tedro

unread,
Oct 29, 2014, 6:40:05 AM10/29/14
to

On 29 Oct 2014 10:29, "Andre Massena" <andre_...@lavache.com> wrote:
>
> Hello all,
>
>
> having trawled through several search engines and perused various Debian
> lists, I am still in the dark...
>
> I am running Debian Jessie (Kernel 3.17.1) on a Thinkpad X230. I would like
> to use LZ4 to compress/decompress the kernel on booting.
> As per apt-get, the release of liblz4-1 I am running is r122-2.
>
> I have the following kernel settings -
>
> CONFIG_HAVE_KERNEL_LZ4=y
> CONFIG_KERNEL_LZ4=y
> CONFIG_KERNEL_LZ4=y
> CONFIG_ZRAM_LZ4_COMPRESS=y
> CONFIG_CRYPTO_LZ4=y
> CONFIG_CRYPTO_LZ4HC=y
> CONFIG_LZ4_COMPRESS=y
> CONFIG_LZ4HC_COMPRESS=y
> CONFIG_LZ4_DECOMPRESS=y
> CONFIG_DECOMPRESS_LZ4=y
>
> in /etc/initramfs-tools/conf.d I have a file called "lz4" which contains the
> line
> COMPRESS=lz4c.
> I subsequently run update-initramfs with the appropriate switches and reboot.
>

I believe this causes the initramfs image to be compressed differently.
It would then seem that your boot loader is unable to decompress it.

>
> Result is a "initramfs unpacking failed: junk in compiled archive" message
> at boot.
>
>
> Does anyone have an idea what I might have done wrong/incorrect or indeed
> any pointers?
>
>
>
> Regards,
>
>
>
> Andre
>
> --------------------------------------------------------------------------------
> www.lavache.com : l'email gratuit sans pub, vachement meuh.
> www.hugolescargot.com : coloriage, fiches recettes et bricolage, chansons, etc.
> www.jeux-gratuits.com : des jeux en ligne pour toute la famille.
>
>
> --
> To UNSUBSCRIBE, email to debian-us...@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
> Archive: https://lists.debian.org/1414574536.5...@lavache.alinto.com
>

My guess is that your version/variant of grub (or lilo) doesn't understand lz4.

Andre Massena

unread,
Oct 29, 2014, 6:50:05 AM10/29/14
to
John,



I was not aware that Grub played a role in decompressing a kernal at boot as
that is a kernel function.

I am running Grub 2.02 if that matters.

What I should have mentioned in my first post is that "gzip" (of course) and
"xz" work flawlessly in decompressing at boot, if selected.


Regards,



Andre


En réponse à John-John Tedro <johnjoh...@gmail.com> :
> ------------------ Début du message d'origine --------------------
> ------------------- Fin du message d'origine ---------------------




--------------------------------------------------------------------------------
www.lavache.com : l'email gratuit sans pub, vachement meuh.
www.hugolescargot.com : coloriage, fiches recettes et bricolage, chansons, etc.
www.jeux-gratuits.com : des jeux en ligne pour toute la famille.


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: https://lists.debian.org/1414579398.5...@lavache.alinto.com

Andre Massena

unread,
Oct 29, 2014, 8:30:03 AM10/29/14
to
No takers here?

I would have thought that compress/decompress at Boot would have been mildly
interesting for some...


Regards,



Andre




En réponse à Andre Massena <andre_...@lavache.com> :
Archive: https://lists.debian.org/1414585297.5...@lavache.alinto.com

Andre Massena

unread,
Oct 29, 2014, 1:30:05 PM10/29/14
to
I cannot believe that nobody has tried to boot using LZ4 kernel
compression/decompression.

According to the (very sparse) documentation, this feature has been
available since the end of 2013.
Archive: https://lists.debian.org/1414603300.5...@lavache.alinto.com

Didier 'OdyX' Raboud

unread,
Oct 29, 2014, 1:40:05 PM10/29/14
to
Hi Andre,

Le mercredi, 29 octobre 2014, 11.43:18 Andre Massena a écrit :
> I was not aware that Grub played a role in decompressing a kernal at
> boot as that is a kernel function.
> (…)

Le mercredi, 29 octobre 2014, 13.21:37 Andre Massena a écrit :
> No takers here?
> (…)

Le mercredi, 29 octobre 2014, 18.21:40 Andre Massena a écrit :
> I cannot believe that nobody has tried to boot using LZ4 kernel
> compression/decompression.

I would suggest that you wait slightly more than 5 hours before re-
pinging the list… Please be patient.

Now, for the subject at hand, I suspect most users don't care switching
away from the default kernel compression scheme, which happens to "just
work". It also has a minor impact on disk-space and an even smaller
impact on boot time. I'm not really surprised you aren't getting many
answers.

Cheers,
OdyX


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: https://lists.debian.org/9575760.FJjgp76Vrn@gyllingar

Vanessa Blöchinger

unread,
Oct 29, 2014, 2:20:04 PM10/29/14
to
Hi Andre,

looks like the kernel is using an older, less standardized format for
its lz4 compression. Use the -l switch on lz4c for linux kernel support.

See the lz4 man page and
https://code.google.com/p/lz4/issues/detail?id=66#c2

Regards
Vanessa


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: https://lists.debian.org/54512BF...@ulukai.org

Andre Massena

unread,
Oct 30, 2014, 3:00:05 AM10/30/14
to
There is no "-l" (streaming) switch available on the r122 version of LZ4 I
am running.

I have see the "-l" option mentioned in other (non-Debian) forums however.


Regards,



Andre


En réponse à Vanessa Blöchinger <vanessa.b...@ulukai.org> :
> ------------------ Début du message d'origine --------------------
>
> ------------------- Fin du message d'origine ---------------------




--------------------------------------------------------------------------------
www.lavache.com : l'email gratuit sans pub, vachement meuh.
www.hugolescargot.com : coloriage, fiches recettes et bricolage, chansons, etc.
www.jeux-gratuits.com : des jeux en ligne pour toute la famille.


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: https://lists.debian.org/1414652028.5...@lavache.alinto.com

Vanessa Blöchinger

unread,
Oct 30, 2014, 5:10:05 AM10/30/14
to
On 2014-10-30 07:53, Andre Massena wrote:
> There is no "-l" (streaming) switch available on the r122 version of LZ4 I
> am running.
>
> I have see the "-l" option mentioned in other (non-Debian) forums however.
>
>
> Regards,
>
>
>
> Andre

This is what i get in jessie's lz4, version 0.0~r122-2:


root@jessie:~# lz4 -h
*** LZ4 Compression CLI 64-bits r122, by Yann Collet (Sep 18 2014) ***

[snip]

Advanced arguments :
-V : display Version number and exit
-v : verbose mode
-q : suppress warnings; specify twice to suppress errors too
-c : force write to standard output, even if it is the console
-t : test compressed file integrity
-l : compress using Legacy format (Linux kernel compression)
>> ------------------- Fin du message d'origine ---------------------


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: https://lists.debian.org/5451FEC4...@ulukai.org

Andre Massena

unread,
Oct 30, 2014, 5:30:04 AM10/30/14
to
Vanessa,


you are of course correct.


I went to the trouble of downloading the latest (r123) LZ4 tools source and
compiled same.
There is indeed an "-l" switch which is only visible when the "long help"
(-H) argument is passed....

I am however, still in the dark as to how I get my kernel
compressed/decompressed (see original post).

Information/documentation as to how to accomplish this on a Debian system is
sparse, to say the least.


Regards,



Andre
--------------------------------------------------------------------------------
www.lavache.com : l'email gratuit sans pub, vachement meuh.
www.hugolescargot.com : coloriage, fiches recettes et bricolage, chansons, etc.
www.jeux-gratuits.com : des jeux en ligne pour toute la famille.


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: https://lists.debian.org/1414661104.5...@lavache.alinto.com
0 new messages