qnap_mtd_resize_for_bullseye icon indicating copy to clipboard operation
qnap_mtd_resize_for_bullseye copied to clipboard

TS-212P Firmware: 4.3.3.2420 Build 20230621: qnap_mtd_resize.py failed

Open bo911 opened this issue 1 year ago • 6 comments

Python3 on an empty NAS TS-212P is missing, so I install python3.5 via app through GUI ... I copy dnap_mtd_resize.py and start as follows.. [admin@NASDE9EA2 tmp]# ./qnap_mtd_resize.py --dry-run File "./qnap_mtd_resize.py", line 98 raise KeyError(f"No mtd {names} device found.") ^ SyntaxError: invalid syntax

Firmware: 4.3.3.2420 Build 20230621 Any suggestions to proceed ? [admin@NASDE9EA2 tmp]# cat /proc/mtd dev: size erasesize name mtd0: 00080000 00010000 "U-Boot" mtd1: 00200000 00010000 "Kernel" mtd2: 00900000 00010000 "RootFS1" mtd3: 00300000 00010000 "RootFS2" mtd4: 00040000 00010000 "U-Boot Config" mtd5: 00140000 00010000 "NAS Config" So it seems to me as expected

bo911 avatar Jul 20 '23 20:07 bo911

Python 3.5 does not support f-strings, you need at least Python 3.6 for those.

You could hack the script, replace f"No mtd {names} device found." with "No mtd {} device found.".format(names) but then you would be on your own in testing it, it could be quite a journey. Be careful.

cavokz avatar Jul 20 '23 20:07 cavokz

You are resizing the flash layout with the original QNAP firmware?? This is probably not a good idea!!

The resize script is intended for systems that already have Debian 10 installed - and then upgrade to Debian 11 and then dist-upgrade to Debian 12.

Please follow the installation procedure for Debian 10 and later do these flash layout resize tweaks to be able to upgrade to newer Linux kernels (Debian11 and up).

hartkopp avatar Jul 21 '23 07:07 hartkopp

Thank you, for your help My Target is debian 11, so I just do some minimal debian10 installation, and then update to debian 11 ... Are there special packages with needs to be installed (python3 of course, uboot-utils ?, fw_xxx) to run the qnap_mtd_resize.py ? I hoped to go directly to debian 11 to save kernel flashing ...

bo911 avatar Jul 21 '23 12:07 bo911

On Fri, 2023-07-21 at 05:52 -0700, bo911 wrote:

Thank you, for your help My Target is debian 11, so I just do some minimal deian10 installation, and then debian 11 ... Are the special packages with needs to be installed (python3 of corse, uboot-utils ?, fw_xxx) to run the qnap_mtd_resize.py ?

Hello. Just install Debian 10 (buster) first. Every tools required is installed then. Run qnap_mtd_resize.py and once everyhting is fine, you will be able to upgrade to debian bullseye or wormbook. Regards Arnaud

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.*** m>

amouiche avatar Jul 23 '23 13:07 amouiche

Thanks I installed Debian 10, do qnap_mtd_reisze.py and than upgrade to bullseye => I works like a charm ... I'm not so happy with several calls to flash-kernel (without verify, that the kernel didn't changed) after install some package(s), but that is a debian thing .... I prefer build my own kernel from vanilla LTS, so I have to search for kirkwood Kernel build, from example from 5.15.y, 6.1.x Regards Bernd

bo911 avatar Jul 24 '23 08:07 bo911

Thanks I installed Debian 10, do qnap_mtd_reisze.py and than upgrade to bullseye => I works like a charm ...

Good!

I'm not so happy with several calls to flash-kernel (without verify, that the kernel didn't changed) after install some package(s), but that is a debian thing ....

Flashing the kernel is deferred to the end of the upgrade process. This is a normal behaviour and works great. I also had to look at the procedure twice when the kernel upgrade happend ;-)

I prefer build my own kernel from vanilla LTS, so I have to search for kirkwood Kernel build, from example from 5.15.y, 6.1.x

I run the latest Linux kernel from Linus on my development machine - but why don't you rely on the Debian team with the 6.1 LTS kernel? They do a fantastic job with security updates.

hartkopp avatar Jul 24 '23 12:07 hartkopp