Start by logging into your box and firing up fdisk. We are going to delete all partitions other than the first three, then create a new one to hold our root filesystem.

Type:

 

fdisk /dev/mmcblk2

 

We then get a prompt:

Welcome to fdisk (util-linux 2.36.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help):

 

Enter d to delete a partition, it will default to the highest partition number, just press enter to accept the default.

After that, just keep pressing d then enter until we have deleted partition 4.

 

Command (m for help): d
Partition number (1-15, default 15):

Partition 15 has been deleted.

Command (m for help): d
Partition number (1-14, default 14):

Partition 14 has been deleted.

Command (m for help): d
Partition number (1-13, default 13):

Partition 13 has been deleted.

Command (m for help): d
Partition number (1-12, default 12):

Partition 12 has been deleted.

Command (m for help): d
Partition number (1-11, default 11):

Partition 11 has been deleted.

Command (m for help): d
Partition number (1-10, default 10):

Partition 10 has been deleted.

Command (m for help): d
Partition number (1-9, default 9):

Partition 9 has been deleted.

Command (m for help): d
Partition number (1-8, default 8):

Partition 8 has been deleted.

Command (m for help): d
Partition number (1-7, default 7):

Partition 7 has been deleted.

Command (m for help): d
Partition number (1-6, default 6):

Partition 6 has been deleted.

Command (m for help): d
Partition number (1-5, default 5):

Partition 5 has been deleted.

Command (m for help): d
Partition number (1-4, default 4):

Partition 4 has been deleted.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

 

Once we have deleted the partitions we need to create a new one to hold our root filesystem.

root@station-m2:~# fdisk /dev/mmcblk2

Welcome to fdisk (util-linux 2.36.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): n
Partition number (4-128, default 4):
First sector (34-122142686, default 32768):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (32768-122142686, default 122142686):

Created a new partition 4 of type 'Linux filesystem' and of size 58.2 GiB.

Command (m for help): t
Partition number (1-4, default 4): 4
Partition type or alias (type L to list all): 1

Changed type of partition 'EFI System' to 'EFI System'.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

Now we need to format our new partition.

root@station-m2:~# mkfs.ext4 /dev/mmcblk2p4
mke2fs 1.46.2 (28-Feb-2021)
Discarding device blocks: done
Creating filesystem with 15263739 4k blocks and 3817472 inodes
Filesystem UUID: c3d3f820-3dc0-46b6-a574-df010d59d970
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424

Allocating group tables: done
Writing inode tables: done
Creating journal (65536 blocks): done
Writing superblocks and filesystem accounting information: done

Now let's mount our new partition

root@station-m2:~# mount /dev/mmcblk2p4 /mnt

Copy our root filesystem to the newly formatted eMMC partition.

rsync -avx / /mnt

sent 1,409,023,749 bytes  received 669,386 bytes  15,406,482.35 bytes/sec
total size is 1,406,345,122  speedup is 1.00

We now need to get the UUID for /dev/mmcblk2p4. In this case it is c3d3f820-3dc0-46b6-a574-df010d59d970

root@station-m2:~# blkid
/dev/mmcblk0p1: UUID="ddf21cad-23f6-4b5e-90d0-7c069b46c9b8" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="cd3c6db3-59f1-ca40-847f-39b77f0e9f94"
/dev/mmcblk2p1: PARTLABEL="security" PARTUUID="f4250000-0000-4a7b-8000-28fe0000649e"
/dev/mmcblk2p2: PARTLABEL="uboot" PARTUUID="62740000-0000-412c-8000-4f1100004010"
/dev/mmcblk2p3: PARTLABEL="trust" PARTUUID="3c7c0000-0000-4a4b-8000-4aaa000046ed"
/dev/mmcblk2p4: UUID="c3d3f820-3dc0-46b6-a574-df010d59d970" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="b2eef26b-3542-a144-bbaf-9d85fb21ccb8"

Edit /mnt/boot/extlinux/extlinux.conf using your favourite editor eg: nano -w /mnt/boot/extlinux/extlinux.conf

 

Note: We are editing the extlinux file on the newly created mmcblk2p4 partition and not the one on our currently running system.

 

Replace the UUID in the line beginning with APPEND with the UUID obtained from the step above, it should end up like this:

LABEL Armbian
  LINUX /boot/Image
  INITRD /boot/uInitrd
  FDT /boot/dtb/rockchip/rk3566-firefly-roc-pc.dtb
  APPEND root=UUID=c3d3f820-3dc0-46b6-a574-df010d59d970 console=ttyS02,1500000 console=tty0 rootflags=data=writeback rw no_console_suspend....

Sync and unmount the partition

sync
umount /mnt

Now reboot

After rebooting type the command: mount

You should now see you newly created partiotion is mounted with the root filesystem on it, see below:

root@station-m2:~# mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=3927060k,nr_inodes=981765,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=786260k,mode=755)
/dev/mmcblk2p4 on / type ext4 (rw,noatime,errors=remount-ro,commit=600,data=writeback) <--------------------
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
sunrpc on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /tmp type tmpfs (rw,nosuid,relatime)
/dev/mmcblk2p4 on /var/log.hdd type ext4 (rw,noatime,errors=remount-ro,commit=600,data=writeback)
armbian-ramlog on /var/log type tmpfs (rw,nosuid,nodev,noexec,relatime,size=51200k,mode=755)
tracefs on /sys/kernel/debug/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=786260k,nr_inodes=196565,mode=700)

 

Much more to follow :)