Cannot backup /boot folder using lustrate install

Hi there,

I am very much new to Nixos, I’m trying to install it using the lustrate install: NixOS Manual

I am currently on a cleanly installed Fedora 40 machine (I tried to use the regular graphical installer but that didn’t work, I got a black screen most likely due to my Nvidia GPU).

I followed all of the steps until I have to move the existing /boot folder:

“13. Finally, move the /boot directory of your current distribution out of the way (the lustrate process will take care of the rest once you reboot, but this one must be moved out now because NixOS needs to install its own boot files”

But the system does not allow this:

k@localhost-live:~$ sudo mv -v /boot /boot.bak && sudo /nix/var/nix/profiles/system/bin/switch-to-configuration boot
mv: cannot move '/boot' to '/boot.bak': Device or resource busy

I understand the error message but I’m not sure how to fix this, searching around did not give me much help. I also tried to skip this step and only execute the following command, which unsurprisingly also doesn’t work:

k@localhost-live:~$ sudo /nix/var/nix/profiles/system/bin/switch-to-configuration boot
[sudo] password for k: 
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
File system "/boot" is not a FAT EFI System Partition (ESP) file system.
systemd-boot not installed in ESP.
No default/fallback boot loader installed in ESP.
/boot/loader/entries/089513739fcc44caa0b98ae4883247bf-0-rescue.conf:7: Unknown line 'grub_users', ignoring.
/boot/loader/entries/089513739fcc44caa0b98ae4883247bf-0-rescue.conf:8: Unknown line 'grub_arg', ignoring.
/boot/loader/entries/089513739fcc44caa0b98ae4883247bf-0-rescue.conf:9: Unknown line 'grub_class', ignoring.
/boot/loader/entries/089513739fcc44caa0b98ae4883247bf-6.8.5-301.fc40.x86_64.conf:7: Unknown line 'grub_users', ignoring.
/boot/loader/entries/089513739fcc44caa0b98ae4883247bf-6.8.5-301.fc40.x86_64.conf:8: Unknown line 'grub_arg', ignoring.
/boot/loader/entries/089513739fcc44caa0b98ae4883247bf-6.8.5-301.fc40.x86_64.conf:9: Unknown line 'grub_class', ignoring.
Traceback (most recent call last):
  File "/nix/store/870i4idnpkj45zcd39ccxj14vc0vkcki-bza6dmx1w5c0xrvs1m7704ijnzqcrsfi-systemd-boot", line 394, in <module>
  File "/nix/store/870i4idnpkj45zcd39ccxj14vc0vkcki-bza6dmx1w5c0xrvs1m7704ijnzqcrsfi-systemd-boot", line 377, in main
  File "/nix/store/870i4idnpkj45zcd39ccxj14vc0vkcki-bza6dmx1w5c0xrvs1m7704ijnzqcrsfi-systemd-boot", line 305, in install_bootloader
    raise Exception("could not find any previously installed systemd-boot")
Exception: could not find any previously installed systemd-boot

Would appreciate any help!