Hi,
Any easy way to resize a bootable image for SD card? There are ready Linux images for booting on Android devices, like MK802. The problem is, 1) sometimes you don't have a card for that size (say 4Gb image, 8Gb card) or 2) micro-SD card come in random sizes, so an image for 8Gb card can be some kbytes too long for a 8Gb card of another vendor.
I probably could mount the image, copy the contents and go over the process of creating a bootable image myself. But is there a way of doing it with a lesser effort?
On 2012-11-20 Grigory Shamov wrote:
Hi,
Any easy way to resize a bootable image for SD card? There are ready Linux images for booting on Android devices, like MK802. The problem is, 1) sometimes you don't have a card for that size (say 4Gb image,
Hmm, couldn't you use gparted? I think almost for sure this would work for ext2/3/4, not sure about FAT32?
If gparted can't do an image (probably can't) then you could dd the image to a block device (like a USB stick), run gparted and resize, then dd it back in to an image file.
I'm assuming this won't mess up the boot pointers into the fs. Should be fine for grows. Shrinks should work if the bootable bits are at the beginning.
Or am I out to lunch here?
On 2012-11-20 14:27, Trevor Cordes wrote:
On 2012-11-20 Grigory Shamov wrote:
Hi,
Any easy way to resize a bootable image for SD card? There are ready Linux images for booting on Android devices, like MK802. The problem is, 1) sometimes you don't have a card for that size (say 4Gb image,
Hmm, couldn't you use gparted? I think almost for sure this would work for ext2/3/4, not sure about FAT32?
I think gparted can resize FAT16 and FAT32 file systems too. However, since that's the default format for most USB sticks and SD cards, it may be simpler to just copy the files from the mounted image file to the mounted device, rather than doing an image copy.
If gparted can't do an image (probably can't) then you could dd the image to a block device (like a USB stick), run gparted and resize, then dd it back in to an image file.
I'm assuming this won't mess up the boot pointers into the fs. Should be fine for grows. Shrinks should work if the bootable bits are at the beginning.
Or am I out to lunch here?
Most boot loaders these days aren't sensitive to actual block positions, the way Lilo was. So, that shouldn't be an issue anymore.
Of course, it all depends on the actual boot image format in this particular case...