mkimage.sh: fix sfdisk usage for multiple arches.

In the case where we have two partitions, boot and root, the
root partition needs to start at sector (2048 + bootfs_size_in_sectors),
not at $BOOT_FSSIZE.
Using $BOOT_FSSIZE as the start tells sfdisk to try to start the
/ partition in the middle of /boot, which it refuses to do.
Leave start blank, and sfdisk uses the first unallocated sector as
the start of /, which happens to be sector 2048 + bootfs_size_in_sectors.

I suspect this fixes #81.
This commit is contained in:
Christopher Brannon 2016-11-29 13:57:25 -08:00 committed by Christian Neukirchen
parent 58f6a3e7c0
commit 9800862806
1 changed files with 1 additions and 1 deletions

View File

@ -155,7 +155,7 @@ _EOF
sfdisk ${FILENAME} <<_EOF
label: dos
2048,${BOOT_FSSIZE},b,*
${BOOT_FSSIZE},+,L
,+,L
_EOF
LOOPDEV=$(losetup --show --find --partscan $FILENAME)
mkfs.${BOOT_FSTYPE} $_args ${LOOPDEV}p1 >/dev/null