public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Denis Vlasenko <vda.linux@googlemail.com>
To: John Coffman <johninsd@san.rr.com>
Cc: linux-kernel@vger.kernel.org
Subject: lilo 22.7.3 corrupts initrd with large kernel images
Date: Sun, 24 Sep 2006 15:58:36 +0200	[thread overview]
Message-ID: <200609241558.36311.vda.linux@googlemail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2039 bytes --]

Hello John,

It seems that lilo does something incorrectly with initrd image
if kernel image is around 3MB. I found this when I built Linux 2.6.18
and it failed to mount initrd. Previously I was using 2.6.17.11_64
and earlier kernels with no problems.

I tried loading the same image and initrd from DOS with linld and
it worked flawlessly. Then I loaded the image without initrd
using lilo (this worked) and compared dmesg with DOS one.
The obvious related difference is:

 testing NMI watchdog ... OK.
-checking if image is initramfs...it isn't (no cpio magic); looks like an initrd
+checking if image is initramfs...it isn't (bad gzip magic numbers); looks like an initrd
 Freeing initrd memory: 1460k freed

Then I built smaller 2.6.18 (excluded some stuff I can boot without)
and it was loaded with initrd using lilo just fine.

More details:

# lilo -V
LILO version 22.7.3

# cd /boot; ls -l */bzImage img-01.gz
-rw-r--r--  1 root root 2615417 Sep 21 21:34 2.6.17.11_64/bzImage (loads ok)
-rw-r--r--  1 root root 3024504 Sep 22 02:34 2.6.18_64/bzImage    (BAD)
-rw-r--r--  1 root root 2687906 Sep 24 15:35 2.6.18_64s/bzImage   (loads ok)
-r--r--r--  1 root root 1495860 Sep  2  2005 img-01.gz    (initrd image)

lilo.conf:

boot=/dev/hda5
lba32
compact
prompt
timeout=40
vga=ask

image=/boot/2.6.18_64/bzImage
    label=2.6.18_64
    initrd=/boot/img-01.gz
    root=/dev/hda5
    append="root=/dev/hda5 init=/bin/sh"
    vga=0

image=/boot/2.6.18_64s/bzImage
    label=2.6.18_64s
    initrd=/boot/img-01.gz
    append="root=/dev/ram init=/linuxrc ROOTMAJ=3 ROOTMIN=5 IPCFG=mac INIT=/init"
    vga=0

image=/boot/2.6.17.11_64/bzImage
    label=2.6.17.11_64
    initrd=/boot/img-01.gz
    append="root=/dev/ram init=/linuxrc ROOTMAJ=3 ROOTMIN=5 IPCFG=mac INIT=/init"
    vga=0

Attached are dmesg outputs from all three boot scenarios:
dmesg_bare    - 2.6.18_64 without initrd using lilo, init=/bin/sh
dmesg_dos     - 2.6.18_64 with initrd using linld, normal boot
dmesg_smaller - 2.6.18_64s with initrd using lilo, normal boot
--
vda

[-- Attachment #2: dmesg_bare.bz2 --]
[-- Type: application/x-bzip2, Size: 4988 bytes --]

[-- Attachment #3: dmesg_smaller.bz2 --]
[-- Type: application/x-bzip2, Size: 5305 bytes --]

[-- Attachment #4: dmesg_dos.bz2 --]
[-- Type: application/x-bzip2, Size: 5291 bytes --]

                 reply	other threads:[~2006-09-24 13:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200609241558.36311.vda.linux@googlemail.com \
    --to=vda.linux@googlemail.com \
    --cc=johninsd@san.rr.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox