Skip to contentSkip to conversation

Q: How to add more modules when -H is specified?

DISCUSSION WANG Cong 2 participants 3 messages Jul 29, 2011 1 message not in the archive

lore
Share & tools
lore

WANG Cong

author
#0 lore raw

Hi, dracut people,

I am not sure about the expected behaviour when I specify both -H and --add foo (where module foo is not automatially added by -H). It looks like with -H specified, --add foo will not take any effect?

At least -H --add nfs doesn't work if my rootfs is not nfs, I see the following check in modules.d/95nfs/module-setup.sh,

    [ $hostonly ] && ! egrep -q '/ nfs[34 ]' /proc/mounts && return 1

So, is this expected? I mean as long as I specify -H, there is no way to add more modules? Or just the nfs check code is wrong?

Also, I am looking for a way to add all needed modules for devices mounted in current system, as -H only adds modules needed by rootfs.

Thanks!

#1 lore raw
Quoted 8 lines · WANG Cong

Hi, dracut people,

I am not sure about the expected behaviour when I specify both -H and --add foo (where module foo is not automatially added by -H). It looks like with -H specified, --add foo will not take any effect?

Quoted 7 lines

At least -H --add nfs doesn't work if my rootfs is not nfs, I see the following check in modules.d/95nfs/module-setup.sh,

    [ $hostonly ] && ! egrep -q '/ nfs[34 ]' /proc/mounts && return 1

So, is this expected? I mean as long as I specify -H, there is no way to add more modules? Or just the nfs check code is wrong?

Hmm, yes, currently all "add" modules also have the hostonly check. Sometimes you want that behaviour, sometimes not..

We might want s.th. like "--force-add" for that use case.

Quoted 7 lines

Also, I am looking for a way to add all needed modules for devices mounted in current system, as -H only adds modules needed by rootfs.

Thanks!

Not (yet) implemented. I accept patches :-)

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 14 lines · Harald Hoyer
Quoted 13 lines · WANG Cong

Hi, dracut people,

I am not sure about the expected behaviour when I specify both -H and --add foo (where module foo is not automatially added by -H). It looks like with -H specified, --add foo will not take any effect?

At least -H --add nfs doesn't work if my rootfs is not nfs, I see the following check in modules.d/95nfs/module-setup.sh,

    [ $hostonly ] && ! egrep -q '/ nfs[34 ]' /proc/mounts && return 1

Quoted 7 lines
Quoted 2 lines

So, is this expected? I mean as long as I specify -H, there is no way to add more modules? Or just the nfs check code is wrong?

Hmm, yes, currently all "add" modules also have the hostonly check. Sometimes you want that behaviour, sometimes not..

We might want s.th. like "--force-add" for that use case.

This is exactly what comes into my mind. :-D

Quoted 11 lines
Quoted 8 lines

Also, I am looking for a way to add all needed modules for devices mounted in current system, as -H only adds modules needed by rootfs.

Thanks!

Not (yet) implemented. I accept patches :-)

How about add a new option, e.g. '--all-mounted'?
Anyway, I will try to make some patches.

Thanks!