瀏覽代碼

Adding loopback commands

Common loopback device commands. Useful for dealing with filesystems
in a file.
master
Nate Bohman 6 年之前
父節點
當前提交
37ddde808c
共有 1 個檔案被更改,包括 15 行新增0 行删除
  1. +15
    -0
      loopback_device.sh

+ 15
- 0
loopback_device.sh 查看文件

@@ -0,0 +1,15 @@
# If an available /dev/loop device is
# known before running the command
# losetup /dev/loop0 floppy.img

# Use the first available /dev/loopN device
losetup -f floppy.img

# Create the filesystem
mkfs.xfs /dev/loop0

# Destroy loopback device
losetup -d /dev/loop0

# Mount the loopback image
mount -o loop -t xfs floppy.img /mnt

Loading…
取消
儲存