LILO "junk in compressed archive" and Grub2 "out of disk" error

I’ve recently upgraded a Debian/Asterisk Installation on an older Soekris Net 4501 embedded hardware. After the upgrade the device didn’t boot anymore. The installed LILO bootloader produced the error message:

Initramfs unpacking failed: junk in compressed archive

and later failed with a kernel panic

VFS: Unable to mount root fs on unknown-block(0,0)

Googling for the error message found a blog entry that indicated a missing LILO option “large-memory” — which wasn’t the problem in my case, the option was already present.
So I booted into GRML and installed grub2 instead of LILO. After a reboot, Grub2 ended up in rescue mode with the error message:

error: out of disk.
grub rescue>

I could display the partitions with ls and also get a listing from my root partition but trying to list other directories produces the “out of disk” error again:

grub rescue> ls
(hd0) (hd0,msdos1) (hd1) (hd2) (hd3) 
grub rescue> ls (hd0,msdos1)/
./ ../ lost+found/ var/ etc/ media/ initrd.img usr/

grub rescue> ls (hd0,msdos1)/boot

error: out of disk.

So my diagnosis was that the BIOS of the Soekris box is unable to address the whole (in this case 60GB) harddisk. The install had only worked before because the kernel and the /boot directory where within the BIOS-accessible area on the disk. So there are still BIOSes out there that don’t support large harddisks — I didn’t find out until now what the limit of the Soekris BIOS is. The fix after this diagnosis was easy: Shrink the root filesystem using resize2fs, create a new root partition and copy the shrunken filesystem there, resize2fs to the new partition size. Create a new small /boot partition at the start of the disk and copy the contents of the old /boot directory there. Of course this is only possible with a working rescue system, my rescue system of choice is a GRML netboot setup which enables me to quickly boot any x86-based system that supports network boot.
Lesson learned: For small X86 embedded hardware it still makes sense to have a small /boot partition.


Chris wrote on 2011-01-18 01:21:

I ran into the same problem, thanks for sharing the information.