On Wed, 27 Jul 2005, Horms wrote:

> And I do wonder if this script should be on the initrd image at all.
> Could you poke around for difference between your working initrd
> image for kernel-image-2.6.8-1-386 and the broken one for
> kernel-image-2.6.8-2-386?

There are some--probably best I just give you the scripts:

--- kernel-image-2.6.8-1 initrd /scripts/ext3-add-journal.sh ----------
#!/bin/sh
cd /
mount -nt proc proc proc
rootdev=$(cat proc/sys/kernel/real-root-dev)
cmdline=$(cat /proc/cmdline)
umount -n proc
if [ $rootdev != 256 ]; then
    mount -nt tmpfs tmpfs /dev2
    mount -nt proc proc /proc
    mount -nt devfs devfs /devfs > /dev/null 2>&1
    get_device
    mount_device
    if test -f /mnt/etc/fstab ; then
        ext3root=`awk '!/^ *#/ { if (($2 == "/") && ($3 == "ext3")) {print 
$1;}}' < /mnt/etc/fstab`
        ext2root=`awk '!/^ *#/ { if (($2 == "/") && ($3 == "ext2")) {print 
$1;}}' < /mnt/etc/fstab`
    fi
    umount -n /devfs > /dev/null 2>&1
    umount -n /mnt > /dev/null 2>&1
    if test -n "$ext3root" -o -n "$ext2root" ; then
        mount -nt tmpfs tmpfs /etc
        echo >> /etc/fstab
        echo >> /etc/mtab
        if test -n "$ext3root" ; then
            /sbin/tune2fs -O has_journal /dev2/root2 > /dev/null 2>&1
        else
            /sbin/tune2fs -O ^has_journal /dev2/root2 > /dev/null 2>&1
        fi
        umount -n /etc
    fi
    umount -n /dev2
    umount -n /proc > /dev/null 2>&1
fi
-----------------------------------------------------------------------

--- kernel-image-2.6.8-2 initrd /scripts/ext3-add-journal.sh ----------
#!/bin/sh
#
# /usr/share/e2fsprogs/initrd.ext3-add-journal
#
cd /
mount -nt proc proc proc
rootdev=$(cat proc/sys/kernel/real-root-dev)
cmdline=$(cat /proc/cmdline)
umount -n proc
if [ $rootdev != 256 ]; then
    mount -nt tmpfs tmpfs /dev2
    get_device
    roottype=`/bin/e2initrd_helper -r /dev2/root2`
    if test -n "$roottype" ; then
        mount -nt tmpfs tmpfs /etc
        echo >> /etc/fstab
        echo >> /etc/mtab
        if test "$roottype" = "ext3" ; then
            /sbin/tune2fs -O has_journal /dev2/root2 > /dev/null 2>&1
        else
            /sbin/tune2fs -O ^has_journal /dev2/root2 > /dev/null 2>&1
        fi
        umount -n /etc
    fi
    umount -n /dev2
    umount -n /proc > /dev/null 2>&1
fi
-----------------------------------------------------------------------

> This script is generated when your run mkinitrd image.

Right.  I'm assuming that mkinitrd gets run during the kernel-image .deb
install, since it clearly contains local information.

> ...Also, almost
> eveything on the longer list seems bogus - though harmless.

Yes, there is a ton of crap there, though I notice that it correctly 
identified that I need the pwc driver for my webcam.  However, it then 
seems to have decided that I may need the webcam during the boot, in 
case I can't wait to chat until / is mounted....

> ...So the
> problem would seem to be mkinitrd, which is hardly a surprise - we know
> that code is problematic and we are working on replacing it for etch.

It wouldn't be the first time I had trouble with automatic module
detection.  When I installed that Gentoo system I mentioned the live CD
initrd found my firewire chipset and my PCI ethernet card and decided to
install drivers for ethernet-over-firewire.  I am still surprised I
eventually figured out how to get the network up.

Knoppix always works, I don't know how it does it.

>    Actually, just changing MODULES from most to dep might work.

Sadly, no.  I ran it as-is with MODULES=most and then with MODULES=dep,
both fail the same way.  Doing a diff on the initrd filesystems they
create suggests that MODULES doesn't affect the contents of loadmodules
(mostly--using 'dep' actually added the loop driver to the list, but it
may have noticed that I had it loaded because the initrd from the 'most'
run was mounted on the loopback device already--is it smart enough to do
that?), but only which modules are actually present in the initrd for
loading.  When I diffed them the 'dep' version had many fewer actual .ko 
objects present, but the same (almost, as I said) loadmodules script.

Would I be correct in guessing that there was a revision to the mkinitrd
script in the last couple of months?  That would not only explain why
the 2.6.8-1 kernel works but also some odd problems I saw when I went to 
learn a little bit about make-kpkg the Debian way of building kernels.

> 2. Mount the image, copy it to a fresh directory,
>    trim down loadmodules, and make a fresh initrd image
>    using mkcramfs.

This was my first thought too.  I created a series of test images using
the /scripts/ext3-add-journal.sh script from both kernel packages and with
different loadmodules scripts: the 2.6.8-2 version, the same script with
siimage removed, the 2.6.8-1 version, and the 2.6.8-2 version with the usb
audio and non-SATA SCSI stuff removed as well.  No joy.  All fail in the
same way (except for the messages after the kernel panic, but that's just
because it continues to load modules afterwards until it hits the end of 
loadmodules.

> 1. try playing with /etc/mkinitrd/modules and
>    /etc/mkinitrd/mkinitrd.conf - the MODULES setting in particular.

I can certainly try other things as well, but the above exhausts all the
obvious tests, so I'll be shooting in the dark.

Dustin





-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to