+43
-11
nixos/doc/manual/installation/installing-from-other-distro.section.md
+43
-11
nixos/doc/manual/installation/installing-from-other-distro.section.md
···+On [UEFI](https://en.wikipedia.org/wiki/UEFI) systems, check that your `/etc/nixos/hardware-configuration.nix` did the right thing with the [EFI System Partition](https://en.wikipedia.org/wiki/EFI_system_partition).+In NixOS, by default, both [systemd-boot](https://systemd.io/BOOT/) and [grub](https://www.gnu.org/software/grub/index.html) expect it to be mounted on `/boot`.+However, the configuration generator bases its [](#opt-fileSystems) configuration on the current mount points at the time it is run.+If the current system and NixOS's bootloader configuration don't agree on where the [EFI System Partition](https://en.wikipedia.org/wiki/EFI_system_partition) is to be mounted, you'll need to manually alter the mount point in `hardware-configuration.nix` before building the system closure.+The lustrate process will not work if the [](#opt-boot.initrd.systemd.enable) option is set to `true`.+If you want to use this option, wait until after the first boot into the NixOS system to enable it and rebuild.···+1. Finally, install NixOS's boot system, backing up the current boot system's files in the process.+The details of this step can vary depending on the bootloader configuration in NixOS and the bootloader in use by the current system.+- [UEFI](https://en.wikipedia.org/wiki/UEFI) systems where both the current system and NixOS mount the [EFI System Partition](https://en.wikipedia.org/wiki/EFI_system_partition) on `/boot`.+Both [systemd-boot](https://systemd.io/BOOT/) and [grub](https://www.gnu.org/software/grub/index.html) expect this by default in NixOS, but other distributions vary.+If you didn't get all the NixOS configuration right, especially those settings pertaining to boot loading and root partition, NixOS may not be bootable either.+On [UEFI](https://en.wikipedia.org/wiki/UEFI) systems, anything on the [EFI System Partition](https://en.wikipedia.org/wiki/EFI_system_partition) will be removed by these commands, such as other coexisting OS's bootloaders.+In other cases, most commonly where the [EFI System Partition](https://en.wikipedia.org/wiki/EFI_system_partition) of the current system is instead mounted on `/boot/efi`, the goal is to:+- Make sure `/boot` (and the [EFI System Partition](https://en.wikipedia.org/wiki/EFI_system_partition), if mounted elsewhere) are mounted how the NixOS configuration would mount them.
+6
-4
nixos/modules/system/activation/switch-to-configuration.pl
+6
-4
nixos/modules/system/activation/switch-to-configuration.pl
······+# Needs to be after the "boot" action exits, as this directory will not exist when doing a NIXOS_LUSTRATE install
+5
-4
pkgs/by-name/sw/switch-to-configuration-ng/src/src/main.rs
+5
-4
pkgs/by-name/sw/switch-to-configuration-ng/src/src/main.rs
······+// Needs to be after the "boot" action exits, as this directory will not exist when doing a NIXOS_LUSTRATE install