[Nix-dev] Debugging NixOS login problems
Rickard Nilsson
rickard.nilsson at telia.com
Mon May 9 09:15:50 CEST 2011
On Fri, 6 May 2011 15:14:39 +0200, Nicolas Pierron
<nicolas.b.pierron at gmail.com> wrote:
> Hi Rickard,
>
> On Fri, May 6, 2011 at 14:49, Rickard Nilsson
> <rickard.nilsson at telia.com> wrote:
>>
>> I installed with the ordinary installation cd, but instead of
>> mounting a
>> plain partition on /mnt, I mounted an NFS share. Also I disabled
>> Grub since
>> I boot with gPXE:
>>
>> boot.loader.grub.enable = true;
>> boot.loader.grub.device = "nodev";
>
> If you have disabled Grub, then why do you need to enable it?
> Have you tried other boot lodaer options, such as:
> boot.loader.initScript.enable and boot.loader.generationsDir.enable
I think I got some error when I disabled Grub, but I might be wrong.
The boot.loader.initScript.enable anboot.loader.generationsDir.enable
options seems very usable indeed. I have set up the gPXE boot script
manually so far. Thanks!
>
>> I also have the following in configuration.nix in order to set up
>> the
>> network on boot:
>>
>> boot.initrd.extraUtilsCommands =
>> ''
>> cp ${pkgs.iproute}/sbin/ip $out/bin
>> cp ${pkgs.glibc}/lib/libresolv.so.* $out/lib
>>
>> cp ${pkgs.nfsUtils}/sbin/mount.nfs $out/bin
>> cp ${pkgs.klibc}/lib/klibc/bin.static/nfsmount $out/bin
>> '';
>>
>> boot.initrd.postDeviceCommands =
>> ''
>> ip link set eth0 up
>> ip addr add 192.168.0.200/24 dev eth0
>> '';
>>
>> However, I haven't got the NFS mount to work automatically yet.
>> Instead I
>> have:
>>
>> mountPoint = "/";
>> fsType = "none";
>> device = "none";
>>
>> And then I mount the root manually with "nfsmount
>> 192.168.0.1:/export/nixos_root /mnt-root" when init stage 1
>> complains that
>> it can't mount the root device.
>
> Have you tried with a "nfs" fsType?
Yes, it doesn't work. For some reason, running "mount -t nfs
192.168.0.1:/export/nixos_root /mnt-root" doesn't work, but "nfsmount
192.168.0.1:/export/nixos_root /mnt-root" does work. I haven't really
looked in to that yet, I wanted to get the system up and running first,
because it makes it easier to change the configuration.
/ Rickard
More information about the nix-dev
mailing list