mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 12:59:02 +02:00
init-install.sh: fix disk_size
It mis-matched "SanDisk" or "Disk Flags" before, which caused unexpected error. (From OE-Core rev: 346b6ef31253789d7d6664a19297b6deec9d27a0) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit a68ac76c1b6ed4c1a2fbc944c5021c89fd26217f) [YOCTO #10333] Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
2804850ea7
commit
2ff9d30dac
|
@ -69,7 +69,7 @@ umount /dev/${device}* 2> /dev/null || /bin/true
|
|||
mkdir -p /tmp
|
||||
cat /proc/mounts > /etc/mtab
|
||||
|
||||
disk_size=$(parted /dev/${device} unit mb print | grep Disk | cut -d" " -f 3 | sed -e "s/MB//")
|
||||
disk_size=$(parted /dev/${device} unit mb print | grep '^Disk .*: .*MB' | cut -d" " -f 3 | sed -e "s/MB//")
|
||||
|
||||
testfs_size=$((disk_size*testfs_ratio/100))
|
||||
rootfs_size=$((disk_size-boot_size-testfs_size))
|
||||
|
|
|
@ -120,7 +120,7 @@ if [ ! -e /etc/mtab ]; then
|
|||
cat /proc/mounts > /etc/mtab
|
||||
fi
|
||||
|
||||
disk_size=$(parted ${device} unit mb print | grep Disk | cut -d" " -f 3 | sed -e "s/MB//")
|
||||
disk_size=$(parted ${device} unit mb print | grep '^Disk .*: .*MB' | cut -d" " -f 3 | sed -e "s/MB//")
|
||||
|
||||
swap_size=$((disk_size*swap_ratio/100))
|
||||
rootfs_size=$((disk_size-boot_size-swap_size))
|
||||
|
|
|
@ -116,7 +116,7 @@ if [ ! -L /etc/mtab ]; then
|
|||
cat /proc/mounts > /etc/mtab
|
||||
fi
|
||||
|
||||
disk_size=$(parted ${device} unit mb print | grep Disk | cut -d" " -f 3 | sed -e "s/MB//")
|
||||
disk_size=$(parted ${device} unit mb print | grep '^Disk .*: .*MB' | cut -d" " -f 3 | sed -e "s/MB//")
|
||||
|
||||
grub_version=$(grub-install -v|sed 's/.* \([0-9]\).*/\1/')
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user