POPEYE
Posts: 35
Joined: Fri Jul 27, 2012 2:31 pm

How can I shrink Raspbian main partition by maximum before backup?

Mon Dec 16, 2019 3:29 pm

With Gparted I have to guess the new size of the partition. If I put the size according to free space, Gparted allows me to put new values, but outputs an error after starting the operation: resize2fs: New size smaller than minimum (2277127). If it can't use that values, why it can't analyze the partition, and don't allow me to put them? Should I use some other programs? How Raspbian release images are made?

So, there is around 1,6Gb of free space on partition, which I can't shrink. I changed partition size long time ago but didn't faced such problem (may be because it was fa32 and ext2, or I didn't shrink it enough).

Image

epoch1970
Posts: 4237
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: How can I shrink Raspbian main partition by maximum before backup?

Mon Dec 16, 2019 3:42 pm

So you're clicking on sdc2 and cannot reduce the amount of free space to 0 or near?
The Raspbian SD partition format is totally standard, MS-DOS type.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

User avatar
rpdom
Posts: 16100
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: How can I shrink Raspbian main partition by maximum before backup?

Mon Dec 16, 2019 4:24 pm

I have found that gparted will offer you a minimum size, but will fail when it tries to shrink the partition. Try a few MB larger - maybe 16 or 32MB.

POPEYE
Posts: 35
Joined: Fri Jul 27, 2012 2:31 pm

Re: How can I shrink Raspbian main partition by maximum before backup?

Mon Dec 16, 2019 4:28 pm

So you're clicking on sdc2 and cannot reduce the amount of free space to 0 or near?
When I click "Apply", Gparted will check something and output that error, listed above.
I have found that gparted will offer you a minimum size, but will fail when it tries to shrink the partition. Try a few MB larger - maybe 16 or 32MB.
The parameters on the picture is the maximum I can get.

wolf.z
Posts: 131
Joined: Thu Dec 24, 2015 8:34 pm

Re: How can I shrink Raspbian main partition by maximum before backup?

Mon Dec 16, 2019 8:08 pm

You are asking for shrinking partitions, then backup. Why not going the other way round, since any repartitioning draws some risk?
Have a look at rpi-clone for cloning and fitting partitions without.
For shrinking even more, give pishrink a try.

And leave your source partition unaltered..

RonR
Posts: 788
Joined: Tue Apr 12, 2016 10:29 pm
Location: US

Re: How can I shrink Raspbian main partition by maximum before backup?

Mon Dec 16, 2019 8:20 pm

image-backup will create an image file the size of your choosing. It also supports incremental backups to an existing image file.

image-shrink will shrink an existing image file to its minimal size.

POPEYE
Posts: 35
Joined: Fri Jul 27, 2012 2:31 pm

Re: How can I shrink Raspbian main partition by maximum before backup?

Tue Dec 17, 2019 8:16 am

wolf.z
As far, as I understand, the first utility needs additional clean SD card. That is not what I want. Anyway, what are the original sources of these utilities? Thanks.

RonR
If these utilities really work - it is great stuff! 8-)
Thanks.

Return to “Beginners”