xref: /DragonOS/tools/mount_virt_disk.sh (revision 660a04cef803fd73e9b294b30a96421b021a4b9b)
1# ======检查是否以sudo运行=================
2uid=`id -u`
3if [ ! $uid == "0" ];then
4 echo "请以sudo权限运行"
5 exit
6fi
7
8LOOP_DEVICE=$(losetup -f --show -P ../bin/disk.img) \
9    || exit 1
10
11echo ${LOOP_DEVICE}p1
12
13mkdir -p ../bin/disk_mount/
14mount ${LOOP_DEVICE}p1 ../bin/disk_mount/
15lsblk