khumarahn / teres1-gentoo

Gentoo on Olimex Teres 1 DIY laptop
GNU General Public License v3.0
6 stars 1 forks source link

resize partition sd card #3

Closed frddbbbl closed 5 years ago

frddbbbl commented 5 years ago

Hi, I have been trying to resize the root partition from the image however no software seems able to do so, I have tried GParted, parted, and disk utility and all of them run into errors when trying to read the root partion, is this to do with the image or could it possibly be to do with the sd card?

khumarahn commented 5 years ago

Hi. This is more involved that I'd like it to be. The reason is f2fs. It works nice on Teres, visibly faster than ext4 or anything else. But f2fs is recent and has been changing in the past 10 years. So much so that newer linux kernels cannot understand f2fs of the Teres' ancient 3.10 kernel. This means, you can't resize it on any up-to-date computer. In fact, I would not recommend even mounting the root partition on an up-to-date computer.

What should work: boot from Teres stock Ubuntu, with the 3.10 kernel. Insert the sd card with gentoo. Then:

It is always possible to replace f2fs with ext4 or similar.

P.S.: Following sunxi and armbian, I am running very recent kernels now with Gentoo, and old-f2fs problems are gone. But here suspend, sound, LEDs etc do not work well yet. So it is hard to say what is better.

frddbbbl commented 5 years ago

Hi. I successfully resized the partition how ever olimex's ubuntu does not seem to recognise resize.f2fs as a command inspire of f2fs-tools being installed

khumarahn commented 5 years ago

ok. resize.f2fs appeared later, f2fs-tools from Ubuntu 18.04 would have it.

Try this, as root under ubuntu, if /dev/mmcblk1 is the sd card with gentoo:

frddbbbl commented 5 years ago

Hi Ive got to creating the new file system but I don't think -f is an option for mkfs.f2fs?

khumarahn commented 5 years ago

It is for overwrite of the previous filesystem. It is OK if you don't need it. http://manpages.ubuntu.com/manpages/bionic/man8/mkfs.f2fs.8.html

frddbbbl commented 5 years ago

thanks, the newer version of f2fs-tools installed just overwrote it automatically I have now re-sized the partition!