Rootfs on emmc issue

Hello,

We have a iMX6 colibri module, with a custom rootfs, and I have a question.
We install the rootfs via a NFS server, by typing : dd if=rootfs.ext3 of=/dev/mmcblk0p2 bs=512 conv=fsync
It works fine, the image is flashed, and it boots.

But when I do

root@colibri-imx6:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       1.2G  1.1G  118M  90% /
devtmpfs        121M     0  121M   0% /dev
tmpfs            40K     0   40K   0% /mnt/.psplash
tmpfs           250M  204K  249M   1% /run
tmpfs           250M  128K  250M   1% /var/volatile
/dev/mmcblk1p1   15G  178M   15G   2% /mnt/sdcard

And this :

root@colibri-imx6:~# fdisk -l

Disk /dev/mmcblk1: 14.9 GiB, 15931539456 bytes, 31116288 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000


Device         Boot Start      End  Sectors  Size Id Type
/dev/mmcblk1p1       8192 31116287 31108096 14.9G  c W95 FAT32 (LBA)

Disk /dev/mmcblk0: 3.7 GiB, 3959422976 bytes, 7733248 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x000a3671

Device         Boot Start     End Sectors  Size Id Type
/dev/mmcblk0p1       8192   40959   32768   16M  c W95 FAT32 (LBA)
/dev/mmcblk0p2      40960 7127039 7086080  3.4G 83 Linux

Disk /dev/mmcblk0boot1: 2 MiB, 2097152 bytes, 4096 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mmcblk0boot0: 2 MiB, 2097152 bytes, 4096 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

We can clearly see that we have 3.4G of eMMC, but the rootfs is only 1.2G.
How can we extend this part? Are we doing something wrong?

Regards,

Hi

To avoid having to download lots of empty space during flashing our update script calculates a minimal size and generates an ext3 partition accordingly. During first boot, a custom resizing script (/usr/sbin/resizefs.sh) is run which increases the partition size to its full extend.

I guess you don’t have the package from this recipe installed. (Or you don’t use systemd and thus the resizing is not started automatically.

Max

We created a custom layer, and forgot this recipe! Thanks!
Pierre-Olivier