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. Thanks, Debbie
Theodore Ts'o
2003-May-22 02:54 UTC
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
Debbie Xu
2003-May-22 16:20 UTC
RE: How to create EXT3 file system image from directories?
Thanks a lot, it works! Why do I have to use "-o loop" option? Tx, Debbie -----Original Message----- From: Theodore Ts'o [mailto:tytso@mit.edu] Sent: Wednesday, May 21, 2003 7:55 PM To: Debbie Xu Cc: 'ext3-users@redhat.com' Subject: 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
Christopher Li
2003-May-22 22:25 UTC
RE: How to create EXT3 file system image from directories?
Because foo.img is a file not a block device. Loop back device provide a block device for that file. Chris -----Original Message----- From: Debbie Xu [mailto:DXu@intrinsyc.com] Sent: Thursday, May 22, 2003 9:21 AM To: 'Theodore Ts'o'; Debbie Xu Cc: 'ext3-users@redhat.com' Subject: RE: How to create EXT3 file system image from directories? Thanks a lot, it works! Why do I have to use "-o loop" option? Tx, Debbie -----Original Message----- From: Theodore Ts'o [ mailto:tytso@mit.edu <mailto:tytso@mit.edu> ] Sent: Wednesday, May 21, 2003 7:55 PM To: Debbie Xu Cc: 'ext3-users@redhat.com' Subject: 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
Apparently Analagous Threads
- Re: Strange fsck.ext3 behavior - infinite loop
- getrandom waits for a long time when /dev/random is insufficiently read from
- getrandom waits for a long time when /dev/random is insufficiently read from
- [PATCH net] virtio-net: correctly enable multiqueue
- [PATCH net] virtio-net: correctly enable multiqueue