resize /dev/root

Started by KeesB, October 19, 2019, 12:39:05 PM

Previous topic - Next topic

KeesB

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

LubOlimex

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.
Technical support and documentation manager at Olimex

KeesB

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

KeesB

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.

JohnS

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