meefik / linuxdeploy

Install and run GNU/Linux on Android
https://meefik.github.io/linuxdeploy
GNU General Public License v3.0
5.23k stars 680 forks source link

Is that possible to resize the img DISK? #598

Open Happy-hacker opened 8 years ago

Happy-hacker commented 8 years ago

I have 32 gb of sdcard when I edit the image disk then I put 18000mb/18gb it's working but they only create 4gb and says fail HOW TO FIX THIS?

davidaik commented 8 years ago

I've done this before.

Follow the following steps.

  1. Create a new empty image appropriate size using dd command.
  2. Format the new image using mkfs.ext4 or something similar.
  3. Mount the old image and the new image at /data/local/old and /data/local/new respectively. You need to use losetup and mount commands for this.
  4. run the following command cp -pr /data/local/old/ /data/local/new
  5. Unmount all images.
  6. Now you have a new image of appropriate size.
davidaik commented 8 years ago

If you're not sure how to do a step, Google!

davidaik commented 8 years ago

Oh, if your card is formatted to FAT32, the maximum supported file size is 4GB. It won't be possible to have a bigger image. You could try formatting your card to exfat but it cannot be mounted on windows.

terbo commented 8 years ago

resize2fs worked for me