[Nix-dev] [PATCH] Root filesystem on NFS
Nicolas Pierron
nicolas.b.pierron at gmail.com
Mon Oct 10 19:56:46 CEST 2011
Hi Rickard,
> diff --git a/modules/system/boot/stage-1.nix b/modules/system/boot/stage-1.nix
> index 8936a11..a7e2c77 100644
> --- a/modules/system/boot/stage-1.nix
> +++ b/modules/system/boot/stage-1.nix
> @@ -169,6 +169,11 @@ let
> cp ${kernelPackages.splashutils}/${kernelPackages.splashutils.helperName} $out/bin/splash_helper
> ''}
>
> + # Copy nfsmount if there any NFS mounts required for boot.
if there *is* any ?
> + ${optionalString (fileSystems != [] && filter (fs: fs.fsType == "nfs" && (fs.mountPoint == "/" || fs.neededForBoot)) fileSystems != []) ''
the first test is unnecessary. filter can be applied on an empty list.
> + cp -v ${pkgs.klibc}/lib/klibc/bin.static/nfsmount $out/bin
> + ''}
> +
> ${config.boot.initrd.extraUtilsCommands}
>
> # Run patchelf to make the programs refer to the copied libraries.
The patch seems fine to me.
Do you mind If I apply the listed modification and if I commit it in
your behalf ?
2011/10/10 Rickard Nilsson <rickard.nilsson at telia.com>:
> Hi Nicolas,
>
> I have updated my nfsmount patch now, so nfsmount is only added to initrd
> if nfs is really needed during boot. Would you care to look at it again?
>
> Best regards,
> Rickard Nilsson
>
> Den 2011-08-29 11:25:58 skrev Lluís Batlle i Rossell <viriketo at gmail.com>:
>
>> On Mon, Aug 29, 2011 at 11:01:08AM +0200, Rickard Nilsson wrote:
>>>
>>> >Thanks for your interest in NixOS.
>>> >Feel free to contribute, I'll take pleasure to review your patches.
>>>
>>> I will polish the nfsmount patch a bit and then submit it again. The
>>> network stuff will require some more work before being patch-worthy.
>>
>> I liked the patch. I don't think it was any harmful, and would enable
>> people to
>> use nfs. I would also not mind having an initrd with even more tools
>> beyond
>> nfsmount. :)
>>
>> I've been using nfsroot in some machines, but in those cases, I have not
>> used
>> initrd because I did not want to find that nfsmount. :)
>> Then I used a special kernel with some compiled in code, so I could use
>> "nfsroot=blabla ip=dhcp" for example.
>>
>> Regards,
>> Lluís.
--
Nicolas Pierron
http://www.linkedin.com/in/nicolasbpierron - http://nbp.name/
More information about the nix-dev
mailing list