Fix usb image's size detection
Conversion issue when dropping mkusbimg. Use work_dir/iso to get the proper image size Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
This commit is contained in:
parent
29d05d6bea
commit
fbd2ce5cb0
@ -261,7 +261,7 @@ command_usb () {
|
|||||||
fsimg="${imgname}.part1"
|
fsimg="${imgname}.part1"
|
||||||
|
|
||||||
# ext2 overhead's upper bound is 6%, empirically tested up to 1GB
|
# ext2 overhead's upper bound is 6%, empirically tested up to 1GB
|
||||||
rootsize=$(du -bs ${IMGROOT}|cut -f1)
|
rootsize=$(du -bs "${work_dir}/iso" | cut -f1)
|
||||||
imgsz=$(( (${rootsize}*106)/100/512 + 1)) # image size in sectors
|
imgsz=$(( (${rootsize}*106)/100/512 + 1)) # image size in sectors
|
||||||
|
|
||||||
# create the filesystem image file
|
# create the filesystem image file
|
||||||
|
Loading…
Reference in New Issue
Block a user