Skip to content

Commit

Permalink
Backport #938 to 0.21.2
Browse files Browse the repository at this point in the history
Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
  • Loading branch information
mudler committed Dec 7, 2021
1 parent 7100087 commit ea2d71f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/backports/installer/cos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,12 @@ prepare_passive() {

part_probe() {
local dev=$1

# Don't require udevadm necessarly, but run it best-effort
if hash udevadm 2>/dev/null; then
udevadm settle
fi

partprobe ${dev} 2>/dev/null || true

sync
Expand Down Expand Up @@ -240,6 +246,9 @@ do_format()
if [ "$BOOTFLAG" == "esp" ]; then
parted -s ${DEVICE} mkpart primary fat32 0% 50MB # efi
parted -s ${DEVICE} set 1 ${BOOTFLAG} on

part_probe $DEVICE

PREFIX=${DEVICE}
if [ ! -e ${PREFIX}1 ]; then
PREFIX=${DEVICE}p
Expand All @@ -250,6 +259,7 @@ do_format()
elif [ "$BOOTFLAG" == "bios_grub" ]; then
parted -s ${DEVICE} mkpart primary 0% 1MB # BIOS boot partition for GRUB
parted -s ${DEVICE} set 1 ${BOOTFLAG} on
part_probe $DEVICE
fi

yip -s partitioning $COS_PARTITION_LAYOUT
Expand Down

0 comments on commit ea2d71f

Please sign in to comment.