This is new in the current Hetzner rescue mode, aborting the script due to set -e:
root@rescue ~ # for diskletter in {a..b}; do parted --script --align optimal /dev/sd"$diskletter" -- mklabel gpt mkpart "BIOS-boot-partition-$diskletter" 1MiB 2MiB set 1 bios_grub on mkpart "OS-partition-$diskletter" 2MiB '100%'; done
Error: Partition(s) 2 on /dev/sda have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use. As a result, the old partition(s) will remain in use. You should reboot now before making further changes.
Error: Partition(s) 2 on /dev/sdb have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use. As a result, the old partition(s) will remain in use. You should reboot now before making further changes.
root@rescue ~ # echo $?
1
parted now exits nonzero for certain failures already diagnosed as "Error".
For example, before this change, parted would exit successfully in spite of "Error: ...unrecognised disk label" and "Error:... both GPT primary and backup partition tables are corrupted".
We will have to disable set -e for that call, ideally grepping that the error is only the but we have been unable to inform the kernel of the change one.
This is new in the current Hetzner rescue mode, aborting the script due to
set -e
:It's likely this:
https://git.savannah.gnu.org/cgit/parted.git/tree/NEWS?h=v3.3#n249
We will have to disable
set -e
for that call, ideally grepping that the error is only thebut we have been unable to inform the kernel of the change
one.