====== Information ======
* Ubuntu Server
* https://ubuntu.com/server
* Alira = Dell Precision M6500 ((Legacy/MBR))
25.10 (Questing Quokka)
====== Download ======
* https://ubuntu.com/download/server
* https://releases.ubuntu.com/
ubuntu-25.10-live-server-amd64.iso
====== Installation Notes ======
===== Network =====
* Subnet: ''192.168.1.0/24''
====== Software ======
===== Update =====
==== System ====
****
sudo apt update && sudo apt full-upgrade -y && sudo apt autoremove -y && sudo apt clean && sudo systemctl daemon-reload && sync
==== Snaps ====
****
sudo snap refresh && sync
==== Firmware ====
****
sudo fwupdmgr refresh --force && sudo fwupdmgr update --verbose && sync
===== General =====
****
sudo apt install --install-recommends htop lm-sensors
====== Settings ======
===== lm_sensors =====
****
sudo sensors-detect --auto
===== Time =====
****
sudo timedatectl set-timezone 'America/New_York' && sudo timedatectl 'set-ntp' 'true' && timedatectl status
===== Uncomplicated Firewall =====
* Allows SSH on [[#network|LAN]]
* See [[linux:notes:ufw_uncomplicated_firewall|ufw]] for more notes
sudo ufw reset && sudo ufw default 'deny' && sudo ufw logging 'off' && sudo ufw allow from '192.168.1.0/24' to 'any' port '22' proto 'tcp' && sudo ufw enable && sudo systemctl enable 'ufw'
sudo ufw status
====== Boot Loader ======
* [[linux:notes:kernel_parameters|More Kernel Parameters]]
===== Alira =====
==== modprobe.d ====
* [[linux;notes;modprobe.d_tweaks#alira|Notes]]
==== GRUB ====
* ''GRUB_CMDLINE_LINUX='' (not default)
sudo -e '/etc/default/grub' && sudo update-grub
GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX="x"
acpi_osi='Linux' reboot='pci' hibernate='no' preempt='full' iommu='pt' pci='pcie_bus_perf' drm_kms_helper.poll='0' drm_kms_helper.fbdev_emulation='0' rootflags='data=writeback' workqueue.default_affinity_scope='cpu' nomodeset modprobe.blacklist='amdgpu'
====== Drive Maintenance ======
===== Trim =====
sudo systemctl enable 'fstrim.timer' --now
sudo systemctl start 'fstrim' && sync && sudo systemctl status 'fstrim' -l
sudo fstrim -v -a
====== Tweaks ======
===== fstab =====
****
sudo -e '/etc/fstab'
==== ext4 ====
* ''/ type ext4''
* :!: ''data=writeback'' requires it in [[#grub|GRUB]] too
,data=writeback,nobarrier
====== Automatic Updates ======
===== Service =====
sudo -e '/etc/systemd/system/ubuntu-up.service'
[Service]
Type=oneshot
ExecStartPre='/usr/bin/apt' autoremove -y
ExecStart='/usr/bin/apt' clean
ExecStart='/usr/bin/apt' update
ExecStart='/usr/bin/apt' full-upgrade -y
ExecStart='/usr/bin/snap' refresh
ExecStartPost='/usr/bin/journalctl' --vacuum-time='1s' --rotate
ExecStartPost='/usr/bin/systemctl' daemon-reload
ExecStartPost='/usr/bin/sync'
ExecStartPost='/usr/bin/systemctl' reboot
# End
===== Timer =====
* Daily ''06:00:00 AM'' (Alira)
sudo -e '/etc/systemd/system/ubuntu-up.timer' && sudo systemctl daemon-reload && sudo systemctl enable 'ubuntu-up.timer' --now
[Unit]
Description=Ubuntu OS Updater
After=network-online.target
Wants=network-online.target
[Timer]
OnCalendar=*-*-* 06:00:00
Persistent=true
[Install]
WantedBy=timers.target
# End
sudo systemctl start 'ubuntu-up'
====== External Backup ======
* :!: 2023/05/04: This hasn't been used for years and likely needs re-factored
===== fstab =====
* Expects a drive of some kind with a XFS partition at ''/dev/sdb1''
sudo mkdir -p '/mnt/USB' && sudo -e '/etc/fstab'
# USB
/dev/sdb1 /mnt/USB xfs rw,relatime,attr2,inode64,noquota 0 2
sudo mount '/dev/sdb1'
===== Service =====
sudo -e '/etc/systemd/system/backup-external.service' && sudo sed -i 's/CHANGEME/'$USER'/g' '/etc/systemd/system/backup-external.service'
[Service]
Type=oneshot
ExecStartPre='/usr/bin/sync'
ExecStart='/usr/bin/rsync' -r '/home/CHANGEME/backups' '/mnt/USB' --verbose --ignore-existing
ExecStartPost='/usr/bin/sync'
===== Timer =====
sudo -e '/etc/systemd/system/backup-external.timer' && sudo systemctl daemon-reload && sudo systemctl enable 'backup-external.timer' --now
[Unit]
Description=Backup Backups to External Device
[Timer]
OnCalendar=*-*-* 07:00:00
Persistent=true
[Install]
WantedBy=timers.target
====== Notable Folders and Commands ======
* See [[linux;notes;misc]]