[Angstrom-distro-users] h2200 - How to increase the loopback image
colin-david-bates at supanet.com
Mon May 26 10:51:47 CEST 2008
J SA <jsombra_newhouse at ...> writes:
> How to increase this the loopback image, assuming that I don´t
wanna lost all my updates on the default
> image? I´ve tried the dd command on Ubuntu 7.10, and copy all files
to the new image file, but I always get a
> kernel panic message.
> Thanks for all,
> Joao Sombra
> Abra sua conta no Yahoo! Mail, o único sem limite de espaço para
Friendly hint. You will probably get an answer quicker if you put a
bit more detail in your message. "(I) used dd" does not really say
Anyway, one way to do what you want is to make a new image file of
the size you want then copy your data to the new image file.
1) Copy the loop image to a desktop.
2) Make a new empty image of the size you want using:
dd if=/dev/zero of=MyNewImage bs=1024 count=NewImageSizeInK's
losetup /dev/loop0 MyNewImage
dd commnad makes a file full of zeros of the correct size.
losetup command makes device loop0 use your new file.
mke2fs formats the new file as ext2.
Now you have an empty image file.
3) You now need a device for your original image so:
losetup /dev/loop1 MyOrigImage
4) Make a couple of mount points for the loop devices:
5) Now mount the two images:
mount /dev/loop0 loop0
mount /dev/loop1 loop1
6) Now you can copy the data from the original image to the new
cp -a loop1/* loop0
7) Umount the images and un-attach the loop devices:
losetup -d /dev/loop0
losetup -d /dev/loop1
8) You now have all you data on the new large image and this can
be copied to the CF card.
Hope this works for you. Alternative methods include extending
the original image file and then extending the formated area
More information about the Angstrom-distro-users