Skip to content

Commit

Permalink
Adjust partition formatting and mount options
Browse files Browse the repository at this point in the history
Format the root partition with the metadata_csum option

Format the boot partition with 4 sectors per cluster for a slight performance boost

Remove 'flush' mount option from the boot partition
  • Loading branch information
XECDesign committed Jun 17, 2022
1 parent d3105c6 commit 00da851
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions export-image/prerun.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ if [ "${NO_PRERUN_QCOW2}" = "0" ]; then
echo "/: offset $ROOT_OFFSET, length $ROOT_LENGTH"

ROOT_FEATURES="^huge_file"
for FEATURE in metadata_csum 64bit; do
for FEATURE in 64bit; do
if grep -q "$FEATURE" /etc/mke2fs.conf; then
ROOT_FEATURES="^$FEATURE,$ROOT_FEATURES"
fi
done
mkdosfs -n boot -F 32 -v "$BOOT_DEV" > /dev/null
mkdosfs -n boot -F 32 -s 4 -v "$BOOT_DEV" > /dev/null
mkfs.ext4 -L rootfs -O "$ROOT_FEATURES" "$ROOT_DEV" > /dev/null

mount -v "$ROOT_DEV" "${ROOTFS_DIR}" -t ext4
Expand Down
2 changes: 1 addition & 1 deletion export-noobs/00-release/files/partitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"filesystem_type": "FAT",
"label": "boot",
"mkfs_options": "-F 32",
"mkfs_options": "-F 32 -s 4",
"partition_size_nominal": BOOT_NOM,
"uncompressed_tarball_size": BOOT_SIZE,
"want_maximised": false,
Expand Down
4 changes: 3 additions & 1 deletion export-noobs/00-release/files/release_notes.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
UNRELEASED:
*
* Format the root partition with the metadata_csum option
* Format the boot partition with 4 sectors per cluster for a slight performance boost
* Remove 'flush' mount option from the boot partition
2022-04-04:
* Default "pi” user has been removed; the first-boot wizard enforces the creation of a new user account
* rename-user script added to allow existing users to be renamed by temporarily rebooting to cut-down first-boot wizard
Expand Down
4 changes: 2 additions & 2 deletions scripts/qcow2_handling
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ load_qimage() {
EOF
sync
kpartx -as $NBD_DEV
mkdosfs -n boot -F 32 -v $MAP_BOOT_DEV
mkfs.ext4 -L rootfs -O "^huge_file,^metadata_csum,^64bit" $MAP_ROOT_DEV
mkdosfs -n boot -F 32 -s 4 -v $MAP_BOOT_DEV
mkfs.ext4 -L rootfs -O "^huge_file,^64bit" $MAP_ROOT_DEV
sync
else
if [ ! -f "${WORK_DIR}/image-${PREV_STAGE}.qcow2" ]; then
Expand Down
2 changes: 1 addition & 1 deletion stage1/01-sys-tweaks/files/fstab
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
proc /proc proc defaults 0 0
BOOTDEV /boot vfat defaults,flush 0 2
BOOTDEV /boot vfat defaults 0 2
ROOTDEV / ext4 defaults,noatime 0 1

0 comments on commit 00da851

Please sign in to comment.