Reinhard Katzmann <[EMAIL PROTECTED]> writes:

[...]

> > 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).

Well it needs a mapping between fs module name and kernel option
name such as "ext3" <=> "CONFIG_EXT3_FS".

I'm reluctant in sending too much worktime into something we
don't even provide (e.g. a kernel with compiled in FS'es).


> > > 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.

Uh.. I didn't know that.. sorry.. Yet actually for "stock"
RPM-provided kernels this link is broken so it's not very
harmful.

Yet I don't know how to elegantly solve this problem then.


> I don't know exactly what sh_find does in line 108 but it does not

It's meant to do the same job as "find". (it's here because
mkinitrd is targetted to work with /usr not mounted)

> 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

-- 
Guillaume Cottenceau - http://people.mandrakesoft.com/~gc/

Reply via email to