elitak / nixos-infect

[GPLv3+] install nixos over the existing OS in a DigitalOcean droplet (and others with minor modifications)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is it safe to remove `mv -v /boot /boot.bak` from script?

Guisanpea opened this issue · comments

Today I have been trying to infect Ubuntu 20.04 images from Contabo VPS.

When running it I had to tweak two things. The first was that by default, Contabo assigns a hostname such as vmi12345678.contaboserver.net. This is not allowed in NixOS as it is a fully qualified name, and it is not possible to have one. I just did the change of hostname and it worked. I am not sure about what consequences it has but to be honest I don't care enough to take a look to it.

The other issue I saw was that when trying to do the step mv -v /boot /boot.bak was that the device was mounted, thus I got the error

mv: cannot move '/boot' to '/boot.bak': Device or resource busy.

I just had commented the line and successfully run it. But before adding a PR selecting the provider as OK I was wondering some things.

  1. Shouldn't all the steps related to the copy of /boot only be done if the system is EFI?
  2. In case that it has to also be done it is safe to do so? (To put as a notice in the PR)

Thanks

commented
mv: cannot move '/boot' to '/boot.bak': Device or resource busy.

This same error occurs with CentOS 8, and Oracle Linux 8, in Oracle Cloud free-tier.
Ubuntu 20.04 works, Oracle Linux 7.9 works (most likely CentOS 7.9 will also work).