dd if=/dev/zero of=arch.img seek=750M count=1 #(write one byte at maximum file extent)
sudo losetup -f arch.img #(adapt file to be used as a device, using first free loop device)
sudo losetup -a #(find which loop device was assigned, assume here loop0)
sudo mke2fs -F -t ext3 /dev/loop0 #(Yes, you can format a sparse file used as loop mounted device)
OK - now you can use the file as a file system.
sudo losetup -d /dev/loop0 #(detach the file-to-device adaption)
sudo mount arch.img /mnt/tmp #(make the sub-directory mount point if required)
(The 'missing' steps in the above are provided by your distribution's automation.)
Last edited by knc1; 10-13-2014 at 02:17 PM.
|