My thoughts on Slackware, life and everything

Tag: initrd

initramfs unpacking failed: junk in compressed archive

Lilo, the 2.6.30.x kernel and Slackware on x86_64

Although Slackware -current still has a 2.6.29.x kernel, I am sure that people are experimenting with 2.6.30 kernels. In some cases, and only on Slackware for the x86_64 architecture so far, this may lead to boot problems. There is a problem that manifests itself when you are using an initial ramdisk with your kernel. The error message that you may see (unless it scrolls off your screen too fast) is this:

“initramfs unpacking failed: junk in compressed archive

As a result, your computer will fail to boot.

Now, what is happening here?

By default, LILO loads your initial ramdisk (/boot/initrd.img) into the first 15MB of memory. This circumvents a BIOS limitation for older systems (typically, computers produced before 2001).

However, the linux kernel has been growing in size, and there are combinations of kernel and initrd that will no longer fit into the first 15MB of memory. This leads to boot failure. Because of the fact that the kernel and initrd files are compressed archives, the rule of thumb is that these issues appear when the combined size of your kernel and initrd files is larger than 8 MB. The kernel will then overwrite part of the initrd in memory, leading to the above error message.

For computers with a x86_64 capable CPU, it is safe to assume that the computer has a BIOS without the 15MB limitation. In this case, you can add the following parameter to your “/etc/lilo.conf” file:


This option instructs LILO to use a larger memory window when loading the initial ramdisk (do not forget to run the “lilo” command after making this change). It will cure the issue.

I think this should be added as a default option in the lilo.conf file generated by the liloconfig utility of slackware64.


Installing to a machine with 64MB RAM

From time to time I see posts from people who discover that Slackware 12.2 can not be installed on a computer with only 64MB of RAM by conventional means (using the bootable CD/DVD or a USB stick). The reason for this is that the size of the initial ramdisk (isolinux/initrd.img) has grown in size quite a bit, thanks to the addition of more network modules and support binaries.

My first reaction was, that Slackware 11 would be a better choice for machines that are old enough to have this little RAM, but then I received an email from Florian Kindl suggesting a split of the initrd.img file in two. His idea was to have two separate ramdisks (the better term would be “initramfs” which is the ramdisk type we use with the 2.6 kernels): one containing modules for the SMP kernel (hugesmp.s) and the other containing modules for the non-SMP kernels (huge.s and speakup.s) in the installer. Getting rid of the unwanted kernel modules frees up a lot of memory, allowing the kernel plus initrd to load in as little as 64MB of RAM.

I decided to play with that concept a bit. I created two initrd images, and updated isolinux/isolinux.cfg to reflect the use of two separate ramdisks.

This works great. I was able to boot a modified Slackware 12.2 installer on a computer that had 64MB of available RAM. There is an obvious disadvantage however. The combined size of these two separate initrd files is 9MB larger than the original single initrd image file. Since the Slackware CD set is severely space-constrained, adding 9MB in one place could mean that 9MB of files has to be removed from the Slackware tree (read: 9MB of Slackware packages needs to go).

So, I decided to take an alternative approach based on a tip from my buddy alphageek who suggested that 2.6 kernel modules will still work when they are gzipped (just like Slackware used to do for 2.4 kernels). I rebuilt the initrd.img file with gzipped kernel modules and tested this on a 64 MB computer.

What do you know… gzipping the kernel modules in the initrd increases the filesize of the initrd.img with less than 300 KB (not too bad), but after the Slackware installer loads the kernel plus initramfs, there is about 9MB of additional memory available compared to the original Slackware 12.2 installer. This means that this modified installer with it’s compressed kernel modules will work on a computer with 64 MB of available RAM… for good measure I tested with only 48MB of installed RAM, but that is just too little.

For those who have an old computer where the Slackware 12.2 CD fails to boot, showing “kernel out of memory”, I made the results of my experiments available:

  • A “mini-ISO” image file containing only the Slackware 12.2 installer can be downloaded at . It is a small (28MB size) ISO image containing no packages at all, and it is meant for either a network install (using a NFS/HTTP/FTP server) or an install from a pre-mounted package directory on a local partition (harddisk or USB stick)
  • The rebuilt initrd.img file that contains gzipped kernel modules can be found here: . You can use this iitrd.img file to re-master a Slackware CD or DVD when you remove the original “isolinux/initrd.img” file and replace it with my updated version.
  • At the same URL I have also uploaded an updated “usbboot.img” file; this is the image file for a bootable USB stick. This USB bootable imageĀ  contains those same compressed kernel images which makes it possible to use on computers with only 64MB of RAM (although I have some doubt whether these old machines support booting from USB at all…)

If you have any remarks about the use of this modified Slackware installer, please let me know. I always like feedback, because it allows me to make things better.


© 2024 Alien Pastures

Theme by Anders NorenUp ↑