init_resize.sh: fixes to make it work after tests on aarch64
This commit is contained in:
parent
12756b6a2b
commit
881d4c8019
@ -113,18 +113,20 @@ main () {
|
||||
check_kernel
|
||||
|
||||
if [ "$ROOT_PART_END" -eq "$TARGET_END" ]; then
|
||||
reboot_pi
|
||||
fi
|
||||
|
||||
# Issue a warning but continue trying to resize filesystem
|
||||
echo "Warning: root partition already resized\n"
|
||||
else
|
||||
if ! parted -m "$ROOT_DEV" u s resizepart "$ROOT_PART_NUM" "$TARGET_END"; then
|
||||
FAIL_REASON="Root partition resize failed"
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! resize2fs "$ROOT_DEV"; then
|
||||
FAIL_REASON="Root filesystem resize failed"
|
||||
mount / -o remount,rw
|
||||
if ! resize2fs "$ROOT_PART_DEV"; then
|
||||
return 1
|
||||
fi
|
||||
mount / -o remount,ro
|
||||
|
||||
fix_partuuid
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user