1

Is there a possibility to extend the size of already existing ext2 image?

This image is a ramdisk based root file system.

I already have an image. but I want to extend the size of this image.

Is it possible to extend the size of this image.

kumar
  • 2,530
  • 6
  • 33
  • 57

1 Answers1

2

Definitely back up before you do this, but it worked for me on a test fs (assuming your disk image is called foo.img):

$ dd if=/dev/zero of=foo.img count=0 bs=1M seek=2000   # assuming target size is 2000M
$ e2fsck -f foo.img
$ resize2fs foo.img
cam
  • 14,192
  • 1
  • 44
  • 29
  • I think the kernel only supports online (mounted) extending for filesystems mounted with `ext3`. – caf Aug 17 '10 at 00:11