The sfdisk in Jessie use unit Cylinder by default. To perform 1M aligning partition, 2048 sector unit is desirable instead.
This commit is contained in:
parent
1a84813f0d
commit
69d5d61eb8
@ -170,7 +170,7 @@ umount "$root_mnt"
|
||||
|
||||
# Create a new partition table (content in flash_dev will be deleted)
|
||||
err_msg="Error: repartitioning $flash_dev failed"
|
||||
cmd="echo '2048' | sfdisk $flash_dev || (sleep 3; blockdev --rereadpt $flash_dev && fdisk -l $flash_dev | grep -q ${root_dev}.*Linux)"
|
||||
cmd="echo '2048' | sfdisk -u S --force $flash_dev || (sleep 3; blockdev --rereadpt $flash_dev && fdisk -l $flash_dev | grep -q ${root_dev}.*Linux)"
|
||||
run_cmd "$cmd" "$err_msg"
|
||||
|
||||
sleep 5
|
||||
|
Reference in New Issue
Block a user