0

I'm using the below sfdisk script for eMMC partition on the target Linux platform and is working fine.

#!/bin/sh

# wait for the SD/MMC device node ready
while [ ! -e $1 ]
do
sleep 1
echo “wait for $1 appear”
done

# call sfdisk to create partition table
# destroy the partition table
node=$1
dd if=/dev/zero of=${node} bs=1024 count=1

sfdisk --force ${node} << EOF
,320M,83
,320M,83
,8M,83
,,E
,2M,83
,2048M,83
,512M,83
,16M,83
,,83
EOF

Now, I need to modify the starting size of first partition from default (2MB) to 10MB. I have modified it like below but, it didn't work and throws error.

#!/bin/sh

# wait for the SD/MMC device node ready
while [ ! -e $1 ]
do
sleep 1
echo “wait for $1 appear”
done

# call sfdisk to create partition table
# destroy the partition table
node=$1
dd if=/dev/zero of=${node} bs=1024 count=1

sfdisk --force ${node} << EOF
10M,320M,83
,320M,83
,8M,83
,,E
,2M,83
,2048M,83
,512M,83
,16M,83
,,83
EOF

If the extended partitions are not present, then the start address mentioned like above will work without any problem.

I need to mention the required starting address correctly with the extended partitions. What is the issue here?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.