Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8609

Troubleshooting • [Trixie 2025-12-04] SD card expanded but resize2fs did not run during first boot

$
0
0
I have a customization for initramfs that add additional partitions before running do_resize function to resize the last partition during first boot. This work great in bookworm but in trixie, the last partition size was expanded but the ext4 partition still remain small. I checked the difference between the bookworm and trixie and found out do_resize function no longer run resize2fs. May I know where exactly the resize2fs command is being run for trixie during first boot?

The changes observed below for reference:

Bookworm - /scripts/local-premount/firstboot

Code:

do_resize () {  if ! parted -m "$ROOT_DEV" u s resizepart "$ROOT_PART_NUM" "$TARGET_END"; then    FAIL_REASON="Partition table resize of the root partition ($DEV) failed\n$FAIL_REASON"    return 1  fi  wait_for_udev 10  resize2fs -f -p "$DEV"  RET="$?"  if [ "$RET" -ne 0 ]; then    FAIL_REASON="Root partition resize failed\n$FAIL_REASON"  fi  return "$RET"}
Trixie - /scripts/local-premount/resize_early

Code:

do_resize () {  if ! parted -m "$ROOT_DEV" u s resizepart "$ROOT_PART_NUM" "$TARGET_END"; then    return 1  fi}

Statistics: Posted by rasp14 — Thu Jan 22, 2026 5:20 am



Viewing all articles
Browse latest Browse all 8609

Trending Articles