Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A20 => Topic started by: KeesB on October 19, 2019, 12:39:05 PM

Title: resize /dev/root
Post by: KeesB on October 19, 2019, 12:39:05 PM
My 4Gb micro sd card is dead. So I bought a new 8Bb car.
I burned the debian jessie image to sd card. Everything works fine. But after reinstalling all software I suddenly didn't have enough space on the 8 Gb sd card.
Then I realized maybe the image uses only 4 Gb of the available 8 gb.
When I do du -sf and I sum up all file size I never get tot 8 GB.
But I see  /dev/root  size=1.9 G  used=1.7G mounted on /
So I think I have to resize the /dev/root. Therefor I created a bootable usb stick with gparted live on it. After booting and inserting the micro sd card in my computer gparted sees the sd card, but it shows only one partition with size 7.2 Gib with a unknown file system. What can I do? Or is there another way to resize the filesystem?

Kees
Title: Re: resize /dev/root
Post by: LubOlimex on October 29, 2019, 10:57:43 AM
There should be a resize script called "resize_sd.sh" that you can use for resizing the Jessie images. Try something like:

sudo su
resize_sd.sh /dev/mmcblk0 2
reboot

Notice that the drive might be different.
Title: Re: resize /dev/root
Post by: KeesB on October 30, 2019, 04:38:40 PM
To answer my own question:

a bootable gparted failed. Strange number, strange names...
unetbootInWindows failed. Good partition names. Very string total storage. I could not change the size of a partition.
Minitool partition Wizard worked. I could simple resize the partition in the reader of my computer and after rebooting the board debian showed the changed partition size.

I also looked at the command line tool resize2fs. It looked complecated.

So my problem is fixed
Title: Re: resize /dev/root
Post by: KeesB on November 02, 2019, 01:49:27 PM
I tried the script resize_sd.sh on my first class 5 sd card. A messages flashes (could not read it) and the board reboots. After reboot nothing happened. The partition is still too small.
Later I tried to run the script on a 8 Gb class 10 sd card and again a message flashes and the board reboots, but now the partition is perfect.

My conclusion of all this is that there are a lot of bad sd cards and standard partition tools (especially windows) often don't recognize the sd card.
Title: Re: resize /dev/root
Post by: JohnS on November 02, 2019, 02:41:40 PM
I like to test sd cards to find the fakes, using f3write & f3read from http://oss.digirati.com.br/f3/

Helps with getting ebay refunds...

John