Copying Nixos from a usb to the disk

Hello!

I’m trying to install NixOS from a usb key. The issue I have is that if I have the USB key plugged in, I cannot have internet (and reciprocally).
Is there maybe a way to copy NixOS from the key to the HDD and resume the installation from the HDD instead?

Or maybe there is a way to install NixOS without internet?
I don’t have wifi either, maybe there is a way to embed the suitable wifi driver with the NixOS system?

You’ll probably have to build your own iso image with isoImage.includeSystemBuildDependencies enabled (unless hydra already builds this somewhere I’m unaware of). Alternatively you could make careful use of isoImage.storeContents.

3 Likes

There is the copytoram feature when booting the stick. This copies the contents of the stick into the ram so it can be removed after starting. maybe this solves your problem?

1 Like

Hmmm… I tried that option and after it started correctly and I removed the USB key, my laptop froze and shutdown.
Now it looks like I can’t do anything anymore. I can’t even access the BIOS…

Copy to ram is great for improving system responsiveness on systems with plenty of ram and slower usb interfaces (such as usb 2.0) during usb installation.

However, the OP is looking to have a usb image that avoids making any network calls during the installation; an air gapped installation, so to speak. The options I mentioned above should accomplish this, though the usb image itself will be quite a bit larger.

For an existing art reference, you can check out the usb creation library function from my devos project.

sounded like OP didn’t have any internet because his USB slot was occupied by the install stick.

@matsumonkie not sure whats going on with your problem, maybe not enough memory? a reboot should fix it though.

Missed that detail. If that is indeed the case then your suggestion should work fine.

@matsumonkie, installing from the copy to ram option can be extremely memory intensive though. Hopefully you have enough RAM to install a minimal system, and then you can build from there.

1 Like

Yes, I only had one usb slot (occupied by the nixos USB key), so I wanted a way to free this slot so that I could do some internet tethering.

Also, I definitely have enough ram (30Gb) so that wasn’t an issue.
Somehow, copying from the USB to the ram broke something on my laptop and now I can’t boot anymore, even the BIOS is not accessible anymore.

I’m currently in touch with Dell support and it should be fine because the laptop is still under guarantee, but I’m sad I won’t be able to install NixOS (I probably won’t give it another chance given my current situation :-S)

1 Like

I wonder if the UEFI interface was corrupted somehow. In any case, it’s quite an exceptional situation, sorry to hear it.

I hope you’ll reconsider NixOS after some cool down time. It really is a wonderful system to use and work out of.

3 Likes

I’m actually already using it on a server and loving it. I’ve never used it on my personal laptop though. I’ll try again I’m sure :slight_smile:

3 Likes