Fix to 'firstboot.sh' to resize the partiton of '/dev/sd*'

Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: Id816a6dd1dd001f73e119d285f9d62ef1f3a4a7d
This commit is contained in:
Dongjin Kim
2020-11-20 21:28:58 +09:00
parent a21f2152a2
commit 7147538f8c

View File

@@ -7,7 +7,11 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin
rootdev=`blkid -U @@UUID_ROOTFS@@`
dev=${rootdev%??}
case ${rootdev} in
/dev/mmcblk*) dev=${rootdev%??} ;;
*) dev=${rootdev%?} ;;
esac
lba_start=`fdisk -l ${dev} | grep p2 | awk '{print $2}'`
lba_finish=$((`fdisk -l ${dev} | grep Disk | grep sectors | awk '{printf $7}'` - 2048))