-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move /old-root/nixos to / #37
Comments
Hey @jakubpawlowicz, it's great to hear that nixos-in-place has worked for you. What you're looking to do is both certainly possible and not officially supported by this project. With that said, I'll give you some info so on how nixos-in-place works so you can decide whether or not you want to go further. On your old laptop, with NixOS now, you'll find that there is a file here {
boot.loader.grub.device = "/dev/vda";
boot.loader.grub.storePath = "/nixos/nix/store";
boot.initrd.supportedFilesystems = [ "ext4" ];
boot.initrd.postDeviceCommands = ''
mkdir -p /mnt-root/old-root ;
mount -t ext4 /dev/vda1 /mnt-root/old-root ;
'';
fileSystems = {
"/" = {
device = "/old-root/nixos";
fsType = "none";
"options" = [ "bind" ];
};
"/old-root" = {
device = "/dev/vda1";
fsType = "ext4";
};
};
} On some systems like with DigitalOcean, we need You should then be able to remove This isn't the most thorough outline, since I haven't yet attempted this, but, if you follow through successfully, it'd be great to get your notes. I could then turn it into a wiki page. Let me know if you have any other questions and best of luck. :) Closing this ticket, but feel free to keep discussing. |
Thanks @jeaye for more details. I've just did it and it seems to work fine, here's a step by step guide:
mkdir /mnt/root
mount /dev/vda1 /mnt/root
mv /mnt/root/nixos/* /mnt/root
rmdir /mnt/root/nixos
rmdir /mnt/root/old-root
grub-install /dev/vda At this point I rebooted and everything runs fine. Some questions:
|
Awesome work and thanks for the update! I don't think you can run Are you able to try that out? |
I tried chrooting with sth like |
Hm, I wonder if you can chroot in (into |
Hmmm, that's a good idea. I'll try it tomorrow. |
I've only had a chance to do it again now, but I can confirm that running the following commands after step 6 did the trick:
|
Nice work! Thanks for the update. |
@jakubpawlowicz Possibly also interesting for you: #41 |
Hey @jeaye!
First of all thanks for this project! It's the only way I've been able to bootstrap NixOS on my 11 year old laptop.
Now I have NixOS up and running I wonder if there's a way to move the install to root folder from
/old-root/nixos
. I don't need it badly but it would be nice to have it. Any ideas?Thanks!
The text was updated successfully, but these errors were encountered: