So I have had it the piwh for a while running pihole never had any problems until recently got a memory issue. I have used the clean and autoremove and gained 28% but of a 32gb SD card it's showing 6.5gb available for overall use. I have been into the config menu as read somewhere else about expanding to use the full memory card but I get the message below about not being able to? Any ideas much appreciated. Thanks

/dev/mmcblk0p2 is not the last partition. Don't know how to expand


2 Answers 2


The expand option in Raspberry Pi OS only works on standard 2 partition images.

You have obviously done something else, but not elaborated.

It appears you may have used NOOBS (which wastes 1.3GB).

Depending on what is on the card it may be possible to expand manually but the best option is to do a fresh install.


The cards are auto expanded on the first boot of them, they will then reboot and give you the chance to setup the system. Use the sudo fdisk -l command to find the partition sizes.

root@buster-raspi:~# /sbin/fdisk -l
 Device         Boot  Start      End  Sectors  Size Id Type
/dev/mmcblk1p1        2048   614399   612352  299M  c W95 FAT32 (LBA)
/dev/mmcblk1p2      614400 62333951 61719552 29.4G 83 Linux

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.