Ubuntu is a Linux distribution. In general, you want to use the latest version of ubuntu, and you want to use the Long Term Support (LTS) version.
Any PC can have ubuntu installed. The make and model of computer doesn't really matter. Also, the graphics card doesn't really matter for a headless server. The size of the hard drive is important because this is the storage for the DVR.
TVheadend
This step was originally written for a TVheadend server.
For TVheadend projects:
A relatively high performing PC is required to run TVheadend with four TV tuners. I am not sure what the minimum specs are, this is what worked for me.
PC Hardware
A few years ago, I bought a computer with the following characteristics:
CPU model name: AMD A6-3620 APU with Radeon HD Graphics
AMD A6-3620 Passmark 2799
# of Cores: 4
CPU speed: 2.2GHz
Cache: 1MB
HD: 1TB
RAM: 4GB
The performance of the CPU depends on the number of TV Tuners. The above works with four TV Tuners.
Step 1. Setup PC
Connect terminal
Connect wired keyboard (a USB keyboard doesn't work on my PC until Step 6)
Connect an ethernet cable
If this is a reinstall, remove all of the TV tuners
Step 2. Download ubuntu
Download the latest version of ubuntu LTS server's ISO image to your PC or MacBook
As of 11JAN2025, 24.10 is the latest version of ubuntu LTS server
LTS = Long Term Support
NOTE: if you are working on TVheadend, then my last update was to use 18.04
On a MacBook, the iso image will be stored in the Downloads folder as ubuntu-24.10…iso
Copy the image to a USB drive.
Step 3. If necessary, download balenaEtcher
Download Etcher (etcher for Arch=X64 & OS=MacOS)
Open downloads in Finder window
Double-click on balenaEtcher… dmg
Drag balenaEtcher app to Applications folder
Close balenaEtcher window
Move balenaEtcher…dmg to Trash
Step 4. Follow these directions to Create a bootable USB drive
Skip Step 7. Boot Your Mac. The USB stick will be moved to a PC.
Step 5. Google how to change boot order on your PC
Each PC will have its own set of steps for changing the boot order. Use your PC's instructions in the next step.
Step 6. Change boot order
Power off computer
Insert USB boot drive from above
When rebooting try nothing first and then try holding one of F8-F11 to get to boot menu
Repeat F8-F11 until boot menu shows (F11 works one this PC)
Boot from USB drive (Generic Drive)
Change the boot order. So, PC boots off USB first
Accept changes
Save changes and exit
Step 7. Install ubuntu
Insert the USB drive into the PC
Boot the PC
Follow directions (don't encrypt anything, you want speed out of this PC). Click Done at the end of each bulleted item below
Pick language
Keyboard is US English
Use DHCP for ETH interface
No Proxy
Use default ubuntu mirror
Use entire disk and Set Up LVM
Use the default disk
Set your name, username, hostname and login
Install OpenSSH
Don't install the other software
... wait ... After you press Continue, Ubuntu installs. Depending on your internet bandwidth, disk drive, and CPU speed, ubuntu takes a while to install (for me 13 minutes). Go do something else
When the install is done:
Remove USB Drive
Restart Now
You should have a terminal window for ubuntu
Step 8. For TVheadend, Disable IPv6
TVheadend is on my local area network. It doesn't need an IPv6 IP address. If you are using ssh, then this may causing issues with reconnecting, because it may use the IPv6 address.
Edit
$ sudo nano /etc/sysctl.conf
And add the following lines at the bottom:
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
Check that ipv6 is disabled:
$ cat /proc/sys/net/ipv6/conf/all/disable_ipv6
If the output is a 1 then it worked.
If the output is a 0, then run:
$ sudo sysctl -p
$ cat /proc/sys/net/ipv6/conf/all/disable_ipv6
and the output should be a 1
Step 9. Change boot order back
Instead of powering off, login and use
$ sudo shutdown -h 0
or
$ sudo reboot now
Repeat the commands in the Change Boot Order Step, but this time make the hard drive the first boot device
Instead of changing the boot order I disabled all the other boot devices
Step 10. Set time
[Note: Latest images of raspbian and ubuntu 16.04 and onwards use timesyncd. So, ntp is not required and both should not be run.]
Set the timezone:
$ sudo timedatectl set-timezone America/Chicago
$ date
The above should set date correctly. If not, set the time:
$ sudo date -s "11 JAN 2024 20:26:00"
[Optional - I skipped] Upgrading Ubuntu
These commands will upgrade the packages:
$ sudo apt-get clean
$ sudo apt update
$ sudo apt upgrade -y
Run the commands above before running the next command, which upgrades the OS version. Upgrading to a newer OS version may cause TVheadend to fail. So, check if it is supported before upgrading:
$ sudo apt dist-upgrade
$ sudo apt autoremove
$ sudo do-release-upgrade
Show kernel and ubuntu version:
$ uname -r
$ lsb_release -a
These commands may not be needed, but they seem to help me:
$ sudo dpkg-reconfigure tvheadend
$ sudo service tvheadend restart
Troubleshooting