nixos-install-scripts icon indicating copy to clipboard operation
nixos-install-scripts copied to clipboard

Question: nvme support with hetzner dedicated

Open happysalada opened this issue 5 years ago • 8 comments

Thanks for putting this together!

I have a question regarding https://github.com/nix-community/nixos-install-scripts/blob/master/hosters/hetzner-dedicated/hetzner-dedicated-wipe-and-install-nixos.sh#L20 Does this mean that it's impossible to install nixos with NVME drives? Or perhaps, that you need at least 1 HDD to boot? I understand well, in order for this to happen, it would require a change from hetzner, correct?

happysalada avatar Oct 30 '20 03:10 happysalada

Making your link stable: https://github.com/nix-community/nixos-install-scripts/blob/fbbda90fda62b22b3ebc0dd0a417a9413786f26f/hosters/hetzner-dedicated/hetzner-dedicated-wipe-and-install-nixos.sh#L20

Or perhaps, that you need at least 1 HDD to boot?

This. My understanding is that on server types where Hetzner has configured BIOS mode, you cannot have /boot on an NVMe device. But:

  • It should be possible to put /boot on a non-NVMe device, and / on an NVMe device.
  • If the server's mainboard supports UEFI, you can attach a KVM switch to the dedicated server via a support request, and should be able to change the settings in the BIOS/UEFI manually yourself.

Also, it seems Hetzner has UEFI support for all their servers except one currently in BETA:

https://docs.hetzner.com/robot/dedicated-server/operating-systems/uefi/ (stable link).

The customer can open-up a ticket in the Administration-Console Robot for the server and ask for the enablement of UEFI on the server.

I suspect that when you request that, they'll do the same thing for you that I suggested above (changing settings in the mainboard's control utility).

So that should remove that restriction entirely.

nh2 avatar Oct 30 '20 17:10 nh2

Thanks a lot for the detailed answer! I would say let's leave this issue open until this has been tested/confirmed. Perhaps then the guide can have two parts then for legacy BIOS and UEFI.

happysalada avatar Oct 31 '20 02:10 happysalada

Interesting. We've been provisioning NVMe servers with (a modified version of) this script. We did not know there was supposed to be a problem, and it just worked. I'm actually in the process of refactoring the script now to automate drive detection and a few other things. I'll submit a PR here when we're done with internal code review.

mkaito avatar Nov 11 '20 09:11 mkaito

Sorry for the noise. You can follow my progress here: https://github.com/serokell/nixos-install-scripts/pull/1

mkaito avatar Nov 11 '20 09:11 mkaito

I can +1 @mkaito 's observation that booting in legacy mode on NVME disks work. I just installed NixOS on a AX51-NVMe (AMD Ryzen 7 3700X) machine from the Hetzner rescue system. Since mkaito's version did a few things I didn't want (i.e. the bridge setup) and I already had this script set up when I stumbled over the "won't work with NVMe" part I went with the original script. Smooth sailing. Thanks for the excellent work you all!

hacklschorsch avatar Jan 08 '21 11:01 hacklschorsch

Cool, maybe we can then simply remove the won't work with NVMe part?

nh2 avatar Jan 08 '21 12:01 nh2

The bridge part should be behind a flag, for the record.

mkaito avatar Jan 08 '21 14:01 mkaito

I can confirm that this worked with an AX51-NVMe setup. I replaced the sd{a,b} with nvme{0,1}nX (or nvmeXnXpX when needed), and all went well. :heart:

asymmetric avatar Jan 28 '21 16:01 asymmetric