From a4140dfc89e8535d20c4de393ac7fb3b69dc3086 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Sun, 23 Feb 2014 12:02:56 -0500 Subject: [PATCH] start first partition at 1M not 0 trying to create a partition with parted at actually 0 offset causes a warning on alignment. On a real disk this would be an actual issue with offsets, and could have a real performance impact. With a virtual disk, it's a little less clear, but can't hurt to shave off 1M of swap to align in a more typical way. Change-Id: I28cb60c635280603488a9b34ead848ee76ca111c --- functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions.sh b/functions.sh index 00605974..0ee6bc71 100644 --- a/functions.sh +++ b/functions.sh @@ -125,7 +125,7 @@ function fix_disk_layout { if [ -n "$DEV" ]; then sudo umount ${DEV} sudo parted ${DEV} --script -- mklabel msdos - sudo parted ${DEV} --script -- mkpart primary linux-swap 0 8192 + sudo parted ${DEV} --script -- mkpart primary linux-swap 1 8192 sudo parted ${DEV} --script -- mkpart primary ext2 8192 -1 sudo mkswap ${DEV}1 sudo mkfs.ext4 ${DEV}2