Difference between revisions of "Installing Debian 12.9.0"

From Applied Optics Wiki
Jump to: navigation, search
Line 2: Line 2:
 
==Pre-installation checklist==
 
==Pre-installation checklist==
  
- 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 (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
  
- Back up locally (not on network drives) stored files (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
  
- 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
  
 
==Installation screens==
 
==Installation screens==
Line 14: Line 14:
 
'''I. Boot setup'''
 
'''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; 'shift +' the USB drive to the top of the queue. Save and exit (F10).
+
* 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).
- 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'''
 
'''II. Install menu'''
  
- The Debian splash screen should show up, select install Graphical install
+
* The Debian splash screen should show up, select install ''Graphical install''
  
 
'''1. Language'''
 
'''1. Language'''
  
- Select language 'English', 'United Kingdom', and 'British English'
+
* 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 <code>255.255.255.0</code> for the netmask
 +
 
 +
- Enter <code>128.243.74.254</code> for the gateway
 +
 
 +
- Enter <code>128.243.21.19</code> for the nameservers (DNS)
 +
 
 +
- Enter your ''computer name'' as the hostname (this may be filled in for you already!)
 +
 
 +
- Enter <code>applied_optics</code> as the domain name
 +
 
 +
- '''Do not set a root password''' - just leave blank and click continue
 +
 
 +
- Enter <code>local_[hostname]</code> for the user's name and username
 +
 
 +
- You should already been advised what the user <code>password<\code> should be, if not ask!
 +
 
 +
- The install will then start looking for disks
 +
 
 +
'''3. Formatting Disks'''
  
It will now do an initial harware/network configuration. (1min)
+
- Warning this will wipe Windows!
  
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
+
- For partitioning select ''Manual''
  
'''2. Configure network'''
+
- Double-click your primary hard drive which should firstly be an NVMe drive (e.g. /dev/nvme01)
  
The network autoconfiguration will fail - this is fine.
+
- 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 'Configure network manually'
+
- 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
  
enter IP, enter netmask (255.255.255.0), enter gateway 128.243.74.254, enter nameservers 128.243.21.19, enter hostname (this may be filled in for you already !), enter domain name applied_optics, do not set root password just click continue, new user is local_[hostname], username is same, password should be known (ask!),  
+
- Select ''All files in one partiion'' - you should end up with a bootable partition in #1 (~500MB), your root <code>/</code> directory in #2, and swap in #3 (~1.0GB),  
  
it will look for disks
+
- Partition your second/additional hard drives to wherever you want/need to (i.e. <code>/eee</code>) - this time Create a new partition' - set the partition size to max - to change the mount point enter manually <code>/eee</code>, 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)
Warning this swill wipe windows!
 
  
for partitioning select 'Manual', double click your hard drive which should firstly be an nvme drive (e.g. /dev/nvme01), select yes for wiping, 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, create new partition, the 'Automatically partition the free space' option creates sensible partitions but if you requires something more specialist you should already know how to set this up, select 'All files in one partiion', you should end up wth a bootable partition in #1 (~500MB), your root / directory in #2, and swap in #3 (~1.0GB), partition your second/additional hardrives to wherever you want/need to (i.e. /eee), this time 'create a new partion', partition size max, change the mount point, enter manually, /localstore, click on done setting up, click on 'Finish partitioning and write changes to disk', select Yes to write changes to disks,
+
'''4. Complete installation'''
  
The installation will begin. (2mins)
+
- To configure the package manager, select ''United Kingdom'', select the top option for the software repository (e.g. <code>deb.debian.org<\code>), and leave the proxy entry blank
  
'''
+
- Software and updates will start installing (1min)
  
Configure package manager, select United Kingdom, select the top option for the software repository (e.g. deb.debian.org), leave proxy blank
+
- For software popularity context select ''No'',  
  
Software and updates will start installing (1min)
+
- Unselect ''Debian desktop environment'' and ''GNOME Flashback'' - select ''KDE Plasma'' and ''SSH server''
  
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)
  
It will then continue installing (5mins)
+
- Click continue to reboot (you can pull out the USB drive after it has restarted)
  
Click continue to reboot (you can pull out the USB drive after it has restarted)
+
==N-vidia drivers==
  
'''
+
You might notice that
  
 
Log into the PC as local_[hostname] using the password from earlier
 
Log into the PC as local_[hostname] using the password from earlier

Revision as of 13:40, 17 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 computer name/hostname<\code> and <code>IP address - talk to Rikesh or Matt if new PC
  • 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<\code> 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 <code>/ 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<\code>), 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)

N-vidia drivers

You might notice that

Log into the PC as local_[hostname] using the password from earlier

You must turn off Secure boot in the bios or enrole your key https://wiki.debian.org/SecureBoot#DKMS_and_secure_boot otherwise you will get a 'Failed to start nvidia persistence daemon' error at startup

If PC slow either install nvidia graphics or change Desktop Session in bottom left to Plasma (X1)

sudo apt update; apt upgrade; sudo apt install software-properties-common -y sudo add-apt-repository main contrib non-free non-free-firmware sudo apt update; apt upgrade; sudo apt install linux-headers-amd64 sudo apt install nvidia-kernel-dkms will complain about nouveau, click ok to replace

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

login 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 sed '/local_/d' /etc/passwd sudo chmod 777 /home sudo systemctl enable rpcbind nscd ypbind autofs sudo systemctl restart rpcbind nscd ypbind autofs sudo reboot

More bits

<code>aptitude full-upgrade

sudo apt-get install tcsh openssh-client openssh-server tmux

Fail2Ban

DTS require us to have fail2ban installed on all our linux machines - MAKE SURE YOU INSTALL THIS!

sudo apt install fail2ban

sudo systemctl enable fail2ban --now

Firefox Shenanigans (from Matt)

By default the latest version of firefox is installed as a "snap" package rather than a "deb". This is extraordinarily dumb and you do not want it. If you install the latest kubuntu then I strongly advise you follow these instructions (below) from:

https://www.omgubuntu.co.uk/2022/04/how-to-install-firefox-deb-apt-ubuntu-22-04

-This will undo this stupidity. You won't lose your browser history / passwords / etc etc and firefox should continue to work across machines as you expect.

-Also this fix needs to be done once per new machine - the profile fix needs to be done everytime a user logs into the new machine for the first time.

-the snap runs in a container and cannot see your profile, it can import your profile as I mentioned before but then it won't be accessible from another machine and you'll end up with two unconnected ones. Plus it is <really> slow and disconnected from the usual helper programmes which is a PITA

Instructions:

(1) remove the snap sudo snap remove firefox

(2) connect to the source of firefox as deb sudo add-apt-repository ppa:mozillateam/ppa

(3) prioritise the deb over the snap (cut and paste into terminal from kate or something):

echo '

Package: *

Pin: release o=LP-PPA-mozillateam

Pin-Priority: 1001

' | sudo tee /etc/apt/preferences.d/mozilla-firefox

(4) prevent auto updates reverting your good work (same as above):

echo 'Unattended-Upgrade::Allowed-Origins::

"LP-PPA-mozillateam:${distro_codename}";' | sudo tee /etc/apt/apt.conf.d/51unattended-upgrades-firefox

(5) install firefox the right way sudo apt install firefox


Matts method didn't work for me, i followed the instructions here: https://fostips.com/ubuntu-21-10-two-firefox-remove-snap/ this got firefox installed by apt ok

Installing Teams

- E.g. download from https://www.microsoft.com/en-us/microsoft-teams/download-app#allDevicesSection

- 'cd' to Downloads or wherever the .deb as gone, ensure it is executable: sudo dpkg -i teams_XX.deb (where 'XX' is the rest of the .deb filename)

- If you get dependency errors then: sudo apt --fix-broken install and repeat above


Microsoft doesnt support linux at the moment so use teams-for-linux


sudo mkdir -p /etc/apt/keyrings

sudo wget -qO /etc/apt/keyrings/teams-for-linux.asc https://repo.teamsforlinux.de/teams-for-linux.asc

echo "deb [signed-by=/etc/apt/keyrings/teams-for-linux.asc arch=$(dpkg --print-architecture)] https://repo.teamsforlinux.de/debian/ stable main" | sudo tee /etc/apt/sources.list.d/teams-for-linux-packages.list

sudo apt update

sudo apt install teams-for-linux

Installing Matlab

use mathworks account based on Uni email to log in download linux zip for the version you want.

At the system terminal do not use dolphin to do this as it breaks everything, unzip the matlab_R2023b_glnxa64.zip installer archive to the matlab_R2023b_glnxa64 directory by entering: unzip matlab_R2023b_glnxa64.zip -d matlab_R2023b_glnxa64

The installer fails to launch as root, as it doesn't have access to the graphical user interface that you need for installation. so do:

xhost +SI:localuser:root

sudo -H ./install

When prompted by the installer, specify the folder for installation. this should be in /eee/MATLAB/R20XYa (what ever the release is)

xhost -SI:localuser:root This allows the root user to access the running X server, launches the installer, and then removes the root user from accessing the X server.

Printers

The install script and drivers are in /home/share/printers/

run on local machine to install



Finish

The installation of Kubuntu 22.04 and all the useful softwares should be done at this point beyond those which require manual installs such as MATLAB. Ask for help if you find any problems.