On Mon, Jan 07, 2002 at 06:30:36AM +0100, Guillaume Cottenceau wrote:
> Reinhard Katzmann <[EMAIL PROTECTED]> writes:
> 
> > Note: pivotroot returns error 22. What does this mean ?
> 
> Check /usr/include/asm/errno.h :-).
> 
> (actually it's EINVAL).

Yes, but I don't see any errors with the pivot_root line in the
mkinitrd script (actually this script works fine with 2.4.16), so
it seems really to be a kernel problem...

> > I also tested without initrd image. This fails as well:
> > 
> > VFS: Mounted root (ext2 filesystem).
> > Mounted devfs on /dev.
> > Freeing unused kernel memory:708k freed.
> > Kernel panic: Attempted to kill init!
> 
> Ooh this is also strange but looks like a kernel problem? Or does
> boot without pivot_rooting no more supported, dear kernel team?

That would not be very nice.. I'd prefer to have the possibility to
boot without initrd image and still can use one of the many filesystems :)
(after all initrd makes the kernel bigger, and without effort it's not
easy to keep the (compressed) kernel size below 1 MB).

> > Also I checked the initrd image and found two strange things:
> > - /sbin is created with mkdir and there a link from bin to sbin
> >   is created. (Same with the old version). I commented the mkdir
> >   command for testing.
> 
> This should be correct though.

It works, but I don't think it's correct:

mkdir -p $MNTIMAGE/sbin
mkdir -p $MNTIMAGE/etc
mkdir -p $MNTIMAGE/dev
mkdir -p $MNTIMAGE/loopfs
mkdir -p $MNTIMAGE/proc
mkdir -p $MNTIMAGE/sysroot
ln -s bin $MNTIMAGE/sbin

The result is: (ls -l bin sbin)
bin:
insgesamt 36
-rwxr-xr-x    1 root     root        24220 Jan  7 09:55 insmod*
-rwxr-xr-x    1 root     root        11128 Jan  7 09:55 nash*

sbin:
insgesamt 0
lrwxrwxrwx    1 root     root            3 Jan  7 10:11 bin -> bin
lrwxrwxrwx    1 root     root            9 Jan  7 09:55 modprobe -> /bin/nash

Either the sbin mkdir should be removed or the link command.

> > - mkinitrd does not check the the kernel config (/boot/config-2.4.17-xyz)
> >   correctly, modules are added from the kernel source tree (!)
> >   which are inside the kernel (for me this was ext3, ide-mod, ide-probe-mod,
> >   ide-disk). If I don't add them to IGNOREMODS insmoding will (of course)
> >   fail when booting the kernel.
> 
> I don't follow you. Modules are taken from /lib/modules/$kernver
> so what's the problem?

No they are not. For example I have ext3 in my kernel like this:
CONFIG_EXT3_FS=y

When I invoke mkinitrd and look at the result, in /lib you find the following
file (initrd image):
lib:
insgesamt 83
drwxr-xr-x    2 root     root         1024 Jan  7 10:16 ./
drwxr-xr-x   10 root     root         1024 Jan  7 10:16 ../
-rw-r--r--    1 root     root        81514 Jan  5 19:18 ext3.o

locate ext3.o
/usr/src/linux-2.4.17-1mdk/fs/ext3/.ext3.o.flags
/usr/src/linux-2.4.17-1mdk/fs/ext3/ext3.o

ll /usr/src/linux-2.4.17-1mdk/fs/ext3/ext3.o
-rw-r--r--    1 root     root        81514 Jan  5 19:18 
/usr/src/linux-2.4.17-1mdk/fs/ext3/ext3.o

With best regards,

Reinhard Katzmann
-- 
Software-Engineer, Developer for Embedded Devices
Project: HyperPen Tablet USB Driver for Linux 
GnuPG Public Key available on request

Attachment: msg50387/pgp00000.pgp
Description: PGP signature

Reply via email to