Installation

Install ISO image

  1. Test your hardware compatibility with a Debian Live system, then do a manual install from the same image to a new SSD
  2. Partition manually, allocate 32GB to swap and the remaining space to /
  3. Data drives must be set to RAID, LVM, CRYPT in this order. For my use cases LUKS on LVM is the best scenario.
  4. If you set data drives, the installer request to encrypt swap space. Do it, then remove the swap encryption after booting into the system.
  5. Set manual static IP address in Network Manager for main NIC and reboot
  6. Update repositories and apps
    apt-get update
    apt-get upgrade
  7. Copy “.bashrc” from user account to /root, modify prompt color from 0;32 (green) to 0;31 (red)
  8. Check your locale settings
    locale -a
  9. Install the required locales
    dpkg-reconfigure locales
  10. Change dhcp to static in file /etc/network/interfaces, or remove the entry for the interface you want to manage with wicd or network manager, to avoid dhcp-client to assign a dynamic ip during boot. Do not add further interface information, do this in wicd or network manager
    sudo vim /etc/network/interfaces
    iface eth0 inet manual

Root and SSH access

  1. Add user to sudoers group and set sudo user permissions (type exactly as indicated)
    sudo adduser <user> sudo
  2. Logout and Login again
  3. Disable root account, vim /etc/passwd, replace the following line with the one below
    root:x:0:0:root:/root:/bin/bash
    root:x:0:0:root:/root:/usr/sbin/nologin
  4. Install SSH Access

Connect existing data volumes

  1. Mount LVM volumes, first check filesystem type
    file -sL /dev/sda1 or file -sL /dev/vg_group/lv_volume
  2. Add fstab entry to mount during system boot for unencrypted volumes
    /dev/vg_group/lv_volume /home ext4 noatime,user_xattr 0 0

Install Software

  1. Install
    sudo apt install vim
    sudo apt install smartmontools
    sudo apt install iotop
    sudo apt install rsync
    sudo apt install zip
    sudo apt install wget
  2. Usage
    smartctl --health /dev/sda

Autostart Apps

  1. Set up rc.local to autostart scripts at boot time

Remove Applications

LibreOffice

sudo apt-get remove --purge libreoffice*
sudo apt-get clean
sudo apt-get autoremove

Firmware

You might first need to add the firmware repositories to get acceptable graphics output. For example, you are installing on a machine with an old graphics card, but a new monitor. In one of my installs the XFCE desktop will boot, but the screen resolution is off, and the fonts are hardly readable. LXQt desktop will not boot into a graphics desktop at all, the machine drops into a terminal during boot.

  • Add to or create file /etc/apt/sources.list.d/firmware.list, and add the contrib and non-free repositories.
    # replace the following repositories (http://mirror.kku.ac.th) with the ones you are using
    # use buster for Debian 10 or stretch for Debian 9
    deb http://mirror.kku.ac.th/debian/ buster non-free contrib
    deb-src http://mirror.kku.ac.th/debian/ buster non-free contrib
  • Save and exit
  • Update apt and install the firmware
    sudo apt update
    sudo apt install firmware-linux firmware-linux-nonfree
  • Check display hardware and install hardware specific firmware (see below)
    lspci -vnn | grep VGA
  • You also might need to reset the display settings. Look for a folder within ~/.config, for example xfce4, and rename it from an ssh shell when logged out from the graphical desktop, then login again.

AMD Graphic Cards

nVidia Graphic Cards

Realtek

  • Install Realtek NIC drivers
    sudo apt-get install firmware-realtek

Aquantia

  • Aquantia AQC107 firmware is not in the repositories
  • Download the driver from Aquantia
  • Unpack, then configure the adapter defaults, and build the driver code
    tar zxf atlantic.tar.gz
    mv Linux ~/Drivers/Aquantia
    cd ~/Drivers/Aquantia
    vim aq_cfg.h
    #define AQ_CFG_IS_LRO_DEF 0U /* change from 1U to 0U */
    sudo apt-get install build-essential gawk dkms
    sudo apt-get install linux-headers-`uname -r`
    cd ~/Drivers/Aquantia
    sudo ./dkms.sh install
  • Verify the driver location and that the driver is loaded
    /lib/modules/`uname -r`/updates/dkms/atlantic.ko
    lspci -v
  • Uninstall the driver:
    sudo ./dkms.sh uninstall

Exclude package from upgrade

Sometimes it is helpful to exclude a package from upgrading. Virtualbox, for example, requires the GUI on the client to be used after version upgrade to upgrade and install the guest addtions, so sometimes it's better to not upgrade the package while you don't have physical access to the client. You can exclude and include with the following commands:

sudo apt-mark hold virtualbox-6.1
sudo apt-mark unhold virtualbox-6.1