lilo loads wrong data for big initramfs (?)

Bug #221664 reported by Roland Dreier
12
Affects Status Importance Assigned to Milestone
lilo (Debian)
Fix Released
Unknown
lilo (Ubuntu)
Fix Released
Undecided
Unassigned
Declined for Intrepid by Colin Watson
Hardy
Won't Fix
Undecided
Unassigned

Bug Description

Binary package hint: lilo

I just updated an x86-64 system from gutsy to hardy, and the boot of 2.6.24-16-generic hung after the line

    checking if image is initramfs...it isn't (bad gzip magic numbers); looks like an initrd

I was able to boot successfully with the old 2.6.22-14-generic kernel/initramfs left over from the gutsy install. I checked the 2.6.24-16-generic initramfs and gzip was happy with it (and it looked like a valid cpio archive after I tested uncompressing it).

My system is using LVM on software RAID-1 and using lilo (version 1:22.8-3.1ubuntu1 is installed) as a bootloader. So either lilo is loading the wrong data into memory or the kernel has a bug in recognizing the initramfs. Given that almost everyone uses initramfs now, while grub has largely replaced lilo, a lilo bug seems more likely to me.

Based on <http://lkml.org/lkml/2006/9/24/50> I made the wild guess that I was hitting some lilo size limit -- and indeed, the 2.6.24 stuff is slightly bigger than the 2.6.22 stuff:

    1743752 vmlinuz-2.6.22-14-generic
    1887736 vmlinuz-2.6.24-16-generic

and

    8450482 initrd.img-2.6.22-14-generic
    8871664 initrd.img-2.6.24-16-generic

regenerating the 2.6.24-16-generic initramfs with update-initramfs didn't help. However, I tried installing yaird and built a smaller initramfs:

    2287987 initrd.img-2.6.24-16-generic

and now I am able to boot into 2.6.24-16-generic with the same lilo/kernel.

Revision history for this message
Luis Bruno (lbruno) wrote :

Roland wrote:
> I tried installing yaird and build a smaller initramfs [...] and now I am able to boot

Thank you, I am now able to boot too. Has anyone tried to use the

Some details for those using this on a -server kernel: my `uname -r` returns a -generic suffix; you'll have to symlink /boot/config-*-server and /lib/modules/*-server. The error message was less than obvious: "unknown kernel version".

This is but an ugly workaround. I wonder if lilo's option to load the initrd into high-memory would suffice.

Revision history for this message
Luis Bruno (lbruno) wrote :

Luis wrote:
> I wonder if lilo's option to load the initrd into high-memory would suffice.

I wondered correctly. I've added
large-memory
to /etc/lilo.conf and I can now boot. Now, a difficult ltsp chroot awaits me...

Revision history for this message
Luis Bruno (lbruno) wrote :

BTW, I vote this bug to "blocker". LILO is required for those who are putting /boot on LVM (which in my case sits atop a RAID1 volume, but that looks unimportant).

Revision history for this message
Roland Dreier (roland.dreier) wrote :

Thanks for the 'large-memory' option tip. It makes sense that there would be problems without that, since without the option it seems lilo tries to load everything under 15 MB, and with an 8+ MB initramfs and a nearly 2 MB kernel, it seems plausible that something could go wrong.

I agree that this is a serious bug -- it almost rendered my system unbootable after an upgrade to Hardy, and if I hadn't had the Gutsy kernel still around, my system would have been a real pain to recover.

Revision history for this message
Michael Onnen (michael-onnen) wrote :

Thanks lbruno,
I'm also running a /boot on lvm on raid1 config with lilo, and got the
    checking if image is initramfs...it isn't (bad gzip magic numbers); looks like an initrd
error after the upgrade from gutsy to hardy.
"large-memory" in lilo.conf fixed it. Thanks again.

Revision history for this message
Dbenitez (diegobenitezc) wrote :

it's good to know I'm not the only one with this problem! I've been trying to mount the raid volume on a hardy livecd, at first just to try and recover everything, but it seems like it can be fixed with the "large-memory" option ... however I haven't been able to mount the raid volume to do so ... could it be because I'm using 64-bit hardy? any suggestions?

Revision history for this message
Luis Bruno (lbruno) wrote : Re: [Bug 221664] Re: lilo loads wrong data for big initramfs (?)

Dbenitez escreveu:
> seems like it can be fixed with the "large-memory" option ...
> however I haven't been able to mount the raid volume to do so
>
Switch to another VT when you get the red background and a quick fsck
/dev/md0 might do the trick.

Revision history for this message
Dbenitez (diegobenitezc) wrote :

Well the solution I used is mounting the array in a livecd, adding "large-memory" to lilo.conf, chrooting into the filesystem and running liloconfig ... so I suggest doing that ...

also, is this issue going to be fixed in LILO in future versions?

Revision history for this message
Luis Bruno (lbruno) wrote :

Dbenitez wrote:
> is this issue going to be fixed in LILO in future versions?
>
Maybe this bug should be CC: to the installer team. Actually, they're
the ones who should be writing out "large-memory" in this case.

Revision history for this message
Luis Bruno (lbruno) wrote :

I've subscribed the ubuntu-installer team on this.

LILO can't boot the bigger kernel in Hardy without the "large-memory" option. Needed when /boot is on LVM.

Revision history for this message
Colin Watson (cjwatson) wrote :

I declined the Intrepid nomination because there's generally no need to nominate bugs for the current development release; it's implicit. That doesn't mean it shouldn't be fixed in Intrepid.

Changed in lilo:
status: Unknown → Fix Released
Revision history for this message
Luis Bruno (lbruno) wrote :

The debian buglog mentions that LILO can't boot over 8MB of initramfs on
some systems, depending on BIOS. Their solution is "MODULES=dep". Since
update-initramfs is running at the end of the installation, seems doable.

  affects ubuntu/lilo

Revision history for this message
Mike Hicks (hick0088) wrote :

I came across this problem too, but it first affected my kernel and caused the system to panic at boot. I only got to this page to figure out the solution after I used a rescue mode boot to install the amd64 "server" kernel.

Changed in lilo:
status: Fix Released → New
Changed in lilo:
status: New → Fix Released
Revision history for this message
jscc88 (jscc88-deactivatedaccount) wrote :

you have to get into ubuntu in recovery mode

there you can recolve all problens in your sistem

Changed in lilo:
status: New → Fix Released
Revision history for this message
Colin Watson (cjwatson) wrote :

The closure of this bug by "jscc88" was wholly inappropriate; recovery mode is *not* an answer to a system being unbootable by default after installation!

However, it happens that this bug has been fixed in Jaunty courtesy of work in Debian. Here's the changelog entry:

lilo (1:22.8-6.1) unstable; urgency=low

  * Non-maintainer upload.
  * Add some information about large initrd boot problems:
    - Document the issue and workarounds in README.Debian
    - Alert users to the issue in NEWS.Debian
    - Prompt users to add large-memory to /etc/lilo.conf
    - Thanks to debian-l10n-english for the review!
    (Closes: #479607)
  * Include French debconf translation update by Christian Perrier

 -- Paul Wise <email address hidden> Sat, 25 Oct 2008 21:25:18 +0800

Revision history for this message
Colin Watson (cjwatson) wrote :

Incidentally, I've tested this successfully using today's daily server CD, after applying fixes for bug 309555 (which will be fixed in tomorrow's daily server CD.

Revision history for this message
Rolf Leggewie (r0lf) wrote :

Hardy has seen the end of its life and is no longer receiving any updates. Marking the Hardy task for this ticket as "Won't Fix".

Changed in lilo (Ubuntu Hardy):
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.