Flash a Raspberry Pi OS image onto a 128GB card and you might be surprised to find the system only using a few gigabytes. The image was sized for a small card, and the root partition never grew to fill the rest. Expanding the filesystem with raspi-config fixes that in one menu choice: it stretches the root partition to claim the full SD card or SSD, and the work finishes on the next reboot. No fdisk, no manual maths.
Quick Answer
Run sudo raspi-config, open Advanced Options, choose Expand Filesystem, then reboot. The root partition resizes to use all available space on your card or drive automatically during startup. The whole job takes under a minute of your input plus one reboot.
When You Actually Need to Do This
Modern Raspberry Pi OS images often expand the filesystem automatically on first boot, so many users never touch this setting. You need it manually in two common cases: when you have cloned an existing image onto a larger card or SSD, and when automatic expansion did not run for some reason and df shows your root filesystem far smaller than the physical drive. If you are setting up a Pi or a small home server from scratch, the mini PC range at Evetech has compact machines purpose-built for this kind of project.
Step by Step With raspi-config
- Check your current usage first. Open a terminal and run df -h. Look at the size of the root filesystem, shown as the mount point /. If it is much smaller than your card or SSD, there is space to reclaim.
- Launch the configuration tool. Type sudo raspi-config and press Enter. You need sudo because the tool changes partition settings. The blue text menu appears.
- Open Advanced Options. Use the arrow keys to highlight Advanced Options and press Enter. This section holds the disk and system-level settings.
- Select Expand Filesystem. Highlight Expand Filesystem and press Enter. There is no confirmation dialog: the tool schedules the resize immediately and tells you the root partition will be enlarged on the next reboot.
- Exit the tool. Use the arrow keys to choose Finish. When prompted to reboot, accept it. If you skip the prompt, run sudo reboot manually.
- Verify after reboot. When the Pi comes back up, run df -h again. The root filesystem should now report the full capacity of your card or drive.
What happens behind the scenes
The reason there is no progress bar is that the real work happens during startup. Raspberry Pi OS hands control to a resize script early in the boot sequence, which uses parted to grow the partition and then expands the filesystem to match before handing back to the normal boot. That is why the change only takes effect after the reboot rather than immediately.
Cloning to a Larger Card or SSD and Then Expanding
Expanding the filesystem is most often needed after cloning an existing card to larger storage, and this workflow comes up regularly as Pi setups grow. The desktop version of Raspberry Pi OS includes a built-in SD Card Copier tool that handles the physical copy. One important setting to tick is "New Partition UUIDs", which assigns fresh unique identifiers to the cloned partitions. Without it, if both the original and the new drive are connected at the same time, the OS can get confused about which is the actual boot device.
After the clone, the root partition will still be the original size, sitting inside a larger drive with empty unallocated space beyond it. That is when Expand Filesystem in raspi-config does its job: it stretches the partition boundary to fill the available space, then expands the ext4 filesystem to match.
If you are cloning to an NVMe drive for a server role, the sequence is: clone with SD Card Copier using new UUIDs, set the boot order to NVMe-first via rpi-eeprom-config, boot from the NVMe drive, then run Expand Filesystem. Doing the expansion on the target drive rather than the source means the resizing happens on the drive that will actually be in use.
What the underlying tools actually do
raspi-config's Expand Filesystem option calls parted to move the end boundary of the root partition to the end of the drive, then calls resize2fs to grow the ext4 filesystem to fill that partition. Both operations happen early in the next boot sequence, before the main filesystem is fully mounted, which is why the change requires a reboot to take effect and why there is no progress bar during the terminal session itself. You can achieve the same result manually with parted and resize2fs if you prefer, but raspi-config wraps both steps correctly and in the right order.
A Note on Backups and Larger Storage
Any partition operation carries a small risk, so back up anything you cannot lose before you start. The operation itself is reliable and built into the OS, but a copy of your important files is cheap insurance. If you are moving a Pi from an SD card to faster storage for a server role, planning the larger drive up front saves you doing this twice. If your project has outgrown a Pi and you are weighing a small desktop, the best-selling PCs at Evetech show the compact desktops that SA buyers upgrade to when a Pi is no longer enough.
Frequently Asked Questions
Will expanding the filesystem erase my data?
No. The operation grows the existing partition and filesystem into free space; it does not reformat or wipe your files. That said, always back up important data before any partition change, because the small residual risk is not worth losing work.
Why is there no confirmation prompt in raspi-config?
The Expand Filesystem option schedules the change rather than running it on the spot. The actual resize happens during the next boot, which is why the tool simply tells you to reboot instead of showing a progress bar or asking you to confirm.
My Pi already used the full card on first boot. Do I still need this?
Probably not. Recent Raspberry Pi OS images expand the filesystem automatically the first time they boot. Run df -h to confirm; if the root filesystem already matches your card size, there is nothing to do.
Can I expand onto an SSD instead of an SD card?
Yes. The same Expand Filesystem option works whether your root partition lives on an SD card or an attached SSD, as long as that drive is your boot device. The tool fills whatever capacity is available on it.
Outgrowing your SD card or planning a tidy little home server? Have a look at the mini PC options at Evetech and pick the right base for the build.