Filesystem inside a file, create an ISO file of a directory

How to make a file system inside a file


dd if=/dev/zero of=bigfile count=10 bs=1M

# ext2 version
mke2fs ./bigfile
mount ./bigfile /mnt/tmp/ -o loop

# reiserfs version
mkreiserfs -f ./bigfile -b 512
mount ./bigfile /mnt/tmp/ -o loop -t reiserfs

create an ISO file of a directory


# Create an ISO of a directory, -J makes joliet - filenames more than 8.3
# http://www.walkernews.net/2008/07/06/how-to-create-iso-image-of-directory-or-filesystem-in-linux/
mkisofs -o thefile.iso -J directory

# Mount an ISO
# http://www.tech-recipes.com/rx/857/mount-an-iso-file-in-linux/
mount -o loop -t iso9660 thefile.iso /mnt/test

This is a personal note. Last updated: 2014-06-27 00:34:15.



LinkedIn
Klebe.se

Don't forget to pay my friend a visit too. Joakim