[0/2] expand-on-first-boot: try fs resize on expanded partitions

Message ID 20221108112837.435213-1-tobias.schaffner@siemens.com
Headers show
Series expand-on-first-boot: try fs resize on expanded partitions | expand

Message

Tobias Schaffner Nov. 8, 2022, 11:28 a.m. UTC
From: Tobias Schaffner <tobias.schaffner@siemens.com>

If the filesystem resize on first boot fails or gets interrupted the service
will not be disabled. But when the script is called on the next boot it will
not try to expand the filesystem as the partition is already expanded.

Check if the partition has to be expanded before expanding it but always try
to resize the filesystem. Leave the decision if the filesystem has to be resized
to the used tool.

Improve the check if we have to expand the partition by calculating the last
usabe block in the GUID table.

Tobias Schaffner (2):
  Check if last partition ends at GPT backup header
  Always try resizing the fs in expand on first boot

 .../files/expand-last-partition.sh            | 54 +++++++++----------
 1 file changed, 25 insertions(+), 29 deletions(-)