crosland
Posts: 25
Joined: Mon Feb 09, 2015 6:13 pm

Gparted recommended minimum sizes causes error

Sun Dec 11, 2016 3:11 pm

I am trying to resize and SD card image following the method here http://www.aoakley.com/articles/2015-10 ... images.php

I am using an Ubuntu VM in Virtual Box on Win10.

On the Pi, booted from an 8G SD card, I purged a few things as suggested and 'du --summarize -BM' run from / reports 3398M.

The VM cannot see the card reader so I created the image using Win32DiskImager.

The issue occurs in gparted.
It reports a 7.34GiB partition with 3.54GiB used, 3.61GiB unused and 194MiB unallocated, which all seem credible.

From the gparted menu, Partition->Resize says maximum size is 7513MiB and Minimum size 3771MiB which is a bit larger than the used figure but seems reasonable.

So I set the new size to gparted's own recommended minimum size (I have also tried setting it slightly bigger) and apply the chane. It fails during resize2fs, with the error shown in the log:
resize2fs -p /dev/loop0 3861504K 00:00:00 ( ERROR )
resize2fs: New size smaller than minimum (1237247)

This minimum is the same as reported by resize2fs when run from the command line:
$ sudo resize2fs -P /dev/loop0
resize2fs 1.42.13 (17-May-2015)
Estimated minimum size of the filesystem: 1237346

But 1237346 4K blocks is 4949384K, much larger than the actual used size reported by du and gparted

If I use resize2fs from the command line, using the minimum size it reports, and then proceed with the remaining steps in the original article to edit the partition table, etc., I end up with an image that is 5G according to windows but it does not boot when written to an SD card and used in the Pi

Can anyone see what the problem is?

drgeoff
Posts: 8442
Joined: Wed Jan 25, 2012 6:39 pm

Re: Gparted recommended minimum sizes causes error

Sun Dec 11, 2016 8:16 pm

Why is gparted reporting only one partition? I would expect that a card you have booted in a RPi would contain at least two partitions.

crosland
Posts: 25
Joined: Mon Feb 09, 2015 6:13 pm

Re: Gparted recommended minimum sizes causes error

Sun Dec 11, 2016 9:03 pm

The loopback device has been setup to access only the second partition, as per the instructions I am trying to follow.

blubbersprudel
Posts: 6
Joined: Fri Nov 11, 2016 2:24 pm

Re: Gparted recommended minimum sizes causes error

Fri Apr 28, 2017 5:25 pm

No answers? I have the same problem

gorgi.rankovski
Posts: 2
Joined: Thu Feb 02, 2017 2:05 pm

Re: Gparted recommended minimum sizes causes error

Wed Jun 21, 2017 12:13 pm

For me the minimum size was 1570 MiB. I was getting the same error as you for 1600 MiB.

Than, I started to increment the size and it worked on 1900 MiB. I used the same tutorial as you.

I hope this helps!

npaisnel
Posts: 21
Joined: Sun Aug 05, 2018 4:23 pm

Re: Gparted recommended minimum sizes causes error

Tue Aug 14, 2018 4:44 pm

I was using this tutorial too and also found this issue.


I have since found a much easier way to shrink the SD image

called pishrink

Works for me with a single command

https://github.com/Drewsif/PiShrink

npaisnel
Posts: 21
Joined: Sun Aug 05, 2018 4:23 pm

Re: Gparted recommended minimum sizes causes error

Tue Aug 14, 2018 4:47 pm

but as gorgi found out, setting the size at about 400mb above that of what gparted indicates as a minimum seems to work

Return to “Advanced users”

Who is online

Users browsing this forum: No registered users and 8 guests