Mounting an image requires full path & partition #
Use readlink to get the full path of the image. Mount the first partition. Print out the location of the mount. Change-Id: I0deba1907f390f0d308ae6c8ed5448afbbf7688a
This commit is contained in:
parent
d1ff3c4ab3
commit
207c3df031
@ -21,5 +21,10 @@ IMAGE=$1
|
||||
rm -rf /tmp/newimage
|
||||
mkdir -p /tmp/newimage
|
||||
|
||||
qemu-nbd -c /dev/nbd1 $1
|
||||
mount /dev/nbd1 /tmp/newimage
|
||||
#qemu-nbd needs the absolute path of the image
|
||||
qemu-nbd -c /dev/nbd1 `readlink -e $IMAGE`
|
||||
|
||||
#mount the first partition
|
||||
mount /dev/nbd1p1 /tmp/newimage
|
||||
|
||||
echo "Image $IMAGE mounted to /tmp/newimage"
|
||||
|
Loading…
Reference in New Issue
Block a user