Debian packages

Repository key not available

Keys sometimes expire!

Err:2 http://ftp.it.debian.org/debian testing InRelease
Le seguenti firme non sono state verificate perché la chiave pubblica non è disponibile: NO_PUBKEY 9D6D8F6BC857C906

With Debian, it's possible to reinstall the package with all keys using the command

apt-get install debian-archive-keyring

or get a new key just using the command

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys KEY_SIG

for example

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9D6D8F6BC857C906

Cannot upgrade or remove a very old package?

Use the commands:
cd /var/cache/apt/archives     #to enter the directory with all deb archives

dpkg -D777 -r ARCHIVENAME  #to remove a package, with debug information

dpkg -D777 -i ARCHIVENAME-version-arch.deb  #to install it

With these commands you can know exactly where is the problem. Often, the info file for the old archive does not longer exist, so you have to edit the script file (for example /var/lib/dpkg/info/coreutils.prerm ) adding || true to bypass the error (for example install-info --remove INFOFILE || true )

Postfix + Amavis + Spamassassin + Dovecot

Is postfix very slow to process a huge mail queue?

  • Check that virus scanning is not too slow. If it's slow, don't use clamscan (very slow) but prefer clamdscan (clamav-daemon): it requires a lots of memory but it's much more faster than clamscan!
  • You can also increase max_servers value on /usr/sbin/amavisd-new to get more than 2 processes for mail scanning (then, increase local smptd on port 10025 or similar, in /etc/postfix/main.cf)

Recupero menù grub

From https://wiki.ubuntu-it.org/AmministrazioneSistema/Grub/Ripristino/GrubShell

Nell'esempio si suppone di essere in presenza di un unico disco /dev/sda con tabella di partizionamento GPT e si voglia impostare come predefinito all'avvio il sistema nella partizione /dev/sda3.

  1. All'avvio verrà visualizzato il prompt dei comandi di GRUB. Per avere a disposizione la lista delle partizioni digitare:

    ls

    Verrà restituito qualcosa del tipo:

    (proc) (hd0) (hd0,gpt5) (hd0,gpt4) (hd0,gpt3) (hd0,gpt2) (cd0)

    dove le sigle gpt2, gpt3, ecc.. indicano rispettivamente le partizioni /dev/sda2, /dev/sda3 e così via.

  2. In questa fase si tratta di impostare l'accesso (temporaneo, non definitivo) al menù GRUB di uno dei sistemi presenti sul disco. Se vogliamo accedere al menù GRUB del sistema installato in /dev/sda3, cioè la partizione individuata da (hd0,gpt3), dovranno essere digitati i comandi:

    set prefix=(hd0,3)/boot/grub
    set root=(hd0,3)
  3. A questo punto per poter caricare l'interfaccia del menù GRUB, digitare:

    insmod normal
    normal

    Apparirà il classico menù GRUB in cui il sistema in /dev/sda3 risulterà in cima alla lista.

  4. Avviare quindi il sistema in /dev/sda3 e fare login.

  5. Installare GRUB e rendere l'attuale sistema il predefinito all'avvio, digitando nel terminale:

    sudo grub-install /dev/sda
  6. Aggiornare la lista dei sistemi all'avvio digitando nel terminale il comando:

    sudo update-grub

Default password

Aethra BG1242Wn router + SIP + BRI (ISDN) + FXS

Username: admin

Password: nothing

Can be accessed on port 80 (http), telnet and ssh