Migration to Debian Bookworm and YunoHost 12 fails

What type of hardware are you using: Old laptop or computer
What YunoHost version are you running: YunoHost 11.3.0.2 (stable).
How are you able to access your server: The webadmin
Are you in a special context or did you perform specific tweaking on your YunoHost instance ?: no

Describe your issue

I am trying to upgrade Debian Bookworm and YunoHost 12. It fails and directs me to pending migrations which also fails.

Share relevant logs or error messages

ended_at: 2024-12-28 21:27:57.952209
error: ‘Migration 0027_migrate_to_bookworm did not complete, aborting. Error: Failed
to run command ‘‘aptitude full-upgrade cron rspamd- luajit- libluajit-5.1-2- --show-why
-o APT::Force-LoopBreak=1 -o Dpkg::Options::=’’–force-confold’‘’‘’
interface: api
operation: tools_migrations_migrate_forward
parent: null
started_at: 2024-12-28 21:27:33.476058
success: false
yunohost_version: 11.3.0.2

============

2024-12-29 08:27:33,481: INFO - Running migration 0027_migrate_to_bookworm…
2024-12-29 08:27:33,488: INFO - Starting migration to Bookworm…
2024-12-29 08:27:35,748: INFO - Patching the sources.lists file…
2024-12-29 08:27:36,395: DEBUG - Running: LC_ALL=C DEBIAN_FRONTEND=noninteractive APT_LISTCHANGES_FRONTEND=none aptitude update --quiet=2 -o=Dpkg::Use-Pty=0 -o “APT::Status-Fd=$YNH_STDINFO”
2024-12-29 08:27:40,691: INFO - Applying patch to workaround conflict issue…
2024-12-29 08:27:40,718: DEBUG - Running: sed -i /var/lib/dpkg/status -e ‘s@Conflicts: apache2, bind9@Conflicts: apache2, bind9@g’
2024-12-29 08:27:40,736: INFO - Starting main upgrade…
2024-12-29 08:27:40,761: DEBUG - Running: LC_ALL=C DEBIAN_FRONTEND=noninteractive APT_LISTCHANGES_FRONTEND=none aptitude markauto mariadb-server metronome rspamd php-common php-mbstring php-pear php-php-gettext php-xml php7.4-cli php7.4-common php7.4-curl php7.4-fpm php7.4-gd php7.4-intl php7.4-json php7.4-ldap php7.4-mbstring php7.4-mysql php7.4-opcache php7.4-readline php7.4-xml php8.2-cli php8.2-common php8.2-gd php8.2-mbstring php8.2-opcache php8.2-readline php8.2-xml php8.3 php8.3-apcu php8.3-bcmath php8.3-bz2 php8.3-cli php8.3-common php8.3-curl php8.3-fpm php8.3-gd php8.3-gmp php8.3-igbinary php8.3-imagick php8.3-imap php8.3-intl php8.3-ldap php8.3-mbstring php8.3-mysql php8.3-opcache php8.3-readline php8.3-redis php8.3-xml php8.3-zip --quiet=2 -o=Dpkg::Use-Pty=0 -o “APT::Status-Fd=$YNH_STDINFO”
2024-12-29 08:27:42,167: DEBUG - Package rspamd is not installed, cannot be marked/unmarked as automatically installed
2024-12-29 08:27:43,195: DEBUG - Running: YUNOHOST_API_RESTART_WILL_BE_HANDLED_BY_YUNOHOST=yes LC_ALL=C DEBIAN_FRONTEND=noninteractive APT_LISTCHANGES_FRONTEND=none aptitude hold yunohost moulinette ssowat yunohost-admin audiobookshelf-ynh-deps netdata-ynh-deps nextcloud-ynh-deps photoprism-ynh-deps --quiet=2 -o=Dpkg::Use-Pty=0 -o “APT::Status-Fd=$YNH_STDINFO”
2024-12-29 08:27:45,197: DEBUG - Running: sed -i /var/lib/dpkg/status -e ‘s@rspamd, @@g
2024-12-29 08:27:45,218: DEBUG - Running: LC_ALL=C DEBIAN_FRONTEND=noninteractive APT_LISTCHANGES_FRONTEND=none aptitude full-upgrade cron rspamd- luajit- libluajit-5.1-2- --show-why -o APT::Force-LoopBreak=1 -o Dpkg::Options::=‘–force-confold’ --quiet=2 -o=Dpkg::Use-Pty=0 -o “APT::Status-Fd=$YNH_STDINFO”
2024-12-29 08:27:47,181: DEBUG - cron is already installed at the latest version (3.0pl1-162), so it will not be upgraded
2024-12-29 08:27:47,181: DEBUG - Package rspamd is not installed, so it will not be removed
2024-12-29 08:27:47,181: DEBUG - Package luajit is not installed, so it will not be removed
2024-12-29 08:27:47,181: DEBUG - Package libluajit-5.1-2 is not installed, so it will not be removed
2024-12-29 08:27:47,181: DEBUG - cron is already installed at the latest version (3.0pl1-162), so it will not be upgraded
2024-12-29 08:27:47,182: DEBUG - Package rspamd is not installed, so it will not be removed
2024-12-29 08:27:47,182: DEBUG - Package luajit is not installed, so it will not be removed
2024-12-29 08:27:47,182: DEBUG - Package libluajit-5.1-2 is not installed, so it will not be removed
2024-12-29 08:27:47,182: DEBUG - The following partially installed packages will be configured:
2024-12-29 08:27:47,182: DEBUG - grub-pc
2024-12-29 08:27:47,182: DEBUG - No packages will be installed, upgraded, or removed.
2024-12-29 08:27:47,183: DEBUG - 0 packages upgraded, 0 newly installed, 0 to remove and 43 not upgraded.
2024-12-29 08:27:47,183: DEBUG - Need to get 0 B of archives. After unpacking 0 B will be used.
2024-12-29 08:27:47,207: DEBUG - Setting up grub-pc (2.06-13+deb12u1) …
2024-12-29 08:27:47,209: INFO - […] > 0.0% Installing grub-pc
2024-12-29 08:27:47,990: DEBUG - grub-pc: Running grub-install …
2024-12-29 08:27:48,013: DEBUG - Installing for i386-pc platform.
2024-12-29 08:27:51,490: DEBUG - grub-install: error: unable to identify a filesystem in hostdisk//dev/sda; safety check can’t be performed.
2024-12-29 08:27:51,515: DEBUG - grub-install failure for /dev/sda
2024-12-29 08:27:51,518: DEBUG - You must correct your GRUB install devices before proceeding:
2024-12-29 08:27:51,518: DEBUG -
2024-12-29 08:27:51,518: DEBUG - DEBIAN_FRONTEND=dialog dpkg --configure grub-pc
2024-12-29 08:27:51,518: DEBUG - dpkg --configure -a
2024-12-29 08:27:51,616: DEBUG - dpkg: error processing package grub-pc (–configure):
2024-12-29 08:27:51,616: DEBUG - installed grub-pc package post-installation script subprocess returned error exit status 1
2024-12-29 08:27:51,664: DEBUG - Errors were encountered while processing:
2024-12-29 08:27:51,664: DEBUG - grub-pc
2024-12-29 08:27:51,853: WARNING - E: Sub-process /usr/bin/dpkg returned an error code (1)
2024-12-29 08:27:51,877: DEBUG - Setting up grub-pc (2.06-13+deb12u1) …
2024-12-29 08:27:52,603: WARNING - grub-pc: Running grub-install …
2024-12-29 08:27:52,615: WARNING - Installing for i386-pc platform.
2024-12-29 08:27:55,772: WARNING - grub-install: error: unable to identify a filesystem in hostdisk//dev/sda; safety check can’t be performed.
2024-12-29 08:27:55,786: WARNING - grub-install failure for /dev/sda
2024-12-29 08:27:55,788: WARNING - You must correct your GRUB install devices before proceeding:
2024-12-29 08:27:55,789: WARNING -
2024-12-29 08:27:55,789: WARNING - DEBIAN_FRONTEND=dialog dpkg --configure grub-pc
2024-12-29 08:27:55,790: WARNING - dpkg --configure -a
2024-12-29 08:27:55,897: WARNING - dpkg: error processing package grub-pc (–configure):
2024-12-29 08:27:55,897: WARNING - installed grub-pc package post-installation script subprocess returned error exit status 1
2024-12-29 08:27:55,946: WARNING - Errors were encountered while processing:
2024-12-29 08:27:55,947: WARNING - grub-pc
2024-12-29 08:27:57,947: ERROR - Migration 0027_migrate_to_bookworm did not complete, aborting. Error: Failed to run command ‘aptitude full-upgrade cron rspamd- luajit- libluajit-5.1-2- --show-why -o APT::Force-LoopBreak=1 -o Dpkg::Options::=’–force-confold’’
Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/yunohost/tools.py”, line 786, in tools_migrations_run
migration.run()
File “/usr/lib/python3/dist-packages/yunohost/migrations/0027_migrate_to_bookworm.py”, line 204, in run
aptitude_with_progress_bar(
File “/usr/lib/python3/dist-packages/yunohost/utils/system.py”, line 315, in aptitude_with_progress_bar
raise YunohostError(
yunohost.utils.error.YunohostError: Failed to run command ‘aptitude full-upgrade cron rspamd- luajit- libluajit-5.1-2- --show-why -o APT::Force-LoopBreak=1 -o Dpkg::Options::=’–force-confold’’