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

Failed: no information found with dmesg #47

Closed quenenni closed 8 months ago

quenenni commented 9 months ago

Hello,

After long time, I upgrade my Qnap TS219 from stretch to bucter and then to bullseye.

I discovered the problem with bullseye at the end of the upgrade process.

I followed the instruction for your script and got an error with the --dry-run prameter:

./qnap_mtd_resize.py --dry-run

[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 'libubootenv-tool' package

[find on which MTD device partitions are currently mounted]
Failed: no information found with dmesg

The only thing I can think of to not be able to find info in dmesg is because my Qnap is up for 1 year and the necessary lines in dmesg aren't there anymore.

Any ideas what can be done?

Thanks.

quenenni commented 9 months ago

The first line from dmesg:

[1105593.601892] [<c0347a3c>] (ip_rcv) from [<c0309f24>] (__netif_receive_skb_core+0x580/0xa84)
[1105593.610368] [<c0309f24>] (__netif_receive_skb_core) from [<c030be3c>] (netif_receive_skb_internal+0x1c/0x5c)
[1105593.620412] [<c030be3c>] (netif_receive_skb_internal) from [<c030c7d0>] (napi_gro_receive+0x74/0xd4)
[1105593.629770] [<c030c7d0>] (napi_gro_receive) from [<bf3796f8>] (mv643xx_eth_poll+0x488/0x560 [mv643xx_eth])
[1105593.639649] [<bf3796f8>] (mv643xx_eth_poll [mv643xx_eth]) from [<c030cff4>] (net_rx_action+0x10c/0x334)

So no lines from the boot anymore.

Conan179 commented 9 months ago

I had the same error, restart your NAS and then immediately do the dry run.

quenenni commented 9 months ago

Thanks for your quick response.

Are you sure bout the reboot now?

This error I had when upgrading can't block the boot process (and thus put me in a more difficult situation)?

Paramétrage de initramfs-tools (0.140) ...
update-initramfs: deferring update (trigger activated)
Paramétrage de mutt (2.0.5-4.1+deb11u3) ...
Traitement des actions différées (« triggers ») pour mailcap (3.69) ...
Traitement des actions différées (« triggers ») pour man-db (2.9.4-2) ...
Traitement des actions différées (« triggers ») pour initramfs-tools (0.140) ...
update-initramfs: Generating /boot/initrd.img-5.10.0-25-marvell
kirkwood-qnap: machine: QNAP TS219 family
Using DTB: kirkwood-ts219-6282.dtb
Installing /usr/lib/linux-image-5.10.0-25-marvell/kirkwood-ts219-6282.dtb into /boot/dtbs/5.10.0-25-marvell/./kirkwood-ts219-6282.dtb
Taking backup of kirkwood-ts219-6282.dtb.
Installing new kirkwood-ts219-6282.dtb.
Installing /usr/lib/linux-image-5.10.0-25-marvell/kirkwood-ts219-6282.dtb into /boot/dtbs/5.10.0-25-marvell/./kirkwood-ts219-6282.dtb
Taking backup of kirkwood-ts219-6282.dtb.
Installing new kirkwood-ts219-6282.dtb.
flash-kernel: installing version 5.10.0-25-marvell
Not enough space for kernel in MTD 'Kernel' (need 2464464 but is actually 2097152).
run-parts: /etc/initramfs/post-update.d//flash-kernel exited with return code 1
dpkg: erreur de traitement du paquet initramfs-tools (--configure) :
 installed initramfs-tools package post-installation script subprocess returned error exit status 1
Des erreurs ont été rencontrées pendant l'exécution :
 initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)

Everything seems to work normally since I finished my upgrade to bullseye (with the MTD error). The one thing I'm afraid is to not be able to reboot now. Usually, initramfs errors can cause problems during boot, no?

Conan179 commented 9 months ago

Regarding the error message in post 1, I'm 100% sure that a restart will fix it, your Nas just ran for too long, which is why the bot was no longer in the dmesg. The other error is not caused by this and is something else.

amouiche commented 9 months ago

Ah,.. so you tried to upgrade to bullseye before having resized your parititions. and the upgrade obiously stops for space reason.

Indeed, the last reboot is too long ago and the information we are looking into dmesg is not here any more. Well, in any case, you will have to reboot before continuing your debian upgrade since the effect of the partition resizing are only available on next reboot...

The good news, is that you "previous" kernel + initrd are still in flash and you will be able boot on them... which should work. The question is what's happenend once once the harddrive are mounted and the system switch from initrd (still buster) to the one juste upgraded on hard drive (mostly bulseye).

Anyway, you should have enough things working to run qnap_mtd_resize.py, then reboot again run with resized partitions, then finalize the bulseye upgrade.

Arnaud

On Wed, 2023-09-13 at 12:39 -0700, quenenni wrote:

Thanks for your quick response. Are you sure bout the reboot now? This error I had when upgrading can't block the boot process (and thus put me in a more difficult situation)? Paramétrage de initramfs-tools (0.140) ... update-initramfs: deferring update (trigger activated) Paramétrage de mutt (2.0.5-4.1+deb11u3) ... Traitement des actions différées (« triggers ») pour mailcap (3.69) ... Traitement des actions différées (« triggers ») pour man-db (2.9.4-2) ... Traitement des actions différées (« triggers ») pour initramfs-tools (0.140) ... update-initramfs: Generating /boot/initrd.img-5.10.0-25-marvell kirkwood-qnap: machine: QNAP TS219 family Using DTB: kirkwood-ts219-6282.dtb Installing /usr/lib/linux-image-5.10.0-25-marvell/kirkwood-ts219-6282.dtb into /boot/dtbs/5.10.0-25-marvell/./kirkwood-ts219-6282.dtb Taking backup of kirkwood-ts219-6282.dtb. Installing new kirkwood-ts219-6282.dtb. Installing /usr/lib/linux-image-5.10.0-25-marvell/kirkwood-ts219-6282.dtb into /boot/dtbs/5.10.0-25-marvell/./kirkwood-ts219-6282.dtb Taking backup of kirkwood-ts219-6282.dtb. Installing new kirkwood-ts219-6282.dtb. flash-kernel: installing version 5.10.0-25-marvell Not enough space for kernel in MTD 'Kernel' (need 2464464 but is actually 2097152). run-parts: /etc/initramfs/post-update.d//flash-kernel exited with return code 1 dpkg: erreur de traitement du paquet initramfs-tools (--configure) : installed initramfs-tools package post-installation script subprocess returned error exit status 1 Des erreurs ont été rencontrées pendant l'exécution : initramfs-tools E: Sub-process /usr/bin/dpkg returned an error code (1) — 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>

quenenni commented 9 months ago

Thanks to both of you for your advices.

Just to say I didn't forget but didn't have the time last week-end to try it. I'll come back here as soon as I have tried it.

quenenni commented 8 months ago

Sorry for the delay. I finally was able to do it and everything went smoothly.

Thanks a lot to both of you for your help.