[arch-projects] [mkinitcpio] lz4 support
Hi, sorry in advance if I haven't reported this correctly. I was hesitant to file a bug report until I was sure it is a bug, and what the bug was in. I just tested lz4 compression with mkinitcpio after noticing it in the conf.pacnew. When I rebooted I got the following error after grub and my computer froze: [0.<cut>] Initramfs unpacking failed: junk in compressed archive [0.<cut>] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) [0.<cut>] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.12.5-1-ARCH #1 [0.<cut>] Hardware name: Gigabyte Technology Co., Ltd. EP45-DS4/EP45-DS4, BIOS F10e 10/06/2010 [0.<cut>] <3 lines, each containing 4 groups of 16 hexadecimal characters seperated by a space> [0.<cut>] Call Trace: [0.<cut>] [<ffffffff814ee44b>] dump_stack+0x54/0x8d [0.<cut>] [<ffffffff814eb62c>] panic+0xc8/0x1d7 [0.<cut>] [<ffffffff818e2458>] mount_block_root+0x2a1/0x2b0 [0.<cut>] [<ffffffff818e24ba>] mount_root+0x53/0x56 [0.<cut>] [<ffffffff818e25f4>] prepare_namespace+0x137/0x16f [0.<cut>] [<ffffffff818e20df>] kernel_init_freeable+0x1d2/0x1e0 [0.<cut>] [<ffffffff818e189a>] ? do_early_param+0x88/0x88 [0.<cut>] [<ffffffff814e0c60>] ? rest_init+0x90/0x90 [0.<cut>] [<ffffffff814e0c6e>] kernel_init+0xe/0x190 [0.<cut>] [<ffffffff814fcf3c>] ret_from_fork+0x7c/0xb0 [0.<cut>] [<ffffffff814e0c60>] ? rest_init+0x90/0x90 After I disabled lz4 via a chroot the system booted successfully again. I saw the note about using a recent version of lz4 so I installed the most recent version with pacman before running mkinitcpio -p linux and no errors were produced. So far I haven't found anything constructive from searching the internet but three possibilities have occurred to me: 1) I first found the messages to the linux kernel mailing list adding support for lz4 to the kernel, describing it for arm and x86 so I initially assumed lz4 compressed images weren't supported with x86_64. 2) I then read the thread (https://code.google.com/p/lz4/issues/detail?id=83) linked from the lz4 commit in the mkinitcpio git repository ( https://projects.archlinux.org/mkinitcpio.git/commit/?id=b5927393d103af9b8b2...), although I'm not sure I understood everything in that thread I wonder if it may be a bug in lsinitcpio. 3) grub has "insmod gzio" in grub.cfg for all arch menu entries and looking at gzio on the grub git it states it is for gzip decompression. I also found lzopio.mod in /usr/lib/grub/i386-pc and /usr/lib/grub/x86_64-efi, though I can't find any description for it I wonder if grub needs another module for decompressing the lz4 ramdisk. Has a lz4 compressed ramdisk worked for anyone else and if it has can you help me rule out any of these options or does anyone think I missed something? I'm using kernel v3.12.5-1, grub (BIOS, not EFI) v2.00.1282.g5ae5c54-1, lz4 v109-2, mkinitcpio v16 and Arch x86_64. Many thanks. Please note: I copied the error message manually from the frozen computer and cut the times and the groups of hexadecimal characters relating to my motherboard/bios but I can recreate the issue to get them if it helps resolve the problem.
On Fri, Dec 20, 2013 at 02:58:36AM +0000, Chris Rule wrote:
Hi, sorry in advance if I haven't reported this correctly. I was hesitant to file a bug report until I was sure it is a bug, and what the bug was in.
I just tested lz4 compression with mkinitcpio after noticing it in the conf.pacnew.
When I rebooted I got the following error after grub and my computer froze: [0.<cut>] Initramfs unpacking failed: junk in compressed archive
...
[0.<cut>] Kernel panic - not syncing: VFS: Unable to mount root fs on
<snip>
1) I first found the messages to the linux kernel mailing list adding support for lz4 to the kernel, describing it for arm and x86 so I initially assumed lz4 compressed images weren't supported with x86_64.
x86_64 is still x86.
2) I then read the thread (https://code.google.com/p/lz4/issues/detail?id=83) linked from the lz4 commit in the mkinitcpio git repository (https:// projects.archlinux.org/mkinitcpio.git/commit/?id= b5927393d103af9b8b2da80e8636b8aa52f80755), although I'm not sure I understood everything in that thread I wonder if it may be a bug in lsinitcpio.
lsinitcpio is irrelevant for booting (it's just an analysis/debugging tool). Anyways, it's just calling the lz4 binary, same as mkinitcpio.
3) grub has "insmod gzio" in grub.cfg for all arch menu entries and looking at gzio on the grub git it states it is for gzip decompression. I also found lzopio.mod in /usr/lib/grub/i386-pc and /usr/lib/grub/x86_64-efi, though I can't find any description for it I wonder if grub needs another module for decompressing the lz4 ramdisk.
Your bootloader is NOT responsible for decompressing the initramfs. The first line of your kernel output shows the *kernel* failing to unpack the initramfs.
Has a lz4 compressed ramdisk worked for anyone else and if it has can you help me rule out any of these options or does anyone think I missed something?
Nope, but this isn't likely to be a bug in mkinitcpio (unless I'm missing some magical flag, such as --check=crc32 being needed for xz). I'd talk to lz4 upstream if you want this resolved. d
On Fri, Dec 20, 2013 at 1:20 AM, Dave Reisner <d@falconindy.com> wrote:
On Fri, Dec 20, 2013 at 02:58:36AM +0000, Chris Rule wrote:
Hi, sorry in advance if I haven't reported this correctly. I was hesitant to file a bug report until I was sure it is a bug, and what the bug was in.
I just tested lz4 compression with mkinitcpio after noticing it in the conf.pacnew.
When I rebooted I got the following error after grub and my computer froze: [0.<cut>] Initramfs unpacking failed: junk in compressed archive
...
[0.<cut>] Kernel panic - not syncing: VFS: Unable to mount root fs on
<snip>
1) I first found the messages to the linux kernel mailing list adding support for lz4 to the kernel, describing it for arm and x86 so I initially assumed lz4 compressed images weren't supported with x86_64.
x86_64 is still x86.
2) I then read the thread (https://code.google.com/p/lz4/issues/detail?id=83) linked from the lz4 commit in the mkinitcpio git repository (https:// projects.archlinux.org/mkinitcpio.git/commit/?id= b5927393d103af9b8b2da80e8636b8aa52f80755), although I'm not sure I understood everything in that thread I wonder if it may be a bug in lsinitcpio.
lsinitcpio is irrelevant for booting (it's just an analysis/debugging tool). Anyways, it's just calling the lz4 binary, same as mkinitcpio.
3) grub has "insmod gzio" in grub.cfg for all arch menu entries and looking at gzio on the grub git it states it is for gzip decompression. I also found lzopio.mod in /usr/lib/grub/i386-pc and /usr/lib/grub/x86_64-efi, though I can't find any description for it I wonder if grub needs another module for decompressing the lz4 ramdisk.
Your bootloader is NOT responsible for decompressing the initramfs. The first line of your kernel output shows the *kernel* failing to unpack the initramfs.
Has a lz4 compressed ramdisk worked for anyone else and if it has can you help me rule out any of these options or does anyone think I missed something?
Nope, but this isn't likely to be a bug in mkinitcpio (unless I'm missing some magical flag, such as --check=crc32 being needed for xz). I'd talk to lz4 upstream if you want this resolved.
d
I had the same problem as Chris with a VirtualBox VM running Arch. I was able to replicate the same kernel panic on two other, non-virtualized Arch machines I use. All three Arch systems are running 3.12.5-1-ARCH (the standard Arch kernel from [core]) with mkinitcpio-16, and the kernel panic occurs after switching from lzop to lz4. Dave, do you have anything in COMPRESSION_OPTIONS in your /etc/mkinitcpio.conf (assuming you are using lz4)? I have reported this on the lz4 issue tracker here: https://code.google.com/p/lz4/issues/detail?id=102 Jason
On Fri, Dec 20, 2013 at 09:38:57PM -0500, Jason St. John wrote:
On Fri, Dec 20, 2013 at 1:20 AM, Dave Reisner <d@falconindy.com> wrote:
On Fri, Dec 20, 2013 at 02:58:36AM +0000, Chris Rule wrote:
Hi, sorry in advance if I haven't reported this correctly. I was hesitant to file a bug report until I was sure it is a bug, and what the bug was in.
I just tested lz4 compression with mkinitcpio after noticing it in the conf.pacnew.
When I rebooted I got the following error after grub and my computer froze: [0.<cut>] Initramfs unpacking failed: junk in compressed archive
...
[0.<cut>] Kernel panic - not syncing: VFS: Unable to mount root fs on
<snip>
1) I first found the messages to the linux kernel mailing list adding support for lz4 to the kernel, describing it for arm and x86 so I initially assumed lz4 compressed images weren't supported with x86_64.
x86_64 is still x86.
2) I then read the thread (https://code.google.com/p/lz4/issues/detail?id=83) linked from the lz4 commit in the mkinitcpio git repository (https:// projects.archlinux.org/mkinitcpio.git/commit/?id= b5927393d103af9b8b2da80e8636b8aa52f80755), although I'm not sure I understood everything in that thread I wonder if it may be a bug in lsinitcpio.
lsinitcpio is irrelevant for booting (it's just an analysis/debugging tool). Anyways, it's just calling the lz4 binary, same as mkinitcpio.
3) grub has "insmod gzio" in grub.cfg for all arch menu entries and looking at gzio on the grub git it states it is for gzip decompression. I also found lzopio.mod in /usr/lib/grub/i386-pc and /usr/lib/grub/x86_64-efi, though I can't find any description for it I wonder if grub needs another module for decompressing the lz4 ramdisk.
Your bootloader is NOT responsible for decompressing the initramfs. The first line of your kernel output shows the *kernel* failing to unpack the initramfs.
Has a lz4 compressed ramdisk worked for anyone else and if it has can you help me rule out any of these options or does anyone think I missed something?
Nope, but this isn't likely to be a bug in mkinitcpio (unless I'm missing some magical flag, such as --check=crc32 being needed for xz). I'd talk to lz4 upstream if you want this resolved.
d
I had the same problem as Chris with a VirtualBox VM running Arch. I was able to replicate the same kernel panic on two other, non-virtualized Arch machines I use.
All three Arch systems are running 3.12.5-1-ARCH (the standard Arch kernel from [core]) with mkinitcpio-16, and the kernel panic occurs after switching from lzop to lz4.
Dave, do you have anything in COMPRESSION_OPTIONS in your /etc/mkinitcpio.conf (assuming you are using lz4)?
I have reported this on the lz4 issue tracker here: https://code.google.com/p/lz4/issues/detail?id=102
Jason
I don't compress my initramfs. Also: https://bbs.archlinux.org/viewtopic.php?pid=1362280#p1362280
participants (3)
-
Chris Rule
-
Dave Reisner
-
Jason St. John