For some strange reason a system didn’t expand when it was installed, so I had to find a manual way of doing it
These are the steps I followed
fdisk -l /dev/mmcblk1
Which showed me
Disk /dev/mmcblk1: 14.56 GiB, 15634268160 bytes, 30535680 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: 0x2c2a3e4f
Device Boot Start End Sectors Size Id Type
/dev/mmcblk1p1 8192 8268096 8259904 3.6G 83 Linux
df -h
Which showed me
Filesystem Size Used Avail Use% Mounted on
udev 1.5G 0 1.5G 0% /dev
tmpfs 379M 5.7M 373M 2% /run
/dev/mmcblk1p1 3.9G 3.9G 0 100% /
tmpfs 1.9G 0 1.9G 0% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
/dev/loop0 2.2M 2.2M 0 100% /snap/avahi/277
tmpfs 1.9G 0 1.9G 0% /tmp
tmpfs 50M 8.0K 50M 1% /var/log
/dev/loop2 49M 49M 0 100% /snap/core18/2289
/dev/loop1 99M 99M 0 100% /snap/core/13253
/dev/loop3 58M 58M 0 100% /snap/core20/1380
/dev/loop4 58M 58M 0 100% /snap/core20/1437
/dev/loop6 49M 49M 0 100% /snap/core18/2406
/dev/loop5 98M 98M 0 100% /snap/core/12837
/dev/loop7 39M 39M 0 100% /snap/snapd/15541
/dev/loop8 39M 39M 0 100% /snap/snapd/15909
/dev/loop9 10M 10M 0 100% /snap/velbus-tcp/140
Enlarge the partition: fdisk -u /dev/mmcblk1
.
p
to print the partition table, take note of the number, start, end, type of sda1.
Delete it: d
:
Recreate it using command n
with same number (1), start and type but with a bigger end (taking care not to overlap with other partitions).
- However, fdisk suggested the maximum value as Default, so I didn’t type any value in and just pressed Enter
if choosing a different end point try to align things on a megabyte boundary that is for end, make it a multiple of 2048 minus 1. Change the type if needed with t
(for partitions holding an extX
or btrfs
filesystem, the default of 83
is fine).
Then w
to write and q
to quit.
I ran partprobe
but nothing seems to change, df -h
still showed as only using 3.6GB.
I rebooted, but nothing changed.
this last step did the trick.
(run each command on it’s own)
/boot/dietpi/dietpi-services stop
resize2fs /dev/mmcblk1p1
df -h
/boot/dietpi/dietpi-services start`
I now have the full 14GB available to me
Disk /dev/mmcblk1: 14.56 GiB, 15634268160 bytes, 30535680 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: 0x2c2a3e4f
Device Boot Start End Sectors Size Id Type
/dev/mmcblk1p1 8192 30535679 30527488 14.6G 83 Linux