From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cong Wang Subject: Re: [PATCH 1/2 v2] split nfsroot rpc start code Date: Wed, 01 Feb 2012 16:20:12 +0800 Message-ID: <4F28F5BC.8090000@gmail.com> References: <20120201020054.GA9567@darkstar.nay.redhat.com> <4F28F017.3030908@redhat.com> <4F28F01C.4020208@gmail.com> <4F28F123.4050807@redhat.com> <4F28F21D.4070509@gmail.com> <4F28F4F0.205@redhat.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=PUHLfk7of6/LH0iqy9PGxn6aZEWeu7RcaSGY1WIxrPg=; b=AkJWaJv+nAZ2+Xqp7Y/sOFFH4vWId0jmO7hJSDul6oHQbZdffRisu8SvOqQsuWLxhF Av3Y+0vmWdBQv4UYvdeyZ+AGxwIjmdK8lQcSa7LBcNApipZ0umwSYFzIZwA942/algsy uyz3zU/iF08CiRlwUvNfvAn/RwoAuwXU9d/2I= In-Reply-To: <4F28F4F0.205-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> Sender: initramfs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: Dave Young Cc: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On 02/01/2012 04:16 PM, Dave Young wrote: > On 02/01/2012 04:04 PM, Cong Wang wrote: > >> On 02/01/2012 04:00 PM, Dave Young wrote: >>> On 02/01/2012 03:56 PM, Cong Wang wrote: >>> >>>> On 02/01/2012 03:56 PM, Dave Young wrote: >>>>> On 02/01/2012 03:48 PM, Cong Wang wrote: >>>>>> On Wed, 01 Feb 2012 at 02:00 GMT, Dave Young >>>>>> wrote: >>>>>>> Index: dracut/modules.d/95nfs/module-setup.sh >>>>>>> =================================================================== >>>>>>> --- dracut.orig/modules.d/95nfs/module-setup.sh >>>>>>> +++ dracut/modules.d/95nfs/module-setup.sh >>>>>>> @@ -57,6 +57,7 @@ install() { >>>>>>> dracut_install $(for _i in $(ls {/usr,}$libdir/libnss*.so >>>>>>> 2>/dev/null); do echo $_i;done | egrep "$_nsslibs") >>>>>>> >>>>>>> inst_hook cmdline 90 "$moddir/parse-nfsroot.sh" >>>>>>> + inst_hook cmdline 91 "$moddir/nfs-start-rpc.sh" >>>>>> >>>>>> I am sure this is wrong. You need pre-pivot. >>>>> >>>>> >>>>> I want to start them as early as we can, I always think about user use >>>>> dracut as a minimal recovery system, they need do something manually. >>>>> >>>> >>>> Then install it as pre-pivot 00. >>> >>> >>> What if I use rdbreak=point which is before pre-pivot? >>> >> >> Take a look at all existing cmdline hooks, all of them handle cmdline, >> but nfs-start-rpc doesn't, so not cmdline hook please. You are abusing >> cmdline hooks. > > > > Maybe current cmdline hooks all deal with cmdline things, but as my > understand cmdline hook point is just a point for injecting anything we > need to handle at this point. If you think pre-pivot is too late, then try other hooks, e.g. pre-mount, pre-udev. Anyhow, cmdline is definitely not the place.