Tag: debian

Detect and Fix Proxmox file integrity issue

Detect and Fix Proxmox file integrity issue

The files can be easily corrupted if the Proxmox OS is installed on an USB device.

Detection

Because Proxmox uses Debian system, run following command to detect corruption

# dpkg --verify
??5?????? c /etc/apt/sources.list.d/pve-enterprise.list
??5?????? c /etc/lvm/lvm.conf
??5?????? c /etc/issue
# 

Above files can be ignored as reason below.

  • /etc/apt/sources.list.d/pve-enterprise.list: Not using enterprise repo
  • /etc/lvm/lvm.conf: LVM configuration file contains system specific info, such as UUIDs
  • /etc/issue: This file contains IP address of host

Fix

Find out the packages

# dpkg -S <list of file_name>

Reinstall the packages

apt --reinstall install <list of package_name>

References

Verify package using debsums

Verify package using debsums

Verify every installed package

debsums

Verify every installed package (including configuration files).

debsums -a

Verify installed packages and report errors only

debsums -s

Verify every installed package and report changed files only

debsums -c

Verify every installed package (including configuration files) and report changed files only.

debsums -ca

Verify every installed package and report changed configuration files only.

sudo debsums -ce

Verify specific package

debsums -a bash

Create mismatch list

dpkg-query -S $(sudo debsums -c 2>&1 | sed -e "s/.*file \(.*\) (.*/\1/g") | cut -d: -f1 | sort -u

To reinstall them

apt-get install --reinstall <package name>

References

How to verify installed packages