* nfs: install modprobe config file
@ 2012-07-11 5:08 Dave Young
[not found] ` <20120711050818.GA10940-je1gSBvt1Td3da3rpXeqgR/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Dave Young @ 2012-07-11 5:08 UTC (permalink / raw)
To: initramfs-u79uwXL29TY76Z2rM5mHXA, harald-H+wXaHxf7aLQT0dZR+AlfA
install nfs modprobe config file
For nfs4, in case nfs.ko is not loaded mount.nfs4 will try to load
nfs4.ko instead of nfs.ko. Fedora nfs-utils creates a lib/modprobe.d/nfs.conf
in which there's below alias:
alias nfs4 nfs
Dracut also need this file to auto load nfs kernel module.
Tested booting to a fedora 17 nfsroot share.
Signed-off-by: Dave Young <dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
modules.d/95nfs/module-setup.sh | 6 ++++++
modules.d/95nfs/parse-nfsroot.sh | 7 -------
2 files changed, 6 insertions(+), 7 deletions(-)
--- dracut.orig/modules.d/95nfs/module-setup.sh
+++ dracut/modules.d/95nfs/module-setup.sh
@@ -35,6 +35,12 @@ install() {
mount.nfs4 umount rpc.idmapd sed /etc/netconfig
dracut_install /etc/services /etc/nsswitch.conf /etc/rpc /etc/protocols /etc/idmapd.conf
+ if [ -f /lib/modprobe.d/nfs.conf ]; then
+ dracut_install /lib/modprobe.d/nfs.conf
+ else
+ echo "alias nfs4 nfs" > $initdir/etc/modprobe.d/nfs.conf
+ fi
+
inst_libdir_file 'libnfsidmap_nsswitch.so*' 'libnfsidmap/*.so' 'libnfsidmap*.so*'
_nsslibs=$(sed -e '/^#/d' -e 's/^.*://' -e 's/\[NOTFOUND=return\]//' /etc/nsswitch.conf \
--- dracut.orig/modules.d/95nfs/parse-nfsroot.sh
+++ dracut/modules.d/95nfs/parse-nfsroot.sh
@@ -88,13 +88,6 @@ nfsroot_to_var $netroot
# Set fstype, might help somewhere
fstype=${nfs#/dev/}
-# NFS actually supported? Some more uglyness here: nfs3 or nfs4 might not
-# be in the module...
-if ! incol2 /proc/filesystems $fstype ; then
- modprobe nfs
- incol2 /proc/filesystems $fstype || die "nfsroot type $fstype requested but kernel/initrd does not support nfs"
-fi
-
# Rewrite root so we don't have to parse this uglyness later on again
netroot="$fstype:$server:$path:$options"
^ permalink raw reply [flat|nested] 6+ messages in thread[parent not found: <20120711050818.GA10940-je1gSBvt1Td3da3rpXeqgR/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>]
* Re: nfs: install modprobe config file [not found] ` <20120711050818.GA10940-je1gSBvt1Td3da3rpXeqgR/sF2h8X+2i0E9HWUfgJXw@public.gmane.org> @ 2012-07-11 6:22 ` Harald Hoyer 2012-07-11 6:39 ` Cong Wang [not found] ` <4FFD1B89.7060208-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 0 siblings, 2 replies; 6+ messages in thread From: Harald Hoyer @ 2012-07-11 6:22 UTC (permalink / raw) To: Dave Young; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA Am 11.07.2012 07:08, schrieb Dave Young: > install nfs modprobe config file > > For nfs4, in case nfs.ko is not loaded mount.nfs4 will try to load > nfs4.ko instead of nfs.ko. Fedora nfs-utils creates a lib/modprobe.d/nfs.conf > in which there's below alias: > alias nfs4 nfs > > Dracut also need this file to auto load nfs kernel module. > > Tested booting to a fedora 17 nfsroot share. > > Signed-off-by: Dave Young <dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> > --- > modules.d/95nfs/module-setup.sh | 6 ++++++ > modules.d/95nfs/parse-nfsroot.sh | 7 ------- > 2 files changed, 6 insertions(+), 7 deletions(-) > > --- dracut.orig/modules.d/95nfs/module-setup.sh > +++ dracut/modules.d/95nfs/module-setup.sh > @@ -35,6 +35,12 @@ install() { > mount.nfs4 umount rpc.idmapd sed /etc/netconfig > dracut_install /etc/services /etc/nsswitch.conf /etc/rpc /etc/protocols /etc/idmapd.conf > > + if [ -f /lib/modprobe.d/nfs.conf ]; then > + dracut_install /lib/modprobe.d/nfs.conf > + else > + echo "alias nfs4 nfs" > $initdir/etc/modprobe.d/nfs.conf > + fi > + > inst_libdir_file 'libnfsidmap_nsswitch.so*' 'libnfsidmap/*.so' 'libnfsidmap*.so*' > > _nsslibs=$(sed -e '/^#/d' -e 's/^.*://' -e 's/\[NOTFOUND=return\]//' /etc/nsswitch.conf \ > --- dracut.orig/modules.d/95nfs/parse-nfsroot.sh > +++ dracut/modules.d/95nfs/parse-nfsroot.sh > @@ -88,13 +88,6 @@ nfsroot_to_var $netroot > # Set fstype, might help somewhere > fstype=${nfs#/dev/} > > -# NFS actually supported? Some more uglyness here: nfs3 or nfs4 might not > -# be in the module... > -if ! incol2 /proc/filesystems $fstype ; then > - modprobe nfs > - incol2 /proc/filesystems $fstype || die "nfsroot type $fstype requested but kernel/initrd does not support nfs" > -fi > - > # Rewrite root so we don't have to parse this uglyness later on again > netroot="$fstype:$server:$path:$options" > > Hmm... that modprobe.d conf file should have been already copied to the initramfs: modules.d/90kernel-modules/module-setup.sh: dracut_install $(find -L /etc/modprobe.d/ -maxdepth 1 -type f -name '*.conf') Oh.. I see ... it's /lib/modprobe.d and not /etc/modprobe.d ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: nfs: install modprobe config file 2012-07-11 6:22 ` Harald Hoyer @ 2012-07-11 6:39 ` Cong Wang 2012-07-11 6:44 ` Dave Young [not found] ` <4FFD1B89.7060208-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 1 sibling, 1 reply; 6+ messages in thread From: Cong Wang @ 2012-07-11 6:39 UTC (permalink / raw) To: initramfs-u79uwXL29TY76Z2rM5mHXA On Wed, 11 Jul 2012 at 06:22 GMT, Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote: > > Hmm... that modprobe.d conf file should have been already copied to the initramfs: > > modules.d/90kernel-modules/module-setup.sh: dracut_install $(find -L > /etc/modprobe.d/ -maxdepth 1 -type f -name '*.conf') > > Oh.. I see ... it's /lib/modprobe.d and not /etc/modprobe.d Yeah, should consider /lib/modprobe.d as well: diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh index 8822fa7..a9b9637 100755 --- a/modules.d/90kernel-modules/module-setup.sh +++ b/modules.d/90kernel-modules/module-setup.sh @@ -78,6 +78,7 @@ install() { local _f i [ -f /etc/modprobe.conf ] && dracut_install /etc/modprobe.conf dracut_install $(find -L /etc/modprobe.d/ -maxdepth 1 -type f -name '*.conf') + [ -d /lib/modprobe.d ] && dracut_install $(find -L /lib/modprobe.d/ -maxdepth 1 -type f -name '*.conf') inst_hook cmdline 01 "$moddir/parse-kernel.sh" inst_simple "$moddir/insmodpost.sh" /sbin/insmodpost.sh } ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: nfs: install modprobe config file 2012-07-11 6:39 ` Cong Wang @ 2012-07-11 6:44 ` Dave Young 0 siblings, 0 replies; 6+ messages in thread From: Dave Young @ 2012-07-11 6:44 UTC (permalink / raw) To: Cong Wang; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA On 07/11/2012 02:39 PM, Cong Wang wrote: > On Wed, 11 Jul 2012 at 06:22 GMT, Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote: >> >> Hmm... that modprobe.d conf file should have been already copied to the initramfs: >> >> modules.d/90kernel-modules/module-setup.sh: dracut_install $(find -L >> /etc/modprobe.d/ -maxdepth 1 -type f -name '*.conf') >> >> Oh.. I see ... it's /lib/modprobe.d and not /etc/modprobe.d > > Yeah, should consider /lib/modprobe.d as well: It's ok to install the /lib/modprobe.d/*.conf, but for nfs alias as I said better to create the nfs.conf in case there's no such file.. > > diff --git a/modules.d/90kernel-modules/module-setup.sh > b/modules.d/90kernel-modules/module-setup.sh > index 8822fa7..a9b9637 100755 > --- a/modules.d/90kernel-modules/module-setup.sh > +++ b/modules.d/90kernel-modules/module-setup.sh > @@ -78,6 +78,7 @@ install() { > local _f i > [ -f /etc/modprobe.conf ] && dracut_install /etc/modprobe.conf > dracut_install $(find -L /etc/modprobe.d/ -maxdepth 1 -type f -name '*.conf') > + [ -d /lib/modprobe.d ] && dracut_install $(find -L /lib/modprobe.d/ -maxdepth 1 -type f -name '*.conf') > inst_hook cmdline 01 "$moddir/parse-kernel.sh" > inst_simple "$moddir/insmodpost.sh" /sbin/insmodpost.sh > } > > > -- > To unsubscribe from this list: send the line "unsubscribe initramfs" in > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Thanks Dave ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <4FFD1B89.7060208-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* Re: nfs: install modprobe config file [not found] ` <4FFD1B89.7060208-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2012-07-11 6:42 ` Dave Young [not found] ` <4FFD205E.8050005-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Dave Young @ 2012-07-11 6:42 UTC (permalink / raw) To: Harald Hoyer; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA On 07/11/2012 02:22 PM, Harald Hoyer wrote: > Am 11.07.2012 07:08, schrieb Dave Young: >> install nfs modprobe config file >> >> For nfs4, in case nfs.ko is not loaded mount.nfs4 will try to load >> nfs4.ko instead of nfs.ko. Fedora nfs-utils creates a lib/modprobe.d/nfs.conf >> in which there's below alias: >> alias nfs4 nfs >> >> Dracut also need this file to auto load nfs kernel module. >> >> Tested booting to a fedora 17 nfsroot share. >> >> Signed-off-by: Dave Young <dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> >> --- >> modules.d/95nfs/module-setup.sh | 6 ++++++ >> modules.d/95nfs/parse-nfsroot.sh | 7 ------- >> 2 files changed, 6 insertions(+), 7 deletions(-) >> >> --- dracut.orig/modules.d/95nfs/module-setup.sh >> +++ dracut/modules.d/95nfs/module-setup.sh >> @@ -35,6 +35,12 @@ install() { >> mount.nfs4 umount rpc.idmapd sed /etc/netconfig >> dracut_install /etc/services /etc/nsswitch.conf /etc/rpc /etc/protocols /etc/idmapd.conf >> >> + if [ -f /lib/modprobe.d/nfs.conf ]; then >> + dracut_install /lib/modprobe.d/nfs.conf >> + else >> + echo "alias nfs4 nfs" > $initdir/etc/modprobe.d/nfs.conf >> + fi >> + >> inst_libdir_file 'libnfsidmap_nsswitch.so*' 'libnfsidmap/*.so' 'libnfsidmap*.so*' >> >> _nsslibs=$(sed -e '/^#/d' -e 's/^.*://' -e 's/\[NOTFOUND=return\]//' /etc/nsswitch.conf \ >> --- dracut.orig/modules.d/95nfs/parse-nfsroot.sh >> +++ dracut/modules.d/95nfs/parse-nfsroot.sh >> @@ -88,13 +88,6 @@ nfsroot_to_var $netroot >> # Set fstype, might help somewhere >> fstype=${nfs#/dev/} >> >> -# NFS actually supported? Some more uglyness here: nfs3 or nfs4 might not >> -# be in the module... >> -if ! incol2 /proc/filesystems $fstype ; then >> - modprobe nfs >> - incol2 /proc/filesystems $fstype || die "nfsroot type $fstype requested but kernel/initrd does not support nfs" >> -fi >> - >> # Rewrite root so we don't have to parse this uglyness later on again >> netroot="$fstype:$server:$path:$options" >> >> > > > Hmm... that modprobe.d conf file should have been already copied to the initramfs: > > modules.d/90kernel-modules/module-setup.sh: dracut_install $(find -L > /etc/modprobe.d/ -maxdepth 1 -type f -name '*.conf') > > Oh.. I see ... it's /lib/modprobe.d and not /etc/modprobe.d Yes, then should update the 90kernel-modules instead. but if the distribution does not ship the nfs.conf, this will still be a problem, I think 95nfs should also add the alias file in case ! -f /lib/modprobe.d/nfs.conf, what do you think? > -- > To unsubscribe from this list: send the line "unsubscribe initramfs" in > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Thanks Dave ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <4FFD205E.8050005-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* Re: nfs: install modprobe config file [not found] ` <4FFD205E.8050005-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2012-07-11 7:31 ` Harald Hoyer 0 siblings, 0 replies; 6+ messages in thread From: Harald Hoyer @ 2012-07-11 7:31 UTC (permalink / raw) To: Dave Young; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA Am 11.07.2012 08:42, schrieb Dave Young: > On 07/11/2012 02:22 PM, Harald Hoyer wrote: > >> Am 11.07.2012 07:08, schrieb Dave Young: >>> install nfs modprobe config file >>> >>> For nfs4, in case nfs.ko is not loaded mount.nfs4 will try to load >>> nfs4.ko instead of nfs.ko. Fedora nfs-utils creates a lib/modprobe.d/nfs.conf >>> in which there's below alias: >>> alias nfs4 nfs >>> >>> Dracut also need this file to auto load nfs kernel module. >>> >>> Tested booting to a fedora 17 nfsroot share. >>> >>> Signed-off-by: Dave Young <dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> >>> --- >>> modules.d/95nfs/module-setup.sh | 6 ++++++ >>> modules.d/95nfs/parse-nfsroot.sh | 7 ------- >>> 2 files changed, 6 insertions(+), 7 deletions(-) >>> >>> --- dracut.orig/modules.d/95nfs/module-setup.sh >>> +++ dracut/modules.d/95nfs/module-setup.sh >>> @@ -35,6 +35,12 @@ install() { >>> mount.nfs4 umount rpc.idmapd sed /etc/netconfig >>> dracut_install /etc/services /etc/nsswitch.conf /etc/rpc /etc/protocols /etc/idmapd.conf >>> >>> + if [ -f /lib/modprobe.d/nfs.conf ]; then >>> + dracut_install /lib/modprobe.d/nfs.conf >>> + else >>> + echo "alias nfs4 nfs" > $initdir/etc/modprobe.d/nfs.conf >>> + fi >>> + >>> inst_libdir_file 'libnfsidmap_nsswitch.so*' 'libnfsidmap/*.so' 'libnfsidmap*.so*' >>> >>> _nsslibs=$(sed -e '/^#/d' -e 's/^.*://' -e 's/\[NOTFOUND=return\]//' /etc/nsswitch.conf \ >>> --- dracut.orig/modules.d/95nfs/parse-nfsroot.sh >>> +++ dracut/modules.d/95nfs/parse-nfsroot.sh >>> @@ -88,13 +88,6 @@ nfsroot_to_var $netroot >>> # Set fstype, might help somewhere >>> fstype=${nfs#/dev/} >>> >>> -# NFS actually supported? Some more uglyness here: nfs3 or nfs4 might not >>> -# be in the module... >>> -if ! incol2 /proc/filesystems $fstype ; then >>> - modprobe nfs >>> - incol2 /proc/filesystems $fstype || die "nfsroot type $fstype requested but kernel/initrd does not support nfs" >>> -fi >>> - >>> # Rewrite root so we don't have to parse this uglyness later on again >>> netroot="$fstype:$server:$path:$options" >>> >>> >> >> >> Hmm... that modprobe.d conf file should have been already copied to the initramfs: >> >> modules.d/90kernel-modules/module-setup.sh: dracut_install $(find -L >> /etc/modprobe.d/ -maxdepth 1 -type f -name '*.conf') >> >> Oh.. I see ... it's /lib/modprobe.d and not /etc/modprobe.d > > > Yes, then should update the 90kernel-modules instead. but if the > distribution does not ship the nfs.conf, this will still be a problem, I > think 95nfs should also add the alias file in case ! -f > /lib/modprobe.d/nfs.conf, what do you think? yep.. pushed ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-07-11 7:31 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-11 5:08 nfs: install modprobe config file Dave Young
[not found] ` <20120711050818.GA10940-je1gSBvt1Td3da3rpXeqgR/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2012-07-11 6:22 ` Harald Hoyer
2012-07-11 6:39 ` Cong Wang
2012-07-11 6:44 ` Dave Young
[not found] ` <4FFD1B89.7060208-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-07-11 6:42 ` Dave Young
[not found] ` <4FFD205E.8050005-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-07-11 7:31 ` Harald Hoyer
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.