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
mkisofs -o thefile.iso -J directory

# Mount an ISO
mount -o loop -t iso9660 thefile.iso /mnt/test

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


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