Skip to content

Commit

Permalink
Increase /mutable size to accommodate very large drives
Browse files Browse the repository at this point in the history
  • Loading branch information
marcone authored Nov 21, 2024
1 parent 3aac453 commit 7282541
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions setup/pi/create-backingfiles-partition.sh
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ log_progress "Checking existing partitions..."

DISK_SECTORS=$(blockdev --getsz "${BOOT_DISK}")
LAST_DISK_SECTOR=$((DISK_SECTORS - 1))
# mutable partition is 100MB at the end of the disk, calculate its start sector
FIRST_MUTABLE_SECTOR=$((LAST_DISK_SECTOR-204800+1))
# mutable partition is 300MB at the end of the disk, calculate its start sector
FIRST_MUTABLE_SECTOR=$((LAST_DISK_SECTOR-614400+1))
# backingfiles partition sits between the last and mutable partition, calculate its start sector and size
LAST_PART_SECTOR=$(sfdisk -q -l "${BOOT_DISK}" | tail +2 | sort -n -k 2 | tail -1 | awk '{print $3}')
FIRST_BACKINGFILES_SECTOR=$((LAST_PART_SECTOR + 1))
Expand Down

0 comments on commit 7282541

Please sign in to comment.