Which do I fix first?

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

Describe your issue

What order do I try to fix things in? I will recreate this support request when I know that.

  1. rspamd is dead error - it says it last ran about 55 years ago - I tried this fix Rspamd installation fails on freshly migrated yunohost 12.0.3 - #6 by metyun and got E: Sub-process /usr/bin/dpkg returned an error code (1)
  2. When trying to upgrade to bookworm I got - System update There are some pending migrations waiting to be run. Please go to Tools > Migrations to run them.

I would appreciate any help - ultra newby here.

Share relevant logs or error messages

rspamd log hastebin

Migration error
when I try to do that I get :

Failed to read info for audiobookshelf : Invalid version: ‘2.17.5~ynh1’
Failed to read info for netdata : Invalid version: ‘1.47.5~ynh1’
Failed to read info for nextcloud : Invalid version: ‘29.0.7~ynh2’
Failed to read info for photoprism : Invalid version: ‘2022.09.01~ynh4’
Failed to read info for syncthing : Invalid version: ‘1.28.1~ynh1’
Running migration 0027_migrate_to_bookworm…
Starting migration to Bookworm…
Patching the sources.lists file…
Applying patch to workaround conflict issue…
Starting main upgrade…

and it dumps me back to the migration screen

Hi uncertain,

When did you run the upgrade? The log is over a month old, it may not be the most recent one if you did the upgrade today.

Is there a log from the upgrade/migration itself? Does diagnosis still work, if so, does it give any hints as for the state of your server?

Hi and thanks for the reply. Yes, I tried to upgrade in december and posted here but without success.

I’ve only just got back to it as I need to allocate a day at least to working through issues and trying fixes

Latest Logs

  1. Migration to bookworm
  2. Diagnosis log
ended_at: 2025-01-18 11:49:03.012559
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: 2025-01-18 11:48:37.752941
success: false
yunohost_version: 11.3.0.2

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

2025-01-18 22:48:37,758: INFO - Running migration 0027_migrate_to_bookworm…
2025-01-18 22:48:37,764: INFO - Starting migration to Bookworm…
2025-01-18 22:48:40,384: INFO - Patching the sources.lists file…
2025-01-18 22:48:40,995: 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"
2025-01-18 22:48:45,535: INFO - Applying patch to workaround conflict issue…
2025-01-18 22:48:45,554: DEBUG - Running: sed -i /var/lib/dpkg/status -e 's@Conflicts: apache2, bind9@Conflicts: apache2, bind9@g'
2025-01-18 22:48:45,573: INFO - Starting main upgrade…
2025-01-18 22:48:45,593: 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"
2025-01-18 22:48:47,057: DEBUG - Package rspamd is not installed, cannot be marked/unmarked as automatically installed
2025-01-18 22:48:48,085: 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"
2025-01-18 22:48:50,088: DEBUG - Running: sed -i /var/lib/dpkg/status -e 's@rspamd, @@g'
2025-01-18 22:48:50,108: 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"
2025-01-18 22:48:52,136: DEBUG - cron is already installed at the latest version (3.0pl1-162), so it will not be upgraded
2025-01-18 22:48:52,136: DEBUG - Package rspamd is not installed, so it will not be removed
2025-01-18 22:48:52,137: DEBUG - Package luajit is not installed, so it will not be removed
2025-01-18 22:48:52,137: DEBUG - Package libluajit-5.1-2 is not installed, so it will not be removed
2025-01-18 22:48:52,137: DEBUG - cron is already installed at the latest version (3.0pl1-162), so it will not be upgraded
2025-01-18 22:48:52,137: DEBUG - Package rspamd is not installed, so it will not be removed
2025-01-18 22:48:52,137: DEBUG - Package luajit is not installed, so it will not be removed
2025-01-18 22:48:52,137: DEBUG - Package libluajit-5.1-2 is not installed, so it will not be removed
2025-01-18 22:48:52,137: DEBUG - The following partially installed packages will be configured:
2025-01-18 22:48:52,138: DEBUG -   grub-pc
2025-01-18 22:48:52,138: DEBUG - No packages will be installed, upgraded, or removed.
2025-01-18 22:48:52,138: DEBUG - 0 packages upgraded, 0 newly installed, 0 to remove and 95 not upgraded.
2025-01-18 22:48:52,138: DEBUG - Need to get 0 B of archives. After unpacking 0 B will be used.
2025-01-18 22:48:52,161: DEBUG - Setting up grub-pc (2.06-13+deb12u1) ...
2025-01-18 22:48:52,161: INFO - [....................] > 0.0% Installing grub-pc
2025-01-18 22:48:52,963: DEBUG - grub-pc: Running grub-install ...
2025-01-18 22:48:52,984: DEBUG - Installing for i386-pc platform.
2025-01-18 22:48:56,440: DEBUG - grub-install: error: unable to identify a filesystem in hostdisk//dev/sda; safety check can't be performed.
2025-01-18 22:48:56,470: DEBUG -   grub-install failure for /dev/sda
2025-01-18 22:48:56,473: DEBUG - You must correct your GRUB install devices before proceeding:
2025-01-18 22:48:56,473: DEBUG - 
2025-01-18 22:48:56,474: DEBUG -   DEBIAN_FRONTEND=dialog dpkg --configure grub-pc
2025-01-18 22:48:56,474: DEBUG -   dpkg --configure -a
2025-01-18 22:48:56,575: DEBUG - dpkg: error processing package grub-pc (--configure):
2025-01-18 22:48:56,576: DEBUG -  installed grub-pc package post-installation script subprocess returned error exit status 1
2025-01-18 22:48:56,626: DEBUG - Errors were encountered while processing:
2025-01-18 22:48:56,627: DEBUG -  grub-pc
2025-01-18 22:48:56,816: WARNING - E: Sub-process /usr/bin/dpkg returned an error code (1)
2025-01-18 22:48:56,835: DEBUG - Setting up grub-pc (2.06-13+deb12u1) ...
2025-01-18 22:48:57,579: WARNING - grub-pc: Running grub-install ...
2025-01-18 22:48:57,592: WARNING - Installing for i386-pc platform.
2025-01-18 22:49:00,832: WARNING - grub-install: error: unable to identify a filesystem in hostdisk//dev/sda; safety check can't be performed.
2025-01-18 22:49:00,856: WARNING -   grub-install failure for /dev/sda
2025-01-18 22:49:00,859: WARNING - You must correct your GRUB install devices before proceeding:
2025-01-18 22:49:00,860: WARNING - 
2025-01-18 22:49:00,860: WARNING -   DEBIAN_FRONTEND=dialog dpkg --configure grub-pc
2025-01-18 22:49:00,860: WARNING -   dpkg --configure -a
2025-01-18 22:49:00,958: WARNING - dpkg: error processing package grub-pc (--configure):
2025-01-18 22:49:00,959: WARNING -  installed grub-pc package post-installation script subprocess returned error exit status 1
2025-01-18 22:49:01,006: WARNING - Errors were encountered while processing:
2025-01-18 22:49:01,007: WARNING -  grub-pc
2025-01-18 22:49:03,008: 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''

2. Diagnosis

=================================
Base system (basesystem)
=================================

[INFO] Server hardware architecture is bare-metal amd64
  - Server model is Gigabyte Technology Co., Ltd. X58A-UD3R

[INFO] Server is running Linux kernel 6.1.0-28-amd64

[INFO] Server is running Debian 12.8

[INFO] Server is running YunoHost 11.3.0.2 (stable)
  - yunohost version: 11.3.0.2 (stable)
  - yunohost-admin version: 11.3.0 (stable)
  - moulinette version: 11.3.0 (stable)
  - ssowat version: 11.3.0 (stable)



=================================
Internet connectivity (ip)
=================================

[SUCCESS] Domain name resolution is working!

[SUCCESS] The server is connected to the Internet through IPv4!
  - Global IP: xx.xx.xx.xx
  - Local IP: 192.168.50.5

[WARNING] The server does not have working IPv6.
  - IPv6 should usually be automatically configured by the system or your provider if it's available. Otherwise, you might need to configure a few things manually as explained in the documentation here: https://yunohost.org/ipv6.



=================================
DNS records (dnsrecords)
=================================

[SUCCESS] DNS records are correctly configured for domain maindomain.tld (category basic)

[SUCCESS] DNS records are correctly configured for domain maindomain.tld (category mail)

[SUCCESS] DNS records are correctly configured for domain maindomain.tld (category xmpp)

[SUCCESS] DNS records are correctly configured for domain maindomain.tld (category extra)

[INFO] Domain domain2.tld is based on a special-use top-level domain (TLD) such as .local or .test and is therefore not expected to have actual DNS records.



=================================
Ports exposure (ports)
=================================

[SUCCESS] Port 22 is reachable from the outside.
  - Exposing this port is needed for admin features (service ssh)

[SUCCESS] Port 25 is reachable from the outside.
  - Exposing this port is needed for email features (service postfix)

[SUCCESS] Port 80 is reachable from the outside.
  - Exposing this port is needed for web features (service nginx)

[SUCCESS] Port 443 is reachable from the outside.
  - Exposing this port is needed for web features (service nginx)

[SUCCESS] Port 587 is reachable from the outside.
  - Exposing this port is needed for email features (service postfix)

[SUCCESS] Port 993 is reachable from the outside.
  - Exposing this port is needed for email features (service dovecot)

[SUCCESS] Port 5222 is reachable from the outside.
  - Exposing this port is needed for xmpp features (service metronome)

[SUCCESS] Port 5269 is reachable from the outside.
  - Exposing this port is needed for xmpp features (service metronome)

[SUCCESS] Port 22000 is reachable from the outside.
  - Exposing this port is needed for [?] features (service syncthing)



=================================
Web (web)
=================================

[INFO] Domain domain2.tld is based on a special-use top-level domain (TLD) such as .local or .test and is therefore not expected to be exposed outside the local network.

[SUCCESS] Domain maindomain.tld is reachable through HTTP from outside the local network.

[SUCCESS] Domain audiobookshelf.maindomain.tld is reachable through HTTP from outside the local network.



=================================
Email (mail)
=================================

[SUCCESS] The SMTP mail server is able to send emails (outgoing port 25 is not blocked).

[SUCCESS] The SMTP mail server is reachable from the outside and therefore is able to receive emails!

[SUCCESS] Your reverse DNS is correctly configured!

[SUCCESS] The IPs and domains used by this server do not appear to be blacklisted

[SUCCESS] 0 pending emails in the mail queues



=================================
Services status check (services)
=================================

[SUCCESS] Service audiobookshelf is running!

[SUCCESS] Service dnsmasq is running!

[SUCCESS] Service dovecot is running!

[SUCCESS] Service fail2ban is running!

[SUCCESS] Service metronome is running!

[SUCCESS] Service mysql is running!

[SUCCESS] Service netdata is running!

[SUCCESS] Service nginx is running!

[SUCCESS] Service photoprism is running!

[SUCCESS] Service php7.4-fpm is running!

[SUCCESS] Service php8.3-fpm is running!

[SUCCESS] Service postfix is running!

[SUCCESS] Service postgresql is running!

[SUCCESS] Service redis-server is running!

[ERROR] Service rspamd is dead :(
  - You can try to restart the service, and if it doesn't work, have a look at the service logs in the webadmin (from the command line, you can do this with 'yunohost service restart rspamd' and 'yunohost service log rspamd').

[SUCCESS] Service slapd is running!

[SUCCESS] Service ssh is running!

[SUCCESS] Service syncthing is running!

[SUCCESS] Service yunohost-api is running!

[SUCCESS] Service yunohost-firewall is running!

[SUCCESS] Service yunomdns is running!



=================================
System resources (systemresources)
=================================

[SUCCESS] The system still has 6.0 GiB (77%) RAM available out of 7.8 GiB.

[SUCCESS] The system has 976 MiB of swap!
  - Please be careful and aware that if the server is hosting swap on an SD card or SSD storage, it may drastically reduce the life expectancy of the device.

[SUCCESS] Storage / (on device /dev/mapper/system-root) still has 405 GiB (91.4%) space left (out of 443 GiB)!

[SUCCESS] Storage /boot (on device /dev/sdb1) still has 109 MiB (51%) space left (out of 213 MiB)!

[SUCCESS] Storage /home/accessy/apps/audiobookshelf (on device /dev/mapper/system-root) still has 405 GiB (91.4%) space left (out of 443 GiB)!

[SUCCESS] Storage /home/yunohost.app/audiobookshelf/data (on device /dev/mapper/system-audiobookshelf) still has 124 GiB (44%) space left (out of 279 GiB)!

[SUCCESS] Storage /home/yunohost.app/nextcloud/data (on device /dev/mapper/system-nextcloud) still has 331 GiB (35%) space left (out of 933 GiB)!

[SUCCESS] Storage /home/yunohost.multimedia/accessy/audiobookshelf (on device /dev/mapper/system-audiobookshelf) still has 124 GiB (44%) space left (out of 279 GiB)!



=================================
System configurations (regenconf)
=================================



=================================
Applications (apps)
=================================

[SUCCESS] All installed apps respect basic packaging practices

Looking at the migration log, this bit stands out,


2025-01-18 22:48:52,161: INFO - [....................] > 0.0% Installing grub-pc
2025-01-18 22:48:52,963: DEBUG - grub-pc: Running grub-install ...
(...) 
2025-01-18 22:49:00,860: WARNING -   dpkg --configure -a
2025-01-18 22:49:00,958: WARNING - dpkg: error processing package grub-pc (--configure):
2025-01-18 22:49:00,959: WARNING -  installed grub-pc package post-installation script subprocess returned error exit status 1
2025-01-18 22:49:01,006: WARNING - Errors were encountered while processing:
2025-01-18 22:49:01,007: WARNING -  grub-pc

If you run dpkg --configure -a now, does the problem with grub-pc persist? Does another error pop up?

Both the rspamd-fix proposed in the linked thread and the migration depend on apt/dpkg.

Thanks for the help!

dpkg --configure -anow

Just confirming that command is correct. When I run it I get an error

root@@@@@:~# dpkg --configure -anow
dpkg: error: unknown option -n

Type dpkg --help for help about installing and deinstalling packages [*];
Use ‘apt’ or ‘aptitude’ for user-friendly package management;
Type dpkg -Dhelp for a list of dpkg debug flag values;
Type dpkg --force-help for a list of forcing options;
Type dpkg-deb --help for help about manipulating *.deb files;

Options marked [*] produce a lot of output - pipe it through ‘less’ or ‘more’ !

ok. I think I worked that out. I ran pkg --configure -a

root@@@@@:~# root@@@@@:~# dpkg --configure -a
Setting up grub-pc (2.06-13+deb12u1) …
grub-pc: Running grub-install …
Installing for i386-pc platform.
grub-install: error: unable to identify a filesystem in hostdisk//dev/sda; safet y check can’t be performed.
grub-install failure for /dev/sda
You must correct your GRUB install devices before proceeding:

DEBIAN_FRONTEND=dialog dpkg --configure grub-pc
dpkg --configure -a
dpkg: error processing package grub-pc (–configure):
installed grub-pc package post-installation script subprocess returned error ex it status 1
Errors were encountered while processing:
grub-pc

1 Like

I thought I found some threads of people with the same problem. It’s the same problem, and actually the same server!

On another forum a user solved the problem; you could give it a try.

If that does not solve the problem, please post the results of

$ sudo lsblk

and of

$ sudo fdisk -l

Please take the trouble to format your reply, so that it is easy to read for visitors of the forum; for example, use the </> button to format the output on your screen: