Memory usage issue in Rock Pi S

Hi all,
I am using Rock Pi s (1Gb Nand Flash) , for this we created boot-able image(OS) and flashed into RockPi S board and we are able to use use 771Mb out of 964Mb, This thing is fine for 1gb nand flash.
But same boot-able image(same OS) we flashed for Rock PI S(4gb Nand flash) , But is showing 781 Mb out of 3.6GB, How to use all 3.6 GB.

These Things by using lsblk command i am checking

You can use tool parted to extend the rootfs size manually.

Or you can install this package, and reboot the device.

Hi stephen,

I have tried parted command but it is showing “parted : command not found”.

I tried to install [] This package using terminal su followed by this link, but is showing unknown user in this image you can see it.

Oh, man. You’re doing it wrong.
The link is to download the package (application). Download it and place to some folder, then install.

Not sure which package manager buildroot uses, but for a standard Debian-based system,

sudo dpkg -i /path/to/file.deb
sudo apt-get install -f


sudo apt install /path/to/file.deb

fdisk should be included out of the box on most linux distros. You can do something like:
sudo fdisk /dev/mmcblk1
(please make sure that mmcblk1 is the device with partition you want to resize - which is mmcblk1p5 according to attached screenshots). Fdisk prompt should appear. Please note that the changes to the partition table won’t be saved until submitted by the user using „w” option. And if you set something wrong, you can cancel all the changes using „q” option.
Anyway, input „p” and confirm with Enter to display the current partition table for the device. You should be interested in the entry for mmcblk1p5 as this is the rootfs partition which we want to resize. Entry should look similiar to:
/dev/mmcblk1p5 32768 123596799 123564032 58,9G 83 Linux
Please note down the sector number of the beginning of the partition (in my example it is 32768 - but in your case the number should be much larger; also in your case the size should be like 700M, not 58G…). As this is the last partition on the device (directly followed by an unallocated disk space), you most likely don’t have to care about where it ends currently.
Now delete this undersized partition using „d” and „5” (assuming mmcblk1p5 was the 5th partition!) and create new one using „n”. You will be asked some questions about it. When asked about the partition number, enter 5. When asked about the beginning of the partition, enter the starting sector number noted down in previous step
When asked about the end of the partition, just press enter so fdisk will use the last available sector, which in your case should be the very last sector on the device. Most likely you can answer with defaults (just pressing enter) for any other questions. After creating the partition, fdisk should automatically detect that it starts with the filesystem definition (as it starts in the exactly same place as the previous partition) and it will ask if to remove the „filesystem (most probably ext4) signature” - do NOT remove it - then all the data on the partition will be preserved.
After that, write the changes to device using „w”.
Now your mmcblk1p5 partition should be as large as the whole remaining space on the device.
Submit the changes to the kernel by issuing
sudo partprobe
and if you’ll receive errors saying that it cannot be done as the device is busy, reboot the system. Then, the changes should be visible after reboot (you can confirm by displaying the partition table with fdisk again and chcecking if mmcblk1p5 has the desired size).
However, the partition still contains the same undersized filesystem as before. So now we have to tell the filesystem to use whole available space of the partition. For ext[234] filesystems it can be done via resize2fs command.
sudo resize2fs /dev/mmcblk1p5
Without additional args, it should resize the filesystem so it will use the whole avilable space on the partition - without affecting the current files.
You should be done now. make sure that the desired device (mmc memory) is mmcblk1 and desired partition is mmcblk1p5 - otherwise you should correct the commands accordingly. Please note that dealing with partition table in an improper way can and surely will lead to data loss, so take a backup first. I am not responsible for any damage caused by the above :wink: