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:
committed by
Christian Neukirchen
parent
58f6a3e7c0
commit
9800862806
@@ -155,7 +155,7 @@ _EOF
|
|||||||
sfdisk ${FILENAME} <<_EOF
|
sfdisk ${FILENAME} <<_EOF
|
||||||
label: dos
|
label: dos
|
||||||
2048,${BOOT_FSSIZE},b,*
|
2048,${BOOT_FSSIZE},b,*
|
||||||
${BOOT_FSSIZE},+,L
|
,+,L
|
||||||
_EOF
|
_EOF
|
||||||
LOOPDEV=$(losetup --show --find --partscan $FILENAME)
|
LOOPDEV=$(losetup --show --find --partscan $FILENAME)
|
||||||
mkfs.${BOOT_FSTYPE} $_args ${LOOPDEV}p1 >/dev/null
|
mkfs.${BOOT_FSTYPE} $_args ${LOOPDEV}p1 >/dev/null
|
||||||
|
Reference in New Issue
Block a user