jeaye / nixos-in-place

Install NixOS on top of any existing Linux distribution without rebooting
MIT License
458 stars 57 forks source link

Failed to run nixos-install #11

Closed bobvanderlinden closed 8 years ago

bobvanderlinden commented 8 years ago

I tried to install NixOS from Ubuntu (as well as Debian) on Digital Ocean. I ran into the following error in nixos-install:

unshare: cannot change root filesystem propagation: Invalid argument

The problem was with: https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/installer/tools/nixos-install.sh#L18

After prepending NIXOS_INSTALL_REEXEC=1 to the nixos-install call in stage2, nixos-in-place continued like it should.

The exact further implications of NIXOS_INSTALL_REEXEC, but it seems NIXOS_INSTALL_REEXEC is only used for nixos-install for that specific unshare.

Should I create an PR or are there better ways to solve this?

jeaye commented 8 years ago

Hm, I haven't seen this issue before, on the dozens of test machines and distros I've used. I wonder why it's showing up now. After the install continued, did everything work as expected?

bobvanderlinden commented 8 years ago

Yes, I'm running it now and it seems to be working like it should.

I first tried it on Debian and on Ubuntu, both fresh on a Digital Ocean Droplet. Both gave the same error. I only applied NIXOS_INSTALL_REEXEC to the Ubuntu system and that one is still running.

jeaye commented 8 years ago

On Fri, Apr 08, 2016 at 10:28:43AM -0700, Bob van der Linden wrote:

Yes, I'm running it now and it seems to be working like it should.

I first tried it on Debian and on Ubuntu, both fresh on a Digital Ocean Droplet. Both gave the same error. I only applied NIXOS_INSTALL_REEXEC to the Ubuntu system and that one is still running.

Alrighty, let's get a PR for this, if you're still interested. Thanks for the investigation; I'll try this weekend with and without the change to see if I can reproduce the issue.

bobvanderlinden commented 8 years ago

Thanks, #14 is ready whenever you can confirm the issue.