From 2dbdb1e66f652becc79fa1a0d95439c5d13d1070 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Fri, 27 Sep 2019 16:32:18 +0200 Subject: [PATCH] Fix misleading error message on rootfs resize The partition being extended is in use and sfdisk can't reload such partition table. Tell it to not even try, it will be done by partprobe call below. --- misc/resize-rootfs | 2 +- ...1-Revert-Use-sfdisk-instead-of-parted-to-resize-root-p.patch | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/resize-rootfs b/misc/resize-rootfs index 1c2fca3..b0790f0 100755 --- a/misc/resize-rootfs +++ b/misc/resize-rootfs @@ -9,7 +9,7 @@ case "$(stat -Lc %t:%T /dev/mapper/dmroot)" in ;; ca:3) # resize partition table itself and xda3 partition - echo ',+' | sfdisk --no-reread -q -N 3 /dev/xvda + echo ',+' | sfdisk --no-reread --no-tell-kernel -q -N 3 /dev/xvda # and reload partition table; prefer partprobe over blockdev # --rereadpt, as it works on mounted partitions partprobe /dev/xvda diff --git a/patches.debian/0001-Revert-Use-sfdisk-instead-of-parted-to-resize-root-p.patch b/patches.debian/0001-Revert-Use-sfdisk-instead-of-parted-to-resize-root-p.patch index acbd960..5b91fbd 100644 --- a/patches.debian/0001-Revert-Use-sfdisk-instead-of-parted-to-resize-root-p.patch +++ b/patches.debian/0001-Revert-Use-sfdisk-instead-of-parted-to-resize-root-p.patch @@ -25,7 +25,7 @@ index 1c2fca3c..bebf1011 100755 ;; ca:3) - # resize partition table itself and xda3 partition -- echo ',+' | sfdisk --no-reread -q -N 3 /dev/xvda +- echo ',+' | sfdisk --no-reread --no-tell-kernel -q -N 3 /dev/xvda + # resize partition table itself + # use undocumented ---pretend-input-tty (yes, three '-') to + # force unattended operation, otherwise it aborts on first