View Single Post
Old 10-13-2014, 01:23 PM   #25
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
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.
knc1 is offline   Reply With Quote