Skip to content

Commit 3181f1e

Browse files
committed
Fix resize_rootfs.sh script for case when partion has bootable flag set
1 parent 7df6b1a commit 3181f1e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

package/root/usr/local/sbin/resize_rootfs.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ DEVICE="/dev/mmcblk0"
1313
PART="2"
1414

1515
resize() {
16-
start=$(fdisk -l ${DEVICE}|grep ${DEVICE}p${PART}|awk '{print $2}')
16+
start=$(fdisk -l ${DEVICE} | grep ${DEVICE}p${PART} | sed 's/*//' | awk '{print $2}')
1717
echo $start
1818

1919
set +e
@@ -26,6 +26,8 @@ p
2626
2
2727
$start
2828
29+
a
30+
2
2931
w
3032
EOF
3133
set -e
@@ -36,4 +38,4 @@ EOF
3638

3739
resize
3840

39-
echo "Done!"
41+
echo "Done!"

0 commit comments

Comments
 (0)