Align partition on 1MiB boundary
authorIustin Pop <iustin@google.com>
Thu, 3 May 2012 04:26:54 +0000 (21:26 -0700)
committerIustin Pop <iustin@google.com>
Thu, 3 May 2012 18:03:50 +0000 (11:03 -0700)
Currently, the partition we create in 'msdos' style partitioning is
not aligned to any particular offset, and instead starts simply after
the MBR on sector 1. This creates problems with grub for example,
which doesn't have space for embedding.

To fix this and make the partitioning more standard, let's align it on
a 1MiB boundary.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: RenĂ© Nussbaumer <rn@google.com>

common.sh.in

index 7ce75a5..90924d4 100644 (file)
@@ -91,8 +91,8 @@ format_disk0() {
   # some versions of sfdisk need manual specification of
   # head/sectors for devices such as drbd which don't
   # report geometry
-  sfdisk -H 255 -S 63 --quiet --Linux "$1" <<EOF
-0,,L,*
+  sfdisk -H 64 -S 32 -u S --quiet --Linux "$1" <<EOF
+2048,,L,*
 EOF
 }