1. Boot Media

1.1. Download

1.2. Bootable USB

There are several ways to create a bootable USB device.

  • Note: Use a USB device of at least 2 GB to prevent cryptsetup installation failing due to no space left on device.

1.2.1. Hybrid Method

  • Note: The hybrid method does not allow to add extra files or folders to the USB device.

  • Attach the external USB device.

  • Enter the following commands at a Command Line.

    lsblk -l | grep -E "disk|part"
    sudo dd bs=4M if=/media/Windows/Images/Debian/Debian\ 12/debian-live-12.0.0-amd64-standard.iso of=/dev/sdX oflag=sync
    sudo dd bs=4M if=/media/Windows/Images/Debian/Debian\ 12/debian-live-12.0.0-amd64-xfce.iso of=/dev/sdX oflag=sync
    sudo dd bs=4M if=/media/Windows/Images/Debian/Debian\ 12/debian-12.0.0-amd64-DVD-1.iso of=/dev/sdX oflag=sync
    sudo dd bs=4M if=/media/Windows/Images/Debian/Debian\ 12/debian-12.0.0-amd64-netinst.iso of=/dev/sdX oflag=sync
    lsblk -l | grep -E "disk|part"
  • Detach the external USB device.

1.2.2. Rufus

Create a bootable USB device.

  • Start Rufus with administrative privileges.

  • Optional: Click Yes to allow Rufus to check for application updates online.

  • Attach the external USB device.

  • Select the external USB device.

  • Click SELECT.

  • 64-bit: Select the debian-11.6.0-amd64-DVD-1.iso file.

  • 64-bit Live: Select the debian-live-11.6.0-amd64-standard.iso file.

  • Click Open.

  • Select Partition scheme | MBR.

  • Select Target system | BIOS or UEFI.

    Device                          NO_LABEL (X:) [16 GB]
    Boot selection                  debian-live-11.6.0-amd64-standard.iso
    Boot selection                  debian-11.6.0-amd64-DVD-1.iso
    Persistent partition size       0 (No persistence)
    Partition scheme                MBR
    Target system                   BIOS or UEFI
    
    □ List USB Hard Drives
    □ Add fixs for old BIOSes (extra partition, align, etc.)
    □ Use Rufus MBR with BIOS ID
    
    Volume label                    Debian 11.6.0 amd64 1
    Volume label                    d-live 11.3.0 st amd64
    File system                     FAT32 (Default)
    Cluster size                    8192 bytes (Default)
    
    ■ Quick format
    ■ Create extended label and icon files
    □ Check device for bad blocks
  • Click START.

  • Choose Write in ISO Image mode (Recommended).

  • Click OK.

  • Optional: Click Yes to download the ldlinux.sys and ldlinux.bss files.

  • Click OK to confirm.

  • Click CLOSE.

  • Right-click the external USB device in the Notification Area and select Eject.

  • Detach the external USB device.

1.3. Additional drivers

1.4. Additional files

  • Add any additional files to the external USB device.

  • These are available during Debian in the /cdrom folder.

  • These are available during Debian Live in the /lib/live/mount/medium folder.

  • Start File Explorer.

  • Map the \\SMRU-SRV\Windows$ share to the W: drive.

  • Attach the external USB device.

  • Copy the latest stable Delta Linux Tools .deb package from the W:\Software\_Delta folder to the root folder of the external USB device.

  • Right-click the external USB device in the Notification Area and select Eject.

  • Detach the external USB device.

  • Close File Explorer.

2. Setup

2.1. Real Machine

2.1.1. Requirements

Linux computers expect the hardware clock to be set to GMT/UTC. Also, because the Debian operating system is going to be encrypted, it doesn’t make sense to automatically restart the computer after a power failure, because somebody has to type the passphrase. Two hard disks are needed for software RAID 1 type. The partition tables for both hard disks should ideally be identical or have the same LBA count. Using two identical hard disks makes the installation easy.

  • Note: Make sure that the firmware is configured to AC power off after AC power loss.

  • Note: Make sure that the firmware is configured to boot from the 1st hard disk.

  • Note: Make sure that the firmware system time is set GMT/UTC.

  • Note: Make sure that the computer has 2 identical solid state disks.

  • Note: Make sure that the two solid state disks have no SMART errors.

  • Note: Make sure that the computer is connected to the internet.

    • 10.10.1.0/24 (SMRU):

      • Make sure that the SMRU-EFW-MRM firewall has the MAC address in a direct internet access firewall rule.

      • Make sure that the Active Directory has the MAC address listed in the MAC-Addresses organizational unit.

    • 192.168.26.0/24 (smru-clinic):

      • Make sure that the Services | DHCP Server | Server configuration | Green interface | Settings | Allow only fixed leases checkbox is unchecked.

2.2. Hyper-V

2.3. VirtualBox

2.3.1. Create VirtualBox vm

  • Start VirtualBox.

  • Select the Debian group.

  • Select Group > New Machine.

  • Type Debian 10 for the Name.

  • Select Machine Folder | Other.

  • Select the V:\VirtualBox Quick\VirtualBox VMs folder.

  • Click Select Folder.

  • Select Type | Linux.

  • Select Version | Debian (64-bit).

    Name:                   Debian 10
    Machine Folder:         V:\VirtualBox Quick\VirtualBox VMs
    Operating System:       Linux
    Version:                Debian (64-bit)
  • Click Next.

    Memory size:            1024 MB
  • Click Next.

  • Choose Create a virtual hard disk now.

  • Click Create.

  • Choose VDI (VirtualBox Disk Image).

  • Click Next.

  • Choose Dynamically allocated.

  • Click Next.

    File Location:          V:\VirtualBox Quick\VirtualBox VMs\Debian\Debian 10\Debian 10
    Size:                   8.00 GB
  • Click Create.

  • Close VirtualBox.

2.3.2. Configure VirtualBox vm

  • Start VirtualBox.

  • Select the Debian > Debian 10 virtual machine.

  • Click Settings.

  • Select the General page.

    • Select the Advanced tab.

    • Select Shared Clipboard | Bidirectional.

  • Select the System page.

    • Select the Motherboard tab.

    • Uncheck Floppy.

    • Move Floppy down to the bottom.

    • Check Enable IO APIC.

    • Check Hardware Clock in UTC Time.

    • Select the Processor tab.

    • Select Processor(s) | 2.

  • Select the Storage page.

    • Select Controller: SATA > Debian 11.vdi.

    • Check Solid-state Drive.

  • Optional: Select the Storage page.

    • Select the Controller: SATA > Adds hard disk button.

    • Click Create new disk.

    • Choose VDI (VirtualBox Disk Image).

    • Click Next.

    • Choose Dynamically allocated.

    • Click Next.

      File Location:          V:\VirtualBox Quick\VirtualBox VMs\Debian\Debian 10\Debian 10-Disk2.vdi
      Size:                   8.00 GB
    • Click Create.

    • Select Controller: SATA > Debian 10-Disk2.vdi.

    • Check Solid-state Drive.

  • Select the Shared Folders page.

    • Click the Adds new shared folder button.

    • Select Folder Path | Other.

    • Select the D:\ folder.

    • Click Select Folder.

    • Check Auto-mount.

    • Type D: for the Mount point.

      Folder Path:            D:\
      Folder Name:            D_DRIVE
                              □ Read-only
                              ■ Auto-mount
      Mount point:            D:\
    • Click OK.

  • Click OK.

  • Close VirtualBox.

2.3.3. Prepare VirtualBox vm

  • Start VirtualBox.

  • Select the Debian > Debian 10 virtual machine.

  • Click Settings.

  • Select the Storage page.

    • Select Controller: IDE > Empty.

    • Click the Choose a virtual optical disk button.

    • Select Choose Virtual Optical Disk File.

    • Select the W:\Images\Debian folder.

    • Desktop: Select the debian-11.6.0-amd64-DVD-1.iso file.

    • LUKS Server: Select the debian-live-11.6.0-amd64-xfce.iso file.

    • Click Open.

  • Optional: Select the Network page.

    • Select the Adapter 1 tab.

    • Expand Advanced.

    • Click Port Forwarding.

    • Click the Adds new port forwarding rule button.

      Name       Protocol   Host IP    Host Port  Guest IP   Guest Port
      ---------- ---------- ---------- ---------- ---------- ----------
      SSH        TCP        127.0.0.1  2222       10.0.2.15  22
    • Click OK.

  • Click OK.

  • Close VirtualBox.

2.4. VMware

3. Desktop

3.1. Installation

3.1.1. Boot

  • Attach the Debian 11 installation media.

  • Boot the computer from the installation media.

  • Select Install and press Enter.

3.1.2. Language and locale

Step through the installation with the following choices.

  • Language: English - English

  • Country, territory or area: other

  • Continent or region: Asia

  • Country, territory or area: Thailand

  • Country to base default locale settings on: United States - en_US.UTF-8

  • Keymap to use: American English

Wait for the loading of the additional components to finish.

3.1.3. Host and domain name

Step through the installation with the following choices.

  • Hostname: <host name>

  • Domain name: <domain name>

  • Root password: level 1 password

  • Re-enter password to verify: level 1 password

  • Full name for the new user: SMRU

  • Username for your account: smru

  • Choose a password for the new user: level 2 password

  • Re-enter password to verify: level 2 password

  • Partitioning method: Manual

3.1.4. Finish

  • Wait for the installation of the base system to finish.

  • Scan extra installation media? No

  • Use a network mirror? No

  • Participate in the package usage survey? No

    Choose software to install:                     [*] Debian desktop environment
                                                    [ ] ... GNOME
                                                    [*] ... Xfce
                                                    [ ] ... GNOME Flashback
                                                    [ ] ... KDE Plasma
                                                    [ ] ... Cinnamon
                                                    [ ] ... MATE
                                                    [ ] ... LXDE
                                                    [ ] ... LXQt
                                                    [ ] web server
                                                    [*] SSH server
                                                    [*] standard system utilities
  • Select Continue and press Enter.

  • Install the GRUB boot loader to the master boot record? Yes

  • Device for boot loader installation: /dev/sda

  • Detach the boot medium.

  • Select Continue to reboot and press Enter.

3.2. OpenSSH Server

  • Log in as smru.

  • Right-click the desktop and select Open Terminal Here.

    su -
    echo ":: Configuring and updating repositories"
    # Back up original file if backup file is missing.
    file="/etc/apt/sources.list"
    if [ -f "${file}" ] && [ ! -f "${file}.org" ]; then cp -a "${file}" "${file}.org"; fi
    echo "deb http://deb.debian.org/debian buster main" >> "${file}"
    apt-get update
    apt-get install openssh-server
    ip a
    exit
  • Make a note of the IP address.

  • Now we can log in remotely with SSH and continue the configuration.

4. Server

  1. BIOS Debian 9/10 server without software RAID and without encryption.

  2. BIOS Debian 9/10 server with software RAID 1 and LUKS 1 encryption.

  3. Todo: BIOS Debian 9/10 server without software RAID but with LUKS 1 encryption.

  4. UEFI Debian 9/10 server without software RAID and without encryption.

  5. Todo: UEFI Debian 9/10 server without software RAID but with LUKS 1 encryption.

4.1. Automatic Installation

  • Note: Make sure to have internet connection.

  • Attach the debian-live-11.6.0-amd64-standard.iso boot medium.

  • Boot the computer from the boot medium.

  • Select Debian GNU/Linux Live (kernel 5.10.0-20-amd64) and press Enter.

  • Ethernet: Connect to SMRU LAN outlet.

  • Wireless: Connect to smru-clinic SSID.

  • Enter the following commands at a Command Line.

    sudo apt-get update
    sudo apt-get --yes install openssh-server
    sudo systemctl start ssh
    ip a
  • Remote to Debian Live with PuTTY using the IP address from the ip a command.

  • Log in as user with the default live password.

  • Enter the following commands at a Command Line.

    sudo su -
    fdisk -l /dev/sda
    fdisk -l /dev/sdb
    
    # Install required packages.
    apt-get --yes install debootstrap
    
    # Create Debian tarball.
    tarball=/tmp/debian-rootfs.tgz
    rm -rf /tmp/target $tarball
    mkdir -p /tmp/target
    debootstrap --arch=amd64 --exclude=isc-dhcp-client,isc-dhcp-common --keep-debootstrap-dir \
      --make-tarball=$tarball bullseye /tmp/target
    
    # Get architecture, distro and latest Debian point release information.
    tar xfz "${tarball}" --directory=/tmp/target --wildcards var/cache/apt/archives/base-files*.deb
    dpkg-deb -x /tmp/target/var/cache/apt/archives/base-files_*.deb /tmp/target
    ARCH="$(ls /tmp/target/var/cache/apt/archives/dash* | sed -e 's/^.*_\(.*\)\.deb$/\1/')"
    ARCH="$(echo "${ARCH}" | sed -e 's/i386/x86/' | sed -e 's/amd64/x64/')"
    DISTRO="$(cat /tmp/target/debootstrap/suite)"
    if [ -z "${DISTRO}" ]; then
      DISTRO="$(grep -i '^VERSION=' /tmp/target/usr/lib/os-release | sed -e 's/^.*(\(.*\))"$/\1/')"
    fi
    RELEASE="$(cat /tmp/target/etc/debian_version)"
    RELEASE="$(echo "${RELEASE}" | sed -e 's|bullseye/sid|11|')"
    rm -rf /tmp/target
    # Add architecture, distro and Debian point release info to tarball name.
    /bin/mv "${tarball}" "/tmp/debian-${RELEASE}-${DISTRO}-rootfs-${ARCH}.tgz"
    # List tarballs.
    ls -al /tmp/debian-*rootfs-*.tgz
    
    # Install latest stable Delta Linux Tools.
    scp -p smru@10.10.1.2:/media/Windows/Software/_Delta/delta-linux-tools-1.9.1-1-all.deb /tmp
    dpkg -i /tmp/delta-linux-tools-1.9.1-1-all.deb
    
    # Optional: Install latest unstable Delta Linux Tools.
    scp -p smru@10.10.1.2:/media/Windows/Software/_Delta/delta-linux-tools-1.9.2beta-1-all.deb /tmp
    dpkg -i /tmp/delta-linux-tools-1.9.2beta-1-all.deb
    
    # Optional: VirtualBox vm.
    scp.exe -p -P 2222 W:\Software\_Delta\delta-linux-tools-1.9.1-1-all.deb user@localhost:/tmp
    scp.exe -p -P 2222 W:\Software\_Delta\delta-linux-tools-1.9.2beta-1-all.deb user@localhost:/tmp
    # Real computer.
    host=<host name>
    domain=smru.shoklo-unit.com
    tarball=/tmp/debian-$RELEASE-$DISTRO-rootfs-$ARCH.tgz
    ls -al $tarball
    
    # VirtualBox.
    host=vbox-debian
    domain=vbox.shoklo-unit.com
    tarball=/tmp/debian-$RELEASE-$DISTRO-rootfs-$ARCH.tgz
    
    # BIOS: Debian server with no software RAID and with no encryption.
    install-debian-server --zap $host $domain $tarball
    
    # BIOS + LUKS: Debian server with no software RAID and with LUKS 1 encryption.
    install-debian-server --encryption LUKS1 --zap $host $domain $tarball
    
    # BIOS + RAID: Debian server with software RAID 1 and with no encryption.
    install-debian-server --raid RAID1 --zap $host $domain $tarball
    
    # BIOS + RAID + LUKS: Debian server with software RAID 1 and with LUKS 1 encryption.
    install-debian-server --distro Bullseye --encryption LUKS1 --raid RAID1 --zap $host $domain $tarball
    
    # UEFI: Debian server with no software RAID and with no encryption.
    install-debian-server --firmware UEFI --zap $host $domain $tarball
    
    # UEFI + LUKS: Debian server with no software RAID and with LUKS 1 encryption.
    install-debian-server --firmware UEFI --encryption LUKS1 --zap $host $domain $tarball
    
    # UEFI + RAID: Debian server with software RAID 1 and with no encryption.
    install-debian-server --firmware UEFI --raid RAID1 --zap $host $domain $tarball
    
    # UEFI + RAID + LUKS: Debian server with software RAID 1 and with LUKS 1 encryption.
    install-debian-server --firmware UEFI --distro Bullseye --encryption LUKS1 --raid RAID1 --zap $host $domain $tarball
  • Optional: Type the passphrase and press Enter.

  • Optional: Type the passphrase and press Enter.

  • Verify installation settings.

  • Press Enter to continue.

  • Press Enter to continue.

  • Verify installation settings.

  • Press Enter to continue.

  • Wait about 30 minutes for the installation to finish.

  • Shutdown the computer.

  • Detach the boot medium.

4.2. Automatic Configuration

Because the computer does not have a graphical desktop it is not easy to connect to the smru-clinic wifi like before during the installation. But we can connect the computer to the smru-clinic with an ethernet cable.

  • Start the computer.

  • Log in as smru with the default live password.

  • Enter the following commands at a Command Line.

    tmux
    sudo su -                               # Get root privileges.
    passwd                                  # Set root password to level 1.
    passwd smru                             # Set smru password to level 2.
    exit
    
    sudo smru config systemd-ethernet       # Install and configure dhcp ethernet network.
    
    # Install some general packages required by luks.
    sudo apt-get install ntfs-3g unzip wget
    
    sudo apt-get install zerofree                   # Virtual machines only.
    
    sudo smru install apcups                        # Real machines only.
    sudo smru install exim
    sudo smru install luks-triple-unlock            # Real machines only.
    sudo smru install smartmontools                 # Real machines only.
    sudo smru install sudo                          # Install and configure sudo for each user.
    sudo smru install vim                           # Install and configure vim editor for each user.
    
    sudo smru config apcups                         # Real machines only.
    sudo smru config exim
    sudo smru config luks-triple-unlock eth0        # Real machines only.
    sudo smru config smartmontools                  # Real machines only.
    sudo smru config sudo
    sudo smru config vim                            # Install and configure vim editor for each user.
  • Optional: Enter the following commands at a Command Line.

    sudo smru install apache
    sudo smru install php
    sudo smru install postgresql
    sudo smru install samba
    
    sudo smru install anc-application
    sudo smru install jre-headless
    sudo smru install symmetricds
    
    sudo smru config apache
    sudo smru config php
    sudo smru config postgresql
    sudo smru config samba
    
    sudo smru config anc-application
    sudo smru config symmetricds                                            <TODO>

4.3. Manual Installation

  • Attach the debian-11.6.0-amd64-xfce-CD-1.iso boot medium.

  • Boot the computer from the boot medium.

  • Optional: Click Cancel in the Select start-up disk popup.

  • Select Install and press Enter.

Step through the installation with the following choices.

  • Language: English - English

  • Country, territory or area: other

  • Continent or region: Asia

  • Country, territory or area: Thailand

  • Country to base default locale settings on: United States - en_US.UTF-8

  • Keymap to use: American English

  • Wait for the loading of the additional components to finish.

  • Partitioning:

  • Wait for the installation of the base system to finish.

  • Use a network mirror? No

  • Participate in the package usage survey? No

    Choose software to install:                     [ ] Debian desktop environment
                                                    [ ] ... Xfce
                                                    [*] standard system utilities
  • Choose software to install: Continue

  • BIOS: Install the GRUB boot loader to the master boot record? Yes

  • BIOS: Device for boot loader installation: /dev/sda

  • Detach the boot medium.

  • Select Continue to reboot and press Enter.

4.4. Manual Configuration

Depending on whether sudo is already installed, either type su - or sudo su - to obtain a Command Line with root privileges. Optionally, at a Command Line with root privileges, type the passwd command to set the root password.

All SMRU installations have a root account with the level 1 password and an smru standard user account with the level 2 password.

Windows Subsystem for Linux installations have an smru standard user account with the level 2 password. The password of the root account is unknown but sudo is installed to obtain root privileges.

Debian Live has a default user account with password live.

4.4.1. Snapshots

  • Log in as standard user.

  • Enter the following commands at a Command Line with root privileges.

cd /
mkdir -p /snapshots
dpkg -l | sed -e 's/   .*//g' > /snapshots/packages-0.txt
tar -cpzf /snapshots/root-0.tgz --exclude=/home --exclude=/snapshots --exclude=/tmp --one-file-system /
  tar: Removing leading `/' from member names
  tar: Removing leading `/' from hard link targets
  tar: /var/agentx/master: socket ignored
  tar: /var/lib/samba/winbindd_privileged/pipe: socket ignored
  tar: /var/lib/samba/private/smbd.tmp/msg/msg.1276: socket ignored
  tar: /var/lib/samba/private/smbd.tmp/msg/msg.1133: socket ignored
  tar: /var/lib/samba/private/smbd.tmp/msg/msg.20907: socket ignored
  tar: /var/lib/samba/private/smbd.tmp/msg/msg.29221: socket ignored
  tar: /var/lib/samba/private/smbd.tmp/msg/msg.1230: socket ignored
  tar: /var/lib/samba/private/smbd.tmp/msg/msg.1217: socket ignored
  tar: /var/lib/samba/private/smbd.tmp/msg/msg.1126: socket ignored
  tar: /var/lib/samba/private/smbd.tmp/msg/msg.1241: socket ignored
  tar: /var/lib/samba/private/smbd.tmp/msg/msg.10205: socket ignored
  tar: /var/lib/samba/private/smbd.tmp/msg/msg.1244: socket ignored
  tar: /var/lib/samba/private/smbd.tmp/msg/msg.1203: socket ignored
  tar: /var/lib/samba/private/smbd.tmp/msg/msg.1120: socket ignored
  tar: /var/lib/samba/private/smbd.tmp/msg/msg.1229: socket ignored
  tar: /var/lib/samba/private/smbd.tmp/msg/msg.8723: socket ignored
  tar: /var/lib/samba/private/smbd.tmp/msg/msg.1514: socket ignored
  tar: /var/lib/samba/private/smbd.tmp/msg/msg.30238: socket ignored
  tar: /var/lib/samba/private/smbd.tmp/msg/msg.1489: socket ignored
  tar: /var/lib/samba/private/smbd.tmp/msg/msg.1479: socket ignored
  tar: /var/lib/samba/private/smbd.tmp/msg/msg.1567: socket ignored
  tar: /var/lib/samba/private/smbd.tmp/msg/msg.1158: socket ignored
  tar: /var/lib/samba/private/smbd.tmp/msg/msg.1275: socket ignored
  tar: /var/lib/samba/private/smbd.tmp/msg/msg.27436: socket ignored
  tar: /var/lib/samba/private/smbd.tmp/msg/msg.1414: socket ignored
  tar: /var/lib/samba/private/smbd.tmp/msg/msg.1292: socket ignored
  tar: /var/lib/samba/private/smbd.tmp/msg/msg.25351: socket ignored
  tar: /var/lib/samba/private/smbd.tmp/msg/msg.1174: socket ignored
  tar: /var/lib/samba/private/smbd.tmp/msg/msg.14407: socket ignored
  tar: /var/lib/samba/private/smbd.tmp/msg/msg.1277: socket ignored
  tar: /var/lib/samba/private/smbd.tmp/msg/msg.1128: socket ignored
  tar: /var/lib/samba/private/smbd.tmp/msg/msg.1262: socket ignored
  tar: /var/lib/samba/private/smbd.tmp/msg/msg.1150: socket ignored
  tar: /var/lib/samba/private/smbd.tmp/msg/msg.1260: socket ignored
  tar: /var/lib/samba/private/smbd.tmp/msg/msg.374: socket ignored
  tar: /var/cache/samba/msg/1277: socket ignored
  tar: /var/cache/samba/msg/1279: socket ignored
  tar: /var/cache/samba/msg/1321: socket ignored
  tar: /var/cache/samba/msg/1307: socket ignored
  tar: /var/cache/samba/msg/1278: socket ignored

4.4.2. RAID

  • Enter the following commands at a Command Line with root privileges.

grub-install /dev/sda
grub-install /dev/sdb

cat /etc/mdadm/mdadm.conf
cat /proc/mdstat

4.4.3. Date and time

  • Enter the following commands at a Command Line with root privileges.

cat /etc/timezone               # verify time zone
hwclock
date                            # verify date and local time
# date --set YYYY-MM-DD         # adjust date
# date --set HH:MM              # adjust local time
cat /etc/adjtime
  • Restart the computer when the /etc/adjtime file does not exist.

  • Make sure that the /etc/adjtime file contains the UTC line.

  • Enter the following commands at a Command Line with root privileges.

cp -a /etc/environment /etc/environment.org
echo "TIME_STYLE='+%Y-%m-%d %H:%M:%S'" >> /etc/environment
cat /etc/environment

4.4.4. Repositories

  • Enter the following commands at a Command Line with root privileges.

cp -a /etc/apt/sources.list /etc/apt/sources.list.org
cat << EOF > /etc/apt/sources.listx
deb http://deb.debian.org/debian stretch-backports main contrib non-free
deb http://deb.debian.org/debian stretch main contrib non-free
deb http://deb.debian.org/debian stretch-updates main contrib non-free
deb http://security.debian.org/debian-security stretch/updates main contrib non-free
EOF
  • Enter the following commands at a Command Line with root privileges.

cat /etc/debian_version
apt-get update
apt-get upgrade
apt-get dist-upgrade
apt-get autoremove

grep -Ei --color 'crit|erro|fail|warn' /var/log/apt/term.log
  • Restart the computer.

4.4.5. Sudo

  • Enter the following commands at a Command Line with root privileges.

apt-get install sudo
cp -a /etc/sudoers /etc/sudoers.org
# Allow usage of sudo
adduser smru sudo
# Make vim the default editor
update-alternatives --set editor /usr/bin/vim.tiny
# Force sudo to ask for the root password
sed -i 's/^Defaults\tenv_reset$/Defaults\tenv_reset, rootpw/' /etc/sudoers
cat /etc/sudoers
  • Log out and log in as standard user.

4.4.6. SSH server

  • Enter the following commands at a Command Line.

sudo apt-get install openssh-server
sudo apt-get install tmux
sudo cp -a /etc/ssh/sshd_config /etc/ssh/sshd_config.org
sudo sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/' /etc/ssh/sshd_config
sudo sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config
sudo /etc/init.d/ssh restart
ip address
  • Connect to the computer with PuTTY or ssh.

4.4.7. Firmware

  • Enter the following commands at a Command Line.

sudo apt-get install firmware-linux-free
  • Restart the computer.

4.4.8. Packages

  • Enter the following commands at a Command Line.

sudo apt-get install anacron
sudo apt-get install ntfs-3g
sudo apt-get install ntp
sudo apt-get install p7zip p7zip-full
sudo apt-get install unzip

4.4.9. Paper size

  • Enter the following commands at a Command Line.

sudo cp -a /etc/papersize /etc/papersize.org
sudo sed -i 's/letter/a4/' /etc/papersize

4.4.10. Other configurations

4.4.11. Other installations

sudo mount -t cifs -o iocharset=utf8,username=Douwe,domain=SMRU,vers=2.0 //SMRU-SRV/Teams$ /mnt
dir /mnt
sudo umount /mnt

sudo mount -t cifs -o credentials=/root/.smbcred-Teams,iocharset=utf8,username=winaccess,domain=SMRU,vers=2.0 //SMRU-SRV/Teams$ /mnt
dir /mnt
sudo umount /mnt

sudo mount -t cifs -o credentials=/root/.smbcred-Teams,iocharset=utf8,vers=2.0 //SMRU-SRV/Teams$ /mnt
dir /mnt
sudo umount /mnt

sudo mount -t cifs -o credentials=/root/.smbcred-Windows,iocharset=utf8,vers=2.0 //SMRU-HyperV01/Windows$ /mnt
dir /mnt
sudo umount /mnt

sudo mount -t cifs -o credentials=/root/.smbcred-Windows,iocharset=utf8,vers=2.0 //SMRU-HyperV01/Windows$ /media/Windows
dir /mnt
sudo umount /media/Windows

# The following with "vers=3.0" is not working !!!
sudo mount -t cifs -o credentials=/root/.smbcred-Windows,iocharset=utf8,vers=3.0 //SMRU-HyperV01/Windows$ /media/Windows
dir /mnt
sudo umount /media/Windows
ls -al /media

If 0 instead of 4096 then do a umount /media/<folder>.