Difference between revisions of "Installing Debian 12.9.0"

From Applied Optics Wiki
Jump to: navigation, search
Line 4: Line 4:
 
* Download [https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-12.9.0-amd64-netinst.iso debian-12.9.0-amd64-netinst.iso] - if this link is broken find another one! Mount as boot iso on a USB stick, e.g. you can use RUFUS on windows to do this or dd on linux. Skip if someone has provided a pre-configured stick to you.
 
* Download [https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-12.9.0-amd64-netinst.iso debian-12.9.0-amd64-netinst.iso] - if this link is broken find another one! Mount as boot iso on a USB stick, e.g. you can use RUFUS on windows to do this or dd on linux. Skip if someone has provided a pre-configured stick to you.
 
* List of installed software by you and others who use the PC and backup locally (i.e. on USB drives and not on network drives) - skip if new PC
 
* List of installed software by you and others who use the PC and backup locally (i.e. on USB drives and not on network drives) - skip if new PC
* Make note of your ''computer name''/<code>hostname</code> and <code>IP address</code> - talk to Rikesh or Matt if new PC
+
* Make note of your <code>IP address</code> and <code>hostname</code> (this is the same as your ''computer name'')  - talk to Rikesh or Matt if new PC
 +
* IMPORTANT: Print two labels - one with your <code>IP address</code> and one with your <code>hostname</code> - stick it on the front+top of your PC so that it is clearly visible to all users
 
* Change boot order from BIOS to boot from [USB HDD] or [USB CD-ROM] depending on what turns up - '''very''' relevant for new PCs - talk to Rikesh or Matt
 
* Change boot order from BIOS to boot from [USB HDD] or [USB CD-ROM] depending on what turns up - '''very''' relevant for new PCs - talk to Rikesh or Matt
  

Revision as of 12:58, 20 March 2025

Pre-installation checklist

  • Download debian-12.9.0-amd64-netinst.iso - if this link is broken find another one! Mount as boot iso on a USB stick, e.g. you can use RUFUS on windows to do this or dd on linux. Skip if someone has provided a pre-configured stick to you.
  • List of installed software by you and others who use the PC and backup locally (i.e. on USB drives and not on network drives) - skip if new PC
  • Make note of your IP address and hostname (this is the same as your computer name) - talk to Rikesh or Matt if new PC
  • IMPORTANT: Print two labels - one with your IP address and one with your hostname - stick it on the front+top of your PC so that it is clearly visible to all users
  • Change boot order from BIOS to boot from [USB HDD] or [USB CD-ROM] depending on what turns up - very relevant for new PCs - talk to Rikesh or Matt

Installation screens

I. Boot setup

  • Interrupt the normal booting procedure for the computer - common keys for entering BIOS or boot menu are Enter/F1/F2/F11/F12/Del. If on a Lenovo PC press Enter when the Lenovo boot splash screen turns up, enter the BIOS Setup Utility menu by pressing F1 and arrow to the Startup sub-menu. Enter into the Primary Boot Sequence; + the USB drive to the top of the queue. Save and exit with F10.
  • If you cannot see the boot or setup menu, you may need to plug your screen into the GPU output rather than the motherboard output (or vice versa).

II. Install menu

  • The Debian splash screen should show up, select install Graphical install

1. Language

  • Select language English, United Kingdom, and British English - it will now do an initial harware/network configuration (1min)
  • The USB may fail as the installer thinks the drive is CD drive - if this happens try moving the USB drive to a port on the back of the PC

2. Configure network

  • The network autoconfiguration will fail - this is fine. Continue and select Configure network manually
  • Enter your PC's IP address (see earlier)
  • Enter 255.255.255.0 for the netmask
  • Enter 128.243.74.254 for the gateway
  • Enter 128.243.21.19 for the nameservers (DNS)
  • Enter your computer name as the hostname (this may be filled in for you already!)
  • Enter applied_optics as the domain name
  • Do not set a root password - just leave blank and click continue
  • Enter local_hostname for the user's name and username
  • You should already been advised what the user password should be, if not ask!
  • The install will then start looking for disks

3. Formatting Disks

  • Warning this will wipe Windows!
  • For partitioning select Manual
  • Double-click your primary hard drive which should firstly be an NVMe drive (e.g. /dev/nvme01)
  • Select 'Yes' for wiping and do the same for any other hard drives you want to wipe - make sure you DO NOT wipe your USB drive
  • Select the FREE SPACE partition under your first hard drive and 'Create a new partition' - the Automatically partition the free space option creates sensible partitions but if you require something more specialist you should already know how to set this up
  • Select All files in one partiion - you should end up with a bootable partition in #1 (~500MB), your root / directory in #2, and swap in #3 (~1.0GB),
  • Partition your second/additional hard drives to wherever you want/need to (i.e. /eee) - this time Create a new partition' - set the partition size to max - to change the mount point enter manually /eee, click on Done setting up' and click on Finish partitioning and write changes to disk - select Yes to write changes to disks,
  • The installation will begin. (2mins)

4. Complete installation

  • To configure the package manager, select United Kingdom, select the top option for the software repository (e.g. deb.debian.org), and leave the proxy entry blank
  • Software and updates will start installing (1min)
  • For software popularity context select No,
  • Unselect Debian desktop environment and GNOME Flashback - select KDE Plasma and SSH server
  • It will then continue installing (5mins)
  • Click continue to reboot (you can pull out the USB drive after it has restarted)

Nvidia drivers

You might notice that once you log in (using local_[hostname] and password from earlier, the framerate will tank - this is because the default nouveau drivers does not work well with your Nvidia card and newer Wayland display protocol. You have two options:

1. Before login, change the Desktop Session in bottom left to Plasma (X11) (not recommended for long term)

2. Install Nvidia drivers - follow the steps below for this:

  • Firstly you must turn off Secure boot in the bios or enrol your system key [1] - if you do not, you will get a 'Failed to start Nvidia persistence daemon' error at startup
  • Enter the commands below to install the drivers:
sudo apt update 
sudo apt upgrade 
sudo apt install software-properties-common -y
sudo add-apt-repository main contrib non-free non-free-firmware
sudo apt update
sudo apt upgrade
sudo apt install linux-headers-amd64 nvidia-kernel-dkms -y
  • The install will complain about nouveau, click ok to replace - continue with the following commands:
echo 'options nvidia-drm modeset=1' | sudo tee -a /etc/modprobe.d/nvidia-options.conf > /dev/null
echo 'options nvidia NVreg_PreserveVideoMemoryAllocations=1' | sudo tee -a /etc/modprobe.d/nvidia-options.conf > /dev/null
sudo reboot
  • You should now be able to use the default Wayland protocol for the display

Getting on the OPG network

echo 'applied_optics' | sudo tee -a /etc/defaultdomain > /dev/null
echo 'domain applied_optics server 128.243.74.2' | sudo tee -a /etc/yp.conf > /dev/null
echo 'ypserver 128.243.74.2' | sudo tee -a /etc/yp.conf > /dev/null
sudo sed -i 's/passwd: /passwd: compat nis /g' /etc/nsswitch.conf 
sudo sed -i 's/group: /group: compat nis /g' /etc/nsswitch.conf 
sudo sed -i 's/shadow: /shadow: compat /g' /etc/nsswitch.conf 
sudo sed -i 's/hosts: /hosts: nis /g' /etc/nsswitch.conf 
sudo sed -i 's/networks: /networks: nis dns /g' /etc/nsswitch.conf 
sudo sed -i 's/services: /services: nis /g' /etc/nsswitch.conf 
echo 'automount: nis files' | sudo tee -a /etc/nsswitch.conf > /dev/null
echo 'aliases: nis files' | sudo tee -a /etc/nsswitch.conf > /dev/null
echo 'order hosts, bind' | sudo tee -a /etc/host.conf  > /dev/null
echo '+::::::' | sudo tee -a /etc/passwd  > /dev/null
echo '+:::' | sudo tee -a /etc/group  > /dev/null
sudo sed -i '/^# Allow members /a\%scan ALL=(root) ALL' /etc/sudoers
sudo rm -R /home
sudo mkdir /home
sudo chmod 777 /home
sudo systemctl enable rpcbind --now
sudo systemctl enable nscd --now
sudo systemctl enable ypbind --now
sudo systemctl enable autofs --now
  • Reboot manually and login as yourself
  • Contact Rikesh to let him if you have successfully logged in (and confirm network access on the server side) or if you have failed

Clean up and additional software

  • REQUIRED: Run the following for clean :
sudo userdel -r local_curtain
sudo apt install fail2ban -y
sudo systemctl enable fail2ban --now
sudo systemctl restart fail2ban
  • Semi-optional: Install some other useful software that may come in handy in the future..
sudo apt install tcsh tmux ksh cmake git libgtk-3-dev libgtk2.0-dev default-jdk remmina xrdp detox libncurses5 -y
sudo apt install thunderbird gimp inkscape texlive libreoffice -y
  • Firefox - should already be installed without SNAP
  • MS Teams - there was a Debian release of MS Teams but this was retired - your best bet is to use MS Teams in your web browser:https://www.microsoft.com/en-gb/microsoft-teams/log-in - make sure you give your browser permissions to access your webcam and mic
  • MS Office - use the online version of Outlook/Word/Powerpoint/OneDrive: https://m365.cloud.microsoft/ - use the 3D burger in top right to change apps

Installing Matlab

For the time being you should only be using Matlab 2023b - this is because Mathworks have decided from 2024a they would run an unjustifiable monitoring service which causes regular spikes in CPU usage and 100MB of log regular files to be created which are of no benefit to the user.

  • Go to the Mathworks website and login using your University account - if you don't have one, create one making sure you use your university email address: https://login.mathworks.com/embedded-login/landing.html?cid=getmatlab&s_tid=gn_getml
  • Click on Install MATLAB, select R2023b' in release, and click Download for Linux
  • Unzip the file into a folder by navigating your download folder in Terminal and entering unzip matlab_R2023b_glnxa64.zip -d matlab_R2023b_glnxa64 - DO NOT USE DOLPHIN TO EXTRACT, some files are not maintained in the correct folder structure which breaks the install
  • Run the installer from the same download directory by entering sudo ./matlab_R2023b_glnxa64/install
  • Follow the instructions in the installer - a Designated Computer license seems to be the best option - the default install location is fine with the alternate option being /eee/ if you are looking at installing on your second hard drive - install MATLAB, Bioinfomatics Toolbox, Curve Fitting Toolbox, DSP System Toolbox, Image Acquisition Toolbox, Image Processing Toolbox, Parallel Computing Toolbox, Signal Processing Toolbox, and Statistics and Machine Learning Toolbox as a Minimum, plus any other Toolboxes you wish to install (be careful of space usage, these can be a couple of GB each) - click on the 'Create symbolic links to MATLAB scripts in:' box and unclick the 'user experience' one - click 'Begin Install' (check for sensible space usage)

Printers

The install script and drivers are in /home/share/printers/ and run to install University printer drivers