Seems to be a bit of a problem on R2S, am I the only one?
I expanded of the second hide partition f2fs
of the squashfs
filesystem on the VM,
form this
https://forum.openwrt.org/t/howto-resizing-root-partition-on-x86/140631,
but on R2S after reboot it won't start.
Since I don't know how use the serial port to debug R2S, I can't get the startup logs
fsck.f2fs -f ${LOOP}
+ fsck.f2fs -f /dev/loop1
Info: Force to fix corruption
Info: Segments per section = 1
Info: Sections per zone = 1
Info: sector size = 512
Info: total sectors = 62275968 (30408 MB)
Info: MKFS version
"Linux version 5.10.176 (builder@buildhost) (aarch64-openwrt-linux-musl-gcc (OpenWrt GCC 11.2.0 r20134-5f15225c1e) 11.2.0, GNU ld (GNU Binutils) 2.37) #0 SMP PREEMPT Thu Apr 27 20:28:15 2023"
Info: FSCK version
from "Linux version 5.10.176 (builder@buildhost) (aarch64-openwrt-linux-musl-gcc (OpenWrt GCC 11.2.0 r20134-5f15225c1e) 11.2.0, GNU ld (GNU Binutils) 2.37) #0 SMP PREEMPT Thu Apr 27 20:28:15 2023"
to "Linux version 5.10.176 (builder@buildhost) (aarch64-openwrt-linux-musl-gcc (OpenWrt GCC 11.2.0 r20134-5f15225c1e) 11.2.0, GNU ld (GNU Binutils) 2.37) #0 SMP PREEMPT Thu Apr 27 20:28:15 2023"
Info: superblock features = 0 :
Info: superblock encrypt level = 0, salt = 00000000000000000000000000000000
Info: total FS sectors = 641408 (313 MB)
Info: CKPT version = 61222f68
Info: Corrupted valid nat_bits in checkpoint
Info: Write valid nat_bits in checkpoint
Info: checkpoint state = c4 : nat_bits crc compacted_summary sudden-power-off
[FSCK] Unreachable nat entries [Ok..] [0x0]
[FSCK] SIT valid block bitmap checking [Ok..]
[FSCK] Hard link checking for regular file [Ok..] [0x1]
[FSCK] valid_block_count matching with CP [Ok..] [0x1bcd]
[FSCK] valid_node_count matching with CP (de lookup) [Ok..] [0x7f2]
[FSCK] valid_node_count matching with CP (nat lookup) [Ok..] [0x7f2]
[FSCK] valid_inode_count matched with CP [Ok..] [0x7f2]
[FSCK] free segment_count matched with CP [Ok..] [0x7f]
[FSCK] next block offset is free [Ok..]
[FSCK] fixing SIT types
[FSCK] other corrupted bugs [Ok..]
Info: Duplicate valid checkpoint to mirror position 1024 -> 512
Info: Write valid nat_bits in checkpoint
Info: Write valid nat_bits in checkpoint
Done: 1.119534 sec
resize.f2fs ${LOOP}
+ resize.f2fs /dev/loop1
Info: Segments per section = 1
Info: Sections per zone = 1
Info: sector size = 512
Info: total sectors = 62275968 (30408 MB)
Info: MKFS version
"Linux version 5.10.176 (builder@buildhost) (aarch64-openwrt-linux-musl-gcc (OpenWrt GCC 11.2.0 r20134-5f15225c1e) 11.2.0, GNU ld (GNU Binutils) 2.37) #0 SMP PREEMPT Thu Apr 27 20:28:15 2023"
Info: FSCK version
from "Linux version 5.10.176 (builder@buildhost) (aarch64-openwrt-linux-musl-gcc (OpenWrt GCC 11.2.0 r20134-5f15225c1e) 11.2.0, GNU ld (GNU Binutils) 2.37) #0 SMP PREEMPT Thu Apr 27 20:28:15 2023"
to "Linux version 5.10.176 (builder@buildhost) (aarch64-openwrt-linux-musl-gcc (OpenWrt GCC 11.2.0 r20134-5f15225c1e) 11.2.0, GNU ld (GNU Binutils) 2.37) #0 SMP PREEMPT Thu Apr 27 20:28:15 2023"
Info: superblock features = 0 :
Info: superblock encrypt level = 0, salt = 00000000000000000000000000000000
Info: total FS sectors = 641408 (313 MB)
Info: CKPT version = 61222f68
[migrate_block: 56] Migrate node block 1003 -> ce00
[migrate_block: 56] Migrate node block 101d -> ce01
[migrate_block: 56] Migrate node block 101e -> ce02
[migrate_block: 56] Migrate node block 1020 -> ce03
[migrate_block: 56] Migrate node block 1027 -> ce04
[migrate_block: 56] Migrate node block 1029 -> ce05
[migrate_block: 56] Migrate node block 102a -> ce06
[migrate_block: 56] Migrate node block 102b -> ce07
[migrate_block: 56] Migrate node block 102c -> ce08
[migrate_block: 56] Migrate node block 102d -> ce09
[migrate_block: 56] Migrate data block a3fa -> eeec
[migrate_block: 56] Migrate data block a3fb -> eeed
[migrate_block: 56] Migrate data block a3fc -> eeee
[migrate_block: 56] Migrate data block a3fd -> eeef
[migrate_block: 56] Migrate data block a3fe -> eef0
[migrate_block: 56] Migrate data block a3ff -> eef1
[FIX] (move_one_curseg_info:2798) --> Move curseg[0] 11 -> 6d after ce00
[FIX] (move_one_curseg_info:2798) --> Move curseg[1] 6 -> 6f after ce00
[FIX] (move_one_curseg_info:2798) --> Move curseg[2] 10 -> 6e after ce00
[FIX] (move_one_curseg_info:2798) --> Move curseg[3] 0 -> 5f after ce00
[FIX] (move_one_curseg_info:2798) --> Move curseg[4] 12 -> 6b after ce00
[FIX] (move_one_curseg_info:2798) --> Move curseg[5] 2 -> 70 after ce00
Info: Write valid nat_bits in checkpoint
Try to do defragement: Done
[migrate_ssa: 270] Info: Done to migrate SSA blocks: sum_blkaddr = 0xe00 -> 0x9200
[migrate_nat: 386] Info: Done to migrate NAT blocks: nat_blkaddr = 0xa00 -> 0xa00
[migrate_sit: 444] Info: Done to restore new SIT blocks: 0x600
Info: Write valid nat_bits in checkpoint
[rebuild_checkpoint: 585] Info: Done to rebuild checkpoint blocks
[update_superblock: 695] Info: Done to update superblock
Done: 13.329668 secs
I made several attempts and I noticed a lot of modifications on resize.f2fs
,
tried fsck.f2fs
again after resize.f2fs
and got a Checkpoint is polluted
error, which I think should have failed.
I tried using the tune2fs method. Stuck in resource busy when remount.
mount -o remount,ro /
Is there any way to fix this?
Thanks
Update 1:
The reason I seem to have discovered is that those built using firmware selector will use ext4 as the overlay,
same as this [https://forum.openwrt .org/t/resizing-the-hidden-overlay-filesystem-when-it-is-ext4-and-not-f2fs/140490](https://forum.openwrt .org/t/resizing-the-hidden-overlay-filesystem-when-it-is-ext4-and-not-f2fs/140490),
and when I use imager-builder on my windows wsl, it will use f2fs as overlay.