Resize of offline SSD for Raspi with gparted does not work

Greetings Programs!

This is not my first rodeo with OpenWRT, however my first on a Raspberry Pi - in this case a 4 model B with 4 gigs of RAM.

I have configered the SBC to boot off an SATA SSD that is connected via USB. Because of this setup, I thought an ext4 image would be the best choice.

Because the SSD is slightly :wink: larger than the image, I want to expand it.

~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                98.3M     60.5M     35.8M  63% /
tmpfs                     1.9G      1.3M      1.9G   0% /tmp
/dev/sda1                63.9M     19.0M     44.8M  30% /boot
tmpfs                   512.0K         0    512.0K   0% /dev

~# lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda      8:0    0 111.8G  0 disk 
├─sda1   8:1    0    64M  0 part /boot
└─sda2   8:2    0   104M  0 part /

Hope I haven't bored you to death so far! :innocent:

I thought, the easiest way to expand the fs would be to use gparted on my workstation. This is because of the installation guide [1]. There is only one sentence devoted to this:

You can use gparted to resize and extend the partitions.

I mainly use Garuda Linux there anyway, so gparted is installed by default. But I haven't gotten that to work for me. Due to the rather short mention of this option, I am not sure, it there is a step (or several) that I have missed. :man_shrugging:

When I resize the partition with gparted, the Pi will no longer boot from the SSD. It makes no difference, whether I resize the partition prio to booting for the first time (which never happens) or after the first boot. If I don't touch the partition, OpenWRT works just fine. This text is actually being routed through the Pi. Resizing the partition after the first boot has the same effect. It doesn't boot again. I have made sure that the UUID did not change (gparted leaves that alone during resizing).

I have to admit that I have never used the Pi with a monitor and I have found out that I even don't have a single HDMI cable. My workstation uses DP. :face_with_peeking_eye: Before I buy a cable to check on what the machine says during boot, I just wanted to check if you guys had an idea what I might try in the mean time.

Thanks for reading!

Regards,
Chris

[1] [Link to guide in OpenWRT Wiki] (https://openwrt.org/docs/guide-user/installation/installation_methods/sd_card#expanding_the_filesystem)

You could try to replace the UUID with something different - Expand root fs, stuck at booting - #4 by d687r02j8g.

2 Likes

And instead of buying a cable, consider of https://www.jeffgeerling.com/blog/2021/attaching-raspberry-pis-serial-console-uart-debugging

HTH

That is a cool idea - and I actually have an old P2 computer somewhere in storage that could be used as a serial console. But I'll hold of on this idea for now, because this type of "debugging" is a little too hardcore for what is going on here. :nerd_face:

Kind regards,
Chris

I hadn't actually considered this because the UUID was left untouched by gparted (was as far as I could tell). But I backed up my config, tried changing the cmdline.txt, rebooted (which worked) and after that I could resize the fs with gparted and reboot. Result:

BusyBox v1.36.1 (2025-02-03 23:09:37 UTC) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt 24.10.0, r28427-6df0e3d02a
 -----------------------------------------------------
~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                63.2G     61.8M     63.1G   0% /
tmpfs                     1.9G    192.0K      1.9G   0% /tmp
/dev/sda1                63.9M     19.0M     44.8M  30% /boot
tmpfs                   512.0K         0    512.0K   0% /dev

~# lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda      8:0    0 111.8G  0 disk 
├─sda1   8:1    0    64M  0 part /boot
└─sda2   8:2    0    64G  0 part /

Meaning: Thank you! :smiley:

Just as an "addon" for novices facing this problem in the future: :nerd_face:

You can find the cmdline.txt in /boot/. This short thread was about resizing the root partition (/). The boot partition usually does not have to be grown.

Before you change the device, make sure the one you have noted is correct! /dev/root is a device created after booting, so it will not work when trying to find a partition at boot. I suggest installing lsblk(8), that will show the correct device name. If your Pi boots from an SD-card, the device will not be /dev/sda or something similar. sda, sdb or the like are for SSDs or HDs, so don't worry, if your device is different.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.