export-image: Set /boot size to 256MB
This commit is contained in:
parent
22c8878f5d
commit
0308e92705
2 changed files with 4 additions and 4 deletions
|
@ -9,11 +9,11 @@ rm -f "${IMG_FILE}"
|
|||
rm -rf "${ROOTFS_DIR}"
|
||||
mkdir -p "${ROOTFS_DIR}"
|
||||
|
||||
BOOT_SIZE=$(du --apparent-size -s "${EXPORT_ROOTFS_DIR}/boot" --block-size=1 | cut -f 1)
|
||||
BOOT_SIZE="$((256 * 1024 * 1024))"
|
||||
TOTAL_SIZE=$(du --apparent-size -s "${EXPORT_ROOTFS_DIR}" --exclude var/cache/apt/archives --block-size=1 | cut -f 1)
|
||||
|
||||
ROUND_SIZE="$((4 * 1024 * 1024))"
|
||||
ROUNDED_ROOT_SECTOR=$(((2 * BOOT_SIZE + ROUND_SIZE) / ROUND_SIZE * ROUND_SIZE / 512 + 8192))
|
||||
ROUNDED_ROOT_SECTOR=$(((BOOT_SIZE + ROUND_SIZE) / ROUND_SIZE * ROUND_SIZE / 512 + 8192))
|
||||
IMG_SIZE=$(((BOOT_SIZE + TOTAL_SIZE + (800 * 1024 * 1024) + ROUND_SIZE - 1) / ROUND_SIZE * ROUND_SIZE))
|
||||
|
||||
truncate -s "${IMG_SIZE}" "${IMG_FILE}"
|
||||
|
@ -23,7 +23,7 @@ n
|
|||
|
||||
|
||||
8192
|
||||
+$((BOOT_SIZE * 2 /512))
|
||||
+$((BOOT_SIZE / 512))
|
||||
p
|
||||
t
|
||||
c
|
||||
|
|
|
@ -16,7 +16,7 @@ ROOT_SIZE="$(xz --robot -l "${NOOBS_DIR}/root.tar.xz" | grep totals | cut -f 5)
|
|||
BOOT_SIZE="$(( BOOT_SIZE / 1024 / 1024 + 1))"
|
||||
ROOT_SIZE="$(( ROOT_SIZE / 1024 / 1024 + 1))"
|
||||
|
||||
BOOT_NOM="$(( BOOT_SIZE * 3 ))"
|
||||
BOOT_NOM="256"
|
||||
ROOT_NOM="$(( ROOT_SIZE + 400 ))"
|
||||
|
||||
mv "${NOOBS_DIR}/OS.png" "${NOOBS_DIR}/${NOOBS_NAME// /_}.png"
|
||||
|
|
Loading…
Reference in a new issue