TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: ALL
from: CHRIS ELVIDGE
date: 2020-10-04 14:28:00
subject: Re: Expanding root partit

On 04/10/2020 01:56 pm, NY wrote:
> On my Pi 4, I installed RaspiOS from NOOBS and configured everything. I
> installed to the 16 GB SD card which was supplied, but there isn't much
> free disk space so I'd like to copy the image to a 32 GB card and use
> the extra 16 GB on that card as root filesystem.
>
> Using Windows, I've copied the image from the 16 GB card to a .IMG file,
> and then from that .IMG file to the 32 GB card, using Win32 Disk Imager
> (should I be using a different tool to do this?).
>
> The Pi boots fine. df -k shows that the root partition is still 16 GB,
> as I'd expect.
>
> I run sudo raspi-config and select Advanced | Expand Filesystem - but I
> get an error "Your partition layout is not currently supported by this
> tool. You are probably using NOOBS in which case your root filesystem is
> already expanded anyway".
>
> How do I proceed from here? Will I have to start from scratch, putting
> NOOBS on the 32 GB card and then installing everything again. Or would a
> different disk imaging tool create the 32 GB card in such a way that
> raspi-config can expand the filesystem?

One way that gets over the need to expand it would be to make a
filesystem on /dev/mmcblk0p3 and then use that as /home.
Mount the new filesystem to /mnt and then rsync -av /home/ /mnt/
Unmount and mount the new filesystem on /home to check.
Then you can unmount and remove the old /home/* and remount the new one
on /home/

Alternatively (assuming you have the full desktop) install gparted and
use that to remove mmcblk0p3 and expand mmcblk0p2 to the fullest extent.

You can probably do it with parted from the command line - but I've
never tried.


--

Chris Elvidge, England

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.