[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: How to create EXT3 file system image from directories?



On Wed, May 21, 2003 at 02:57:00PM -0700, Debbie Xu wrote:
> Hi there,
> 
> Is there a utility to create an EXT3 file system image from directories?
> Just like the mkfs.jffs2 which creates a JFFS2 file system image from
> directories?
> 
> The "mke2fs -j" only creates the bare bone file system, what I want is to
> build an image with pre-built content.

The easist thing to do is to create a filesystem on a file using
mke2fs, and then mount the filesystem using the loopback device:

dd if=/dev/zero of=foo.img bs=1k count=16384
mke2fs -f foo.img
mount -o loop foo.img /mnt
cp -r /source /mnt
umount /mnt

						- Ted




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]