amouiche / qnap_mtd_resize_for_bullseye

Script for resizing MTD partitions on a QNAP device in order to be able to upgrade from buster to bullseye
GNU General Public License v2.0
51 stars 11 forks source link

resize2fs failed. 'NAS config' resize not possible automatically #54

Closed SanderdeGreef closed 4 months ago

SanderdeGreef commented 4 months ago

Hi, I have the QNAP TS-219PII running Debian 10 and tried this script. I run into an error during the dry-run, when resizing the NAS Config. It seems its 97% full so it can't be made smaller. How can this be fixed? I see that other QNAP 219PII have been able to resize.

The full dry-run log:

[Check of the QNAP model and see if supported] kirkwood-qnap: machine: QNAP TS219 family DTB file: kirkwood-ts219-6282.dtb Checking: flashcp -V Checking: flash_erase --version Using 'u-boot-tools' package

[find on which MTD device partitions are currently mounted] spi0.0

[Dump current U-boot config'] Current U-boot bootcmd: uart1 0x68;cp.l 0xf8200000 0x800000 0x80000;cp.l 0xf8400000 0xa00000 0x240000;bootm 0x800000 Current U-boot bootargs: console=ttyS0,115200 root=/dev/ram initrd=0xa00000,0x900000 ramdisk=34816

[Prepare new 'bootcmd'] Old: uart1 0x68;cp.l 0xf8200000 0x800000 0x80000;cp.l 0xf8400000 0xa00000 0x240000;bootm 0x800000 New: uart1 0x68;cp.l 0xf8100000 0x800000 0xc0000;cp.l 0xf8400000 0xb00000 0x300000;bootm 0x800000;echo Kernel_legacy layout fallback;bootm 0x900000

[Prepare new 'bootargs'] Old: console=ttyS0,115200 root=/dev/ram initrd=0xa00000,0x900000 ramdisk=34816 New: console=ttyS0,115200 root=/dev/ram initrd=0xb00000,0xc00000 ramdisk=34816 cmdlinepart.mtdparts=spi0.0:512k@0(uboot)ro,3M@0x100000(Kernel),12M@0x400000(RootFS1),2M@0x200000(Kernel_legacy),256k@0x80000(U-Boot_Config),256k@0xc0000(NAS_Config) mtdparts=spi0.0:512k@0(uboot)ro,3M@0x100000(Kernel),12M@0x400000(RootFS1),2M@0x200000(Kernel_legacy),256k@0x80000(U-Boot_Config),256k@0xc0000(NAS_Config)

[Prepare fw_setenv script (/tmp/fw_setenv.script)]

[Dump current 'NAS config' and 'Kernel' images]

SanderdeGreef commented 4 months ago

I was able to mount /dev/loop0 and delete the largest file. After unmount and checking the filesystem the resize worked fine again.