[Nix-dev] ZFS root boot
deCube.net | Danny Wilson
danny at decube.net
Sat Nov 9 14:59:31 CET 2013
No newlines needed :D
[root at nixos:~]# uname -a
Linux elon 3.4.67 #1-NixOS SMP Thu Oct 24 13:12:48 UTC 2013 x86_64 GNU/Linux
Summarized everything here for future reference: https://gist.github.com/vizanto/7374277
Hopefully that will save someone a day of pain :-/
Thanks!
On 8 nov. 2013, at 17:36, Ricardo M. Correia <rcorreia at wizy.org> wrote:
> I'm not sure, but you might have to use this syntax instead:
>
> boot.initrd.postDeviceCommands =
> ''
> zpool import -f -a -d /dev/cciss
> '';
>
> ... because of newlines. Notice that I'm not using double quotes, I'm using 2 single quotes.
>
>
> On Fri, Nov 8, 2013 at 5:18 PM, Ricardo M. Correia <rcorreia at wizy.org> wrote:
> I think the problem may be that NixOS is only importing pools in the /dev directory, and not /dev/cciss... see modules/tasks/filesystems/zfs.nix:
>
> 51 boot.initrd = mkIf inInitrd {
> 52 kernelModules = [ "spl" "zfs" ] ;
> (...)
> 61 postDeviceCommands =
> 62 ''
> 63 zpool import -f -a -d /dev
> 64 '';
> 65 };
>
> Can you add the option:
>
> boot.initrd.postDeviceCommands = "zpool import -f -a -d /dev/cciss";
>
> ... to your configuration.nix and see if it works?
>
>
> On Fri, Nov 8, 2013 at 5:01 PM, deCube.net | Danny Wilson <danny at decube.net> wrote:
> I found something, after adding boot.shell_on_fail:
> https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/tasks/filesystems/zfs.nix#L63
>
> this imports nothing for me.
>
> If I run in the shell…
> # zpool import -f -a -d /dev/cciss
>
> then my rpool is imported! and I can finally boot :D
>
> How to fix this permanently?
>
> On 8 nov. 2013, at 16:50, deCube.net | Danny Wilson <danny at decube.net> wrote:
>
> > Still no luck.
> >
> > <<< NixOS Stage 1 >>>
> >
> > loading module spl
> > loading module zfs
> > loading module dm_mod
> > running udev…
> > starting device mapper and LVM…
> > No volume groups found
> > mounting rpool/ROOT/nixos on /…
> > mount: mounting rpool on /mnt-root/ failed: No such file or directory
> >
> >
> > I’ve also tried using device = "rpool”; like you have.
> >
> > Do I have to recreate the pool with nixos on rpool instead of rpool/ROOT/nixos ?! :-(
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20131109/53a8ffe9/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: Message signed with OpenPGP using GPGMail
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20131109/53a8ffe9/attachment.bin
More information about the nix-dev
mailing list