[Nix-dev] Fwd: Moving /nix/store to another partition
Luca Bruno
lethalman88 at gmail.com
Mon Jul 28 12:40:17 CEST 2014
On 28/07/2014 12:35, Sergey Mironov wrote:
> Interestingly. I didn't think about initrd. In theory, I may try to
> customize the initrd script to do bind mount (I hope I have HDD driver
> compiled in kernel). What do you think, will it be sufficient? Should
> I do the bind mount once again during stage2 ?
Sorry, forget what I said. /nix/store should not be needed in stage1, as
it uses busybox.
I do something similar in fact :D I've installed nixos in a subdirectory
of my existing partition, therefore I bind mount /nixos to /. So you can
perfectly do the bind mount of /nix/store.
Here's the pull request: https://github.com/NixOS/nixpkgs/pull/3143
The current problem is that stage1 does not know the order of mount.
That is, you must mount / first, then bind mount /nix/store. That PR is
trying to address this ordering problem.
Probably that exact PR inverts the order and that's not what you want.
However you can modify it somehow to your needs.
I hope Eelco will +1 on setting an explicit order between mounts in the
initrd instead of sorting them out magically.
More information about the nix-dev
mailing list