Hi Guillaume! On Wed, Jan 09, 2002 at 05:55:46PM +0100, Guillaume Cottenceau wrote: > Reinhard Katzmann <[EMAIL PROTECTED]> writes: > > > > > > - 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 > > Unfortunately there is no trustable way to detect if a filesystem > is compiled in a kernel so we don't "support" kernels for which > fs'es (other than ext2) are compiled in. >
Ok, but what about an option to read /boot/config-<kver> as defined with "mkinitrd <initrd-kver.img> <kver> ? Of course this has the disadvantage that mkinitrd needs to know about all filesystem types which can be used to boot (I think at least ext2,3,reiserfs,xfs,jfs) and it's option in the config file (which might change and break this option at times). > > 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 > > Lines 108 and 116 of mkinitrd should prevent this from happen. > Can you trace the problem more precisely ? Well the problem is simple: There is a link inside every kernel directory which points to the directory where the build of this kernel was done. I don't know exactly what sh_find does in line 108 but it does not ignore the links but dereference them. I don't know about find but I find it annoying that there is no possibility to tell 'ls -lR' to not dereference links (what should be the default option but it still dereferences it). Ok I'm getting Offtopic here ;-) With best regards, Reinhard Katzmann -- Software-Engineer, Developer for Embedded Devices Project: HyperPen Tablet USB Driver for Linux GnuPG Public Key available on request
msg50570/pgp00000.pgp
Description: PGP signature
