mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-21 18:33:23 +00:00
调整创建磁盘、挂载磁盘及卸载磁盘的脚本
This commit is contained in:
12
tools/mount_virt_disk.sh
Normal file → Executable file
12
tools/mount_virt_disk.sh
Normal file → Executable file
@ -1,4 +1,8 @@
|
||||
sudo losetup -P /dev/loop1 --show ../bin/disk.img
|
||||
lsblk
|
||||
mkdir -p ../bin/disk_mount/
|
||||
sudo mount /dev/loop1p1 ../bin/disk_mount/
|
||||
LOOP_DEVICE=$(sudo losetup -f --show -P ../bin/disk.img) \
|
||||
|| exit 1
|
||||
|
||||
echo ${LOOP_DEVICE}p1
|
||||
sudo mkfs.vfat -F 32 ${LOOP_DEVICE}p1
|
||||
mkdir -p ../bin/disk_mount/
|
||||
sudo mount ${LOOP_DEVICE}p1 ../bin/disk_mount/
|
||||
lsblk
|
Reference in New Issue
Block a user