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