mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-23 11:36:32 +01:00
Start Linux rootfs partition at 1M, not sector 1
This improves partition alignment, and therefore performance on SSDs and AF (4K-sectored) HDDs. Also, it leaves some space before the partition to allow installing GRUB.
This commit is contained in:
parent
a3f30a163c
commit
5bd1bad62e
1 changed files with 2 additions and 1 deletions
|
|
@ -69,7 +69,8 @@ fi
|
|||
# shellcheck disable=SC2012
|
||||
if [ $(($(ls -l "/dev/${DISK}" | sed "s/.*, *//" | sed "s/ .*//") % 8)) -eq 0 ]; then
|
||||
echo "Creating partition table..."
|
||||
echo ";" | sfdisk "/dev/${DISK}"
|
||||
# Convince our ancient sfdisk to align to megabytes, not cylinders
|
||||
echo "2048;" | sfdisk -uS -S32 -H64 "/dev/${DISK}"
|
||||
fdisk -l "/dev/${DISK}"
|
||||
echo "Creating ext4 partition..."
|
||||
mkfs.ext4 "/dev/${DISK}1"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue