Skip to content

Commit

Permalink
setup: round start of backingfiles partition
Browse files Browse the repository at this point in the history
  • Loading branch information
marcone committed Dec 30, 2024
1 parent 457efdd commit 51a95f9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions setup/pi/create-backingfiles-partition.sh
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@ 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 -o End -q -l "${BOOT_DISK}" | tail +2 | sort -n | tail -1)
FIRST_BACKINGFILES_SECTOR=$((LAST_PART_SECTOR + 1))
# round up to 1MB boundary because the TeslaUSB Buster prebuilt as well as older Armbian
# images might have an odd root partition size
FIRST_BACKINGFILES_SECTOR=$(((FIRST_BACKINGFILES_SECTOR + 2047) / 2048 * 2048))
BACKINGFILES_NUM_SECTORS=$((FIRST_MUTABLE_SECTOR - FIRST_BACKINGFILES_SECTOR))

# As a rule of thumb, one gigabyte of /backingfiles space can hold about 36
Expand Down

0 comments on commit 51a95f9

Please sign in to comment.