Sfoglia il codice sorgente

Adding loopback commands

Common loopback device commands. Useful for dealing with filesystems
in a file.
master
Nate Bohman 6 anni fa
parent
commit
37ddde808c
1 ha cambiato i file con 15 aggiunte e 0 eliminazioni
  1. +15
    -0
      loopback_device.sh

+ 15
- 0
loopback_device.sh Vedi File

@@ -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…
Annulla
Salva