mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-09 11:16:47 +00:00
15 lines
298 B
Bash
Executable File
15 lines
298 B
Bash
Executable File
# ======检查是否以sudo运行=================
|
|
uid=`id -u`
|
|
if [ ! $uid == "0" ];then
|
|
echo "请以sudo权限运行"
|
|
exit
|
|
fi
|
|
|
|
LOOP_DEVICE=$(losetup -f --show -P ../bin/disk.img) \
|
|
|| exit 1
|
|
|
|
echo ${LOOP_DEVICE}p1
|
|
|
|
mkdir -p ../bin/disk_mount/
|
|
mount ${LOOP_DEVICE}p1 ../bin/disk_mount/
|
|
lsblk |