summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorZhijiang Hu <hu.zhijiang@zte.com.cn>2017-04-19 03:38:48 -0400
committerZhijiang Hu <hu.zhijiang@zte.com.cn>2017-04-19 03:38:48 -0400
commit17db096d1bbbaabd30add632fc91e4e48afc990f (patch)
treeee3a9de4c21e8c0c9b2fd060d63c25972740b2c1 /tools
parent12eaf7b46bec6d25caf0d2d58c7a1eb69f33a3d8 (diff)
Solve "Buffer I/O error on dev loop0p1" error message
This add "losetup" before "kpartx -l" command, otherwise, we encountered many "Buffer I/O error on dev loop0p1, logical block 104854018, async page read" in dmesg. But they are seems no harm. No need to do "losetup -d" after "losetup", because "kpartx -dv" will do that for us. Change-Id: I326ef35a241d8b09f0f3f3fc90ef749df3f4768f Signed-off-by: Zhijiang Hu <hu.zhijiang@zte.com.cn>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/daisy-img-modify.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/daisy-img-modify.sh b/tools/daisy-img-modify.sh
index 90910a14..aad29949 100755
--- a/tools/daisy-img-modify.sh
+++ b/tools/daisy-img-modify.sh
@@ -157,6 +157,7 @@ resize() {
# resize the image
qemu-img resize $raw_imgfile ${img_size}G
qemu-img info $raw_imgfile
+ losetup --find --show $raw_imgfile
loopdevice=$(kpartx -l $raw_imgfile | head -1 | cut -f1 -d ' ')
kpartx -av $raw_imgfile
sleep 2
@@ -170,9 +171,8 @@ resize() {
# mount image
setup() {
mkdir -p $mountdir
-
+ losetup --find --show $raw_imgfile
loopdevice=$(kpartx -l $raw_imgfile | head -1 | cut -f1 -d ' ')
-
kpartx -av $raw_imgfile
sleep 2
dmsetup ls