Hi, we’re planning to migrate a few hundred devices to Balena OS. These devices are mostly Intel NUCs running Ubuntu. My plan was to use the takeover script but unfortunately I can’t get it running.
I already fixed the names for the downloaded images, as it failed with the old resinos image names. See this commit. I also disabled the OS check, as we’re using Ubuntu 20.04.
The command I’m using:
./takeover_bin --pretend --no-os-check --log-level trace -c os_config.json -v "2.98.33" -i balena-cloud-genericx86-64-ext-2.98.33.img.gz
Whenever I run the script, it fails with the following error:
2022-08-18 13:37:19 WARN [takeover::stage1::migrate_info] Failed to remove takeover directory: '/balena-takeover', error : Os { code: 16, kind: ResourceBusy, message: "Device or resource busy" }
2022-08-18 13:37:19 ERROR [takeover] Migrate stage 1 returned an error: An invalid state was encountered, context: Failed to find root device
These are my block devices:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 62M 1 loop /snap/core20/1593
loop1 7:1 0 62M 1 loop /snap/core20/1611
loop2 7:2 0 67,2M 1 loop /snap/lxd/21835
loop3 7:3 0 43,6M 1 loop /snap/snapd/14978
loop4 7:4 0 67,8M 1 loop /snap/lxd/22753
loop5 7:5 0 47M 1 loop /snap/snapd/16292
nvme0n1 259:0 0 232,9G 0 disk
├─nvme0n1p1 259:1 0 1,1G 0 part /boot/efi
├─nvme0n1p2 259:2 0 2G 0 part /boot
└─nvme0n1p3 259:3 0 229,9G 0 part
└─ubuntu--vg-ubuntu--lv 253:0 0 100G 0 lvm /
I added some debug logging and found out, that in fact both root_device and root_partition in file block_device_info.rs are not set. I was able to manually set nvme0n1 as the root device but root_partition will still not be set. Mounting ubuntu–vg-ubuntu–lv as /dev/root also didn’t work.
I don’t know what to try next but would like to avoid sending out hundreds of USB sticks to migrate our devices to Balena OS. Does someone have an idea how to fix this?