wiki:tipps_und_tricks:file_as_partition

Datei erstellen:

dd if=/dev/zero of=Disk.img bs=50MB count=2

Datei zum Blockdevice machen

Prüfen, ob loop-device schon benutzt wird

losetup /dev/loop0

Datei auf loop-Device einhängen

losetup /dev/loop0 Disk.img

Dateisystem erstellen

mkfs -t ext3 -m 1 -v /dev/loop0

Fertig

Benutzen:

mount -t ext3 /dev/loop0 /mnt/fs_mount_location/

Aushängen:

umount /mnt/fs_mount_location/
losetup -d /dev/loop0

Quellen:

Geben Sie Ihren Kommentar ein. Wiki-Syntax ist zugelassen:
   _  __   __  ___  _   __   _  __  __  __
  / |/ /  /  |/  / | | / /  / |/ / / / / /
 /    /  / /|_/ /  | |/ /  /    / / /_/ / 
/_/|_/  /_/  /_/   |___/  /_/|_/  \____/
 
  • wiki/tipps_und_tricks/file_as_partition.txt
  • Zuletzt geändert: 2017/08/01 10:11
  • von wikiadmin