rpp293
August 27, 2024, 3:08am
1
Hi,
I am having trouble resizing the partition for my SD card that is running OpenWrt ext4 image.
I have a windows pc.
I am following the steps in this guide for my 64GB SD card:
[OpenWrt Wiki] SD card
I installed: parted, tune2fs and resize2fs
in my openwrt instance via ssh.
When I run
mount -o remount,ro /
its telling me to modify the following:
/etc/fstab
When I try to modify it via winscp, it tells me the file is read only.
Any advice is greatly appreciated.
Hello, I have never edited fstab. Here are the steps I use below on my R4S that have always worked for me. I found them in the wiki somewhere but I can't seem to find them now.
Expand root partition
# Install packages
opkg install parted
# Identify disk name and partition number
echo -e "ok\nfix" | parted -l ---pretend-input-tty
# Expand root partition
parted -s /dev/mmcblk1 resizepart 2 100%
# Apply changes
reboot
Expand root filesystem
# Install packages
opkg install losetup resize2fs
# Map loop device to root partition
losetup /dev/loop1 /dev/mmcblk1p2
# Expand root filesystem
resize2fs -f /dev/loop1
# Apply changes
reboot
rpp293
August 28, 2024, 1:21am
3
Thank you very much.
Update: I can confirm these steps worked for my NanoPi R4s.
I was about to try the steps in this article but I did not want to mess up the partition unique identifiers.
[HOWTO] Resizing root partition on x86 (March 2023 edition) - Installing and Using OpenWrt - OpenWrt Forum
There is also this automated script [OpenWrt Wiki] Expanding root partition and filesystem but I have not tried it yet.
1 Like
system
Closed
September 7, 2024, 1:22am
4
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.