nixos-infect
nixos-infect copied to clipboard
mv -v /boot /boot.bak fails if /boot is a mount point
More specifically, when run on a machine with non-EFI boot where /boot is a mount point, you get the following error:
mv: cannot move '/boot' to '/boot.bak': Device or resource busy
I ran into this error on a contabo VPS but I suspect the kind of setup that causes it is not super rare.
@whentze So what did you do to resolve past this?
I get this on Hetzner dedicated server as well (AX101).
What I actually ended up doing is replace the mv
with cp -a
in the script and re-running it, after which went through successfully.
However, I'm not sure if this would be the right thing to do in all situations, I'm not sure of the implications.
I'm hitting this consistently on Oracle's Ampere instances as well.
Is there a workaround to fixing it on oracle amepere? mv -v -> cp -a did not do the job for me.
Yes, use the Ubuntu 20.04 "shape". It would be nice to have this fixed, however, the Oracle 7.9 "shape" gives a reasonable result, especially with PR#100 which automatically adopts the 8G swap partition.
[root@amd1-orc:/]# df -h (after removing old-root)
Filesystem Size Used Avail Use% Mounted on
devtmpfs 49M 0 49M 0% /dev
tmpfs 488M 0 488M 0% /dev/shm
tmpfs 244M 4.0M 240M 2% /run
tmpfs 488M 432K 488M 1% /run/wrappers
/dev/sda3 39G 1.8G 37G 5% /
/dev/sda1 200M 31M 170M 16% /boot
tmpfs 98M 0 98M 0% /run/user/0
Use this https://gist.github.com/kradalby/0957a5d4fbb9018d0b700b118f5c5341