====== Installation ====== This is a migration scenario. I set up the new machine first with the new Debian system, then move the data drives from the old server. For initial setup I create a 5GB Home mount point, which will later be replaced with the one on the data drives from the old server. ===== Install ISO image ===== - Test your hardware compatibility with a [[https://www.debian.org/CD/live/|Debian Live]] system, then [[https://www.debian.org/distrib/|download]] and do a manual install from the image file on a USB-stick - Partition manually on System Drive 1: partitions ESP (500MB), RAID (127.5GB) - Partition manually on System Drive 2: partitions ESP (500MB), RAID (127.5GB), Home (5GB), Swap (remaining) ===== Graphics driver ===== Since I'm installing an old technology low performance quiet graphics card, I need to setup access for Xorg first. - After booting into the installed system the screen goes blank - Enter a tty terminal with Ctrl-Alt-F1 and login - Add file ''20-nouveau.conf'' to ''/etc/X11/xorg.conf.d/'' containing:Section "Device" Identifier "Nvidia card" Driver "nouveau" EndSection - Do not install nVidia's proprietary drivers, see [[https://www.youtube.com/watch?v=EFjidHx_RMA&t=192s|Debian Linux – Uninstall NVIDIA Driver & Reinstall Nouveau Driver (Step-by-Step)]] if you already did, and google //use nouveau xorg// on an AI enabled browser ===== Next steps ===== - Data drives must be set to RAID, LVM, CRYPT in this order. For my use cases LUKS on LVM is the best scenario. - If you set data drives, the installer request to encrypt swap space. Do it, then remove the swap encryption after booting into the system. - Set manual static IP address in Network Manager for main NIC and reboot - Update repositories and appsapt-get update apt-get upgrade - Copy ".bashrc" from user account to /root, modify prompt color from 0;32 (green) to 0;31 (red) - Check your locale settingslocale -a - Install the required localesdpkg-reconfigure locales - 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 ===== - Add user to sudoers group and set sudo user permissions (type exactly as indicated)sudo adduser sudo - Logout and Login again - Disable root account, vim /etc/passwd, replace the following line with the one belowroot:x:0:0:root:/root:/bin/bash root:x:0:0:root:/root:/usr/sbin/nologin - Install [[deb9:ssh|SSH Access]] ===== Virtualbox 7.1 ===== - Import the GPG key: ''wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/virtualbox.gpg'' - Add the repository: ''sudo sh -c 'echo "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian bookworm contrib" >> /etc/apt/sources.list.d/virtualbox.list''' - Update package lists: ''sudo apt update'' - Install VirtualBox: ''sudo apt install virtualbox-7.1'' - Install the VirtualBox Extension Pack: ''sudo apt install virtualbox-ext-pack'' ===== LVM ===== - Install the lvm2 package: sudo apt install lvm2 - Enable and start the LVM service: sudo systemctl enable lvm2-lvmetad sudo systemctl start lvm2-lvmetad ===== LUKS ===== - Install:sudo apt install cryptsetup ===== OpenVPN ===== - Install:apt install openvpn ===== Connect existing data volumes ===== - Mount LVM volumes, first check filesystem typefile -sL /dev/sda1 or file -sL /dev/vg_group/lv_volume - Add fstab entry to mount during system boot for unencrypted volumes/dev/vg_group/lv_volume /home ext4 noatime,user_xattr 0 0 - Add [[deb9:encrypted|Encrypted partitions/folders with auto-mount]] ===== Install Software ===== - Installsudo apt install vim sudo apt install smartmontools sudo apt install iotop sudo apt install rsync sudo apt install zip sudo apt install wget - Usagesmartctl --health /dev/sda ===== Autostart Apps ===== - Set up [[deb9:setup|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 ===== 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 ===== Links ===== * [[https://stackoverflow.com/questions/44797694/where-is-rc-local-in-debian-9-debian-stretch|Where is rc.local in Debian 9 (Debian Stretch)]] * [[https://unix.stackexchange.com/questions/374012/how-to-manage-startup-applications-in-debian-9|How to manage startup applications in Debian 9?]]