Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Possible to reduce the .img size?
14-02-2015, 02:47 AM,
#1
Question  Possible to reduce the .img size?
Just got my RPi2 in the mail today but my 16GB MicroSD won't arrived until next week so I was hoping to install this on an old 2GB card to play around with but it looks like the .img file is 2GB exactly so it won't install on a 2GB MicroSD. Is there any way to shrink the .img to install on a 2GB card?

How much storage does the actual OS use?

Thanks! Smile
Reply
14-02-2015, 05:32 PM, (This post was last modified: 14-02-2015, 05:33 PM by admin.)
#2
RE: Possible to reduce the .img size?
(14-02-2015, 02:47 AM)KuJoe Wrote: Just got my RPi2 in the mail today but my 16GB MicroSD won't arrived until next week so I was hoping to install this on an old 2GB card to play around with but it looks like the .img file is 2GB exactly so it won't install on a 2GB MicroSD. Is there any way to shrink the .img to install on a 2GB card?

How much storage does the actual OS use?

Thanks! Smile

Ummm i think i made a 2000Mb and i forgot to cut down some space... OS size is 1868Mb so it´s fit in a 2Gb SDCards.
Anyway... if you have a Linux machine you can:
#fdisk RPiTC-2_beta1.img

Welcome to fdisk (util-linux 2.25.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk RPiTC-2_beta1.img: 2 GiB, 2097152000 bytes, 4096000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x000cd8bd

Device Boot Start End Sectors Size Id Type
RPiTC-2_beta1.img1 8192 139263 131072 64M 6 FAT16
RPiTC-2_beta1.img2 139264 3825663 3686400 1.8G 83 Linux


Command (m for help): q

#truncate --size=$[(3825663+1)*512] RPiTC-2_beta1.img


this will truncate the img file to the exact size of the last os partition and the image will be 1868Mb ~1.87Gb that fit in most 2Gb SDCards.
Reply
16-02-2015, 08:45 PM,
#3
RE: Possible to reduce the .img size?
I'm curious...why do you need 16 GB for your SD Card in a Thin Client? I create my Golden Image on a 4GB Card (expanded). On this image I set my desktop and applications and scripts and then back it up to .img file. I then use 8 GB Cards for my Thin Clients where the 4 GB image I created fits perfectly. Saves money on having to buy large SD Cards (this is a 'Thin Client Image' after all Smile ) and I never have to worry about my image not fitting on the SD Cards.
Reply
18-02-2015, 02:03 AM,
#4
RE: Possible to reduce the .img size?
The 16GB was on sale and cheaper than the 8GB card after shipping. So price was the only reason. I use 8GB SDs in my Model B+ and it's enough for most uses (4GB was too small for some uses like when I save camera video locally when I take a vacation for more than a weekend). Smile
Reply
18-02-2015, 04:00 AM,
#5
RE: Possible to reduce the .img size?
Fair enough. Good reason. Smile
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)