Ver código fonte

Adding loopback commands

Common loopback device commands. Useful for dealing with filesystems
in a file.
master
Nate Bohman 6 anos atrás
pai
commit
37ddde808c
1 arquivos alterados com 15 adições e 0 exclusões
  1. +15
    -0
      loopback_device.sh

+ 15
- 0
loopback_device.sh Ver arquivo

@@ -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

Carregando…
Cancelar
Salvar