Title says, I am using a NanoPi R2S and I don't want to take out the SD Card every update just to change the file system. I came across the Image Builder, but how do I customize it to use F2FS instead of the default EXT4 and SquashFS generated images.
1 Like
or is there any way to modify the filesystem parameters, so I can use the full size of the SD Card after flashing? Can I adjust the offsets at the image?
I think I found an answer, will test this and see if it works. This looks like it is undocumented on the ImageBuilder page.
Solution #1 - Change the partition size on the flashable image
Solution #2 - Online filesystem resizing (See comment #3 by Mario Tremblay commented on 10.03.2021 19:46)
opened 01:30PM - 31 Mar 20 UTC
flyspray
*jneuhauser:*
**Used HW/SW:**
- PCEngines APU2C4
- OpenWrt SNAPSHOT, r127… 76-437eb41f23
**Steps to reproduce:**
- Install needed packages:
<code>root@OpenWrt:~# opkg update && opkg install fdisk resize2fs</code>
- Extend root partition from 104 MB to 256 MB with fdisk:
<code>root@OpenWrt:~# fdisk /dev/mmcblk0 << EOF
p
d
2
n
p
2
33792
+256M
w
EOF</code>
- Extend ext4 filesystem:
<code>root@OpenWrt:~# resize2fs /dev/mmcblk0p2</code>
**Here are the output of resize2fs:**
<code>root@OpenWrt:~# resize2fs /dev/mmcblk0p2
resize2fs 1.45.4 (23-Sep-2019)
Filesystem at /dev/mmcblk0p2 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 1
Performing an on-line resize of /dev/mmcblk0p2 to 65664 (4k) blocks.
resize2fs: Invalid argument While trying to add group #1</code>
**Here are the dmesg output:**
<code>root@OpenWrt:~# dmesg | tail -n 6
[50698.949591] EXT4-fs (mmcblk0p2): resizing filesystem from 32768 to 65664 blocks
[50698.957030] EXT4-fs (mmcblk0p2): resizing filesystem from 32768 to 65536 blocks
[50698.969299] EXT4-fs warning (device mmcblk0p2): reserve_backup_gdb:1033: reserved block 8 not at offset 7
[50698.978959] EXT4-fs warning (device mmcblk0p2): ext4_resize_fs:2120: error (-22) occurred during file system resize
[50698.989429] EXT4-fs (mmcblk0p2): resized filesystem to 32768
[50698.999227] EXT4-fs warning (device mmcblk0p2): reserve_backup_gdb:1033: reserved block 8 not at offset 7</code>
Offline resizing does work as expected.
This works. I will no longer be changing the filesystem, Will just turn off the journaling and preset the drive size. This feature must be documented with the advent of devices that can use large storages.
1 Like
system
Closed
January 20, 2022, 11:25am
5
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.