Basic Linux Installation Guide: Difference between revisions

From My Homelab
Created page with "The installation process for the Ubuntu virtual machines is pretty straight forward. The idea is to get a vanilla basic installation that can be built from. This should be templated. ===Create a VM from the Proxmox console=== Pretty much stick to the defaults. Make sure to create the disk on fast1 or fast2. The distribution ISO files are on local. The usual candidate is Ubuntu 22.04, but other distributions are available. The system will boot after confirmation. Go to t..."
 
 
(48 intermediate revisions by the same user not shown)
Line 1: Line 1:
The installation process for the Ubuntu virtual machines is pretty straight forward. The idea is to get a vanilla basic installation that can be built from. This should be templated.
=Installing Linux systems=
===Create a VM from the Proxmox console===
The installation process for both the desktop physical machines and Linux VMs is pretty straight forward. The idea is to get a vanilla basic installation that can be built from. The process is similar doing it on a physical machine as it is on a VM. There
Pretty much stick to the defaults. Make sure to create the disk on fast1 or fast2. The distribution ISO files are on local. The usual candidate is Ubuntu 22.04, but other distributions are available.
==Create a Bootable USB key==
If you are installing on a VM, skip on down.


The system will boot after confirmation. Go to the console for the machine to install the OS.
==Or Create a VM from the Proxmox Console==
Pretty much stick to the defaults. Make sure to create the disk on fast1, fast2 or fast3. The distribution ISO files are on local (pve). The current usual candidate is Kubuntu 26.04, but other distributions are available and loaded in the library.


===Install Ubuntu===
If a distribution that is not currently available is wanted, select local (pve) from the left panel, click on ISO Images and the upload. This will load an image from the local machine to the pve system.
The main decision is whether to do a limited or full installation. I am finding that limited is sufficient since I don't use the desktop all that much and certainly not all or the user tools.


DO NOT install with the ZFS option.
A minimal install will work on server VMs. The complete set of tools that comes with the full distribution is not needed. It is nice to have a desktop display that can be run from the console, however.


===Install the Zabbly Kernel===
Click on Create VM on the upper right to start the process. Proxmox will assign a number, or you can assign one that is not currently in use. Pick a memorable name based on use. I use the distro name if I am testing. Pick  volume that has sufficient space to hold the vdisk.  
I am keeping this here, but I only use this for some testing.


The zabbly kernel is described here: https://github.com/zabbly/linux?tab=readme-ov-file
The only configuration that is normally needed is to set the number of cores to be assigned. and the size to allocate for memory.


This is why it is not a good idea to install ZFS. The zabbly kernel will not load the zfs modules and fail to boot.
The system will boot after confirmation. Go to the console for the machine to continue the installation of the OS.


Start by clonecting the needed pieces.
==Install the Linux Disro==
<syntaxhighlight lang=shell line>
This is pretty much a case of answer obvious questions and then waiting for the install to complete.
apt install lsb-release software-properties-common apt-transport-https ca-certificates curl neofetch -y
 
curl -fSsL https://pkgs.zabbly.com/key.asc | gpg --dearmor | sudo tee /usr/share/keyrings/linux-zabbly.gpg > /dev/null
Installation screen: Next
codename=$(lsb_release -sc) && echo deb [arch=amd64 signed-by=/usr/share/keyrings/linux-zabbly.gpg] https://pkgs.zabbly.com/kernel/stable $codename main | sudo tee /etc/apt/sources.list.d/linux-zabbly.list
Timezone: Next unless you want the machine to be elsewhere
Keyboard: Next
Installation mode: Select full for a desktop, minimal for a server VM
  Select Download and install updates: Next
In partitions, the disk is already selected, select erase: Next
Set the user and machine information. Since we are all friends, click on Log oin automatically: Next
Review the confirmation page and fix if necessary: Install
There will be a popup confirming that the disk contents will be destroyed, but we don't care: Install now
 
Now you can go away for a while. Don't panic, the progress stalls at around 90% for a while but everything is working correctly.
After the install completes, the system will need to reboot.
Proxmox takes care to boot from the drive rather than the virtual CD: Done
 
The Kubuntu splash screen will appear and move on to configuring the system.
 
The process for installing native Ubuntu has a few more options, particularly on formatting the disk. The process is pretty much the same though.
 
{{note | If you are installing Ubuntu DO NOT install with the ZFS option}}
 
=After Installation Actions=
==First Things First==
===Get the System Up To Date===
In spite of selecting to install updates during the main installation, the non-OS packages don't get this treatment in the full install. Regardless, this step is a good idea.
 
<syntaxhighlight lang="shell" line>
sudo apt update
sudo apt upgrade
</syntaxhighlight>
</syntaxhighlight>
Ok, the preliminaries are complete. Now install the new kernel and reboot. If it doesn't work, this section will never be seen again.
 
<syntaxhighlight lang=shell line>
==Install and Open Cockpit==
apt update
Cockpit is a very useful tool for viewing and modifying a number of system configuration pieces. All of these can be changed with the installed tools, but Cockpit is an easy way to do them in one place. The main screen also shows system activity.
apt install linux-zabbly
 
By default, the system will be assigned a DHCP address.  
<syntaxhighlight lang="shell">
. /etc/os-release
sudo apt install -t ${VERSION_CODENAME}-backports cockpit
</syntaxhighlight>
</syntaxhighlight>
Cross your fingers and reboot.
Open URL from a web browser:
<syntaxhighlight lang="shell">
https://<ip address>:9090
</syntaxhighlight>
Login with the user created on the install. After logging in, do a quick check, switch to administrative access and then open the terminal window. Change the network connection information and verify that the  DNS server is set to 192.168.86.2
====See Also====
[https://www.linode.com/docs/ Cockpit Reference]
[https://cockpit-project.org/running.html#ubuntu Install Cockpit on Ubuntu]
{{todo | Add the connection information to the Start.me section for connections}}


Test that the new kernel is in:
==Install and Configure sshd (Minimal Install only)==
<syntaxhighlight lang=shell>
{{note | With Kubuntu user the local Konsole window as ssh is quite broken. The ssh server is still needed}}
uname -r
The sshd server needs to be running so that you can login. This is required in order to cut and paste. This means that you need to type the commands manually.
<syntaxhighlight lang="shell" line>
sudo apt install openssh-server putty-tools -y
sudo systemctl start ssh
</syntaxhighlight>
</syntaxhighlight>
The result should be someting ending in zabbly+. Running:
Input your password if prompted.
{{note | With Kubuntu use the local Konsole window since ssh is quite broken}}


neofetch should yield something like: 
==On Ubuntu continue configuring the system from an ssh terminal session==
            .-/+oossssoo+/-.              root@rufus
{{note | With Kubuntu, skip this section}}
        `:+ssssssssssssssssss+:`          ----------
===Install Putty===
      -+ssssssssssssssssssyyssss+-        OS: Ubuntu 22.04.3 LTS x86_64
Click on the Application Launcher. Search for the putty app. Click on the selection to connect to ssh servers. Click on install in the installation popup. Once installed, just click on launch. Enter localhost as the Host Name. Accept on the Security Alert popup.
    .ossssssssssssssssssdMMMNysssso.      Host: KVM/QEMU (Standard PC (i440FX + PIIX, 1996) pc-i440fx-7.2)
    /ssssssssssshdmmNNmmyNMMMMhssssss/      Kernel: 6.7.1-zabbly+
  +ssssssssshmydMMMMMMMNddddyssssssss+    Uptime: 3 mins
  /sssssssshNMMMyhhyyyyhmNMMMNhssssssss/    Packages: 1618 (dpkg), 9 (snap)
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Shell: bash 5.1.16
+sssshhhyNMMNyssssssssssssyNMMMysssssss+  Resolution: 1280x800
ossyNMMMNyMMhsssssssssssssshmmmhssssssso  Terminal: cockpit-bridge
ossyNMMMNyMMhsssssssssssssshmmmhssssssso  CPU: 11th Gen Intel i9-11900KB (2) @ 3.302GHz
+sssshhhyNMMNyssssssssssssyNMMMysssssss+  GPU: 00:02.0 Vendor 1234 Device 1111
.ssssssssdMMMNhsssssssssshNMMMdssssssss.  Memory: 919MiB / 3919MiB
  /sssssssshNMMMyhhyyyyhdNMMMNhssssssss/
  +sssssssssdmydMMMMMMMMddddyssssssss+                           
    /ssssssssssshdmNNNNmyNMMMMhssssss/                             
    .ossssssssssssssssssdMMMNysssso.
      -+sssssssssssssssssyyyssss+-
        `:+ssssssssssssssssss+:`
            .-/+oossssoo+/-.


See Also: [https://www.linuxcapable.com/how-to-install-zabbly-kernel-on-ubuntu-linux/ Full zabbly Install/Remove Instructions]
Alternatively you can connect from another system, use:
<syntaxhighlight lang="shell" line>
ip a
</syntaxhighlight>
to get the systems IP address to use in your local putty session. After entering the host, click on Open.


===Initiate putty to continue===
Accept on the Security Alert popup.
Login using the credentials that you entered during the install. Now you can cut and paste.
==Terminal Access using Kubuntu==
If you have installed on a desktop it is easy to use the Konsole application.
Just a reminder. Multi line pastes fail when entering commands.
== Fix sudo to not prompt for password==
As a person who has worked as the root user since the Unix days, I find being prompted for a password when using sudo to get admin privileges.
{{note | {{highlight|Do this as login user, NOT root.}} }}
Create a file for the user in the /etc/sudoers.d directory and add the following line to it. ${USER} matches the user created during the install. This needs to be done by the ordinary user or the steps will create a sudoers.d file for root. Do in two steps because you will be asked to authenticate assuming that this is probably the first sudo command of the session.
<syntaxhighlight lang="shell">
echo "${USER}    ALL=(ALL) NOPASSWD:ALL">${USER};chmod 400 ${USER};sudo chown 0:0 ${USER}
</syntaxhighlight>
<syntaxhighlight lang="shell">
sudo mv ${USER} /etc/sudoers.d/${USER}
</syntaxhighlight>
Give yourself superuser privileges before you continue.
<syntaxhighlight lang="shell">
sudo /bin/bash
</syntaxhighlight>


[[Post Ubuntu Install]]
==[[Post Ubuntu Install]]==

Latest revision as of 17:43, 15 August 2026

Installing Linux systems

The installation process for both the desktop physical machines and Linux VMs is pretty straight forward. The idea is to get a vanilla basic installation that can be built from. The process is similar doing it on a physical machine as it is on a VM. There

Create a Bootable USB key

If you are installing on a VM, skip on down.

Or Create a VM from the Proxmox Console

Pretty much stick to the defaults. Make sure to create the disk on fast1, fast2 or fast3. The distribution ISO files are on local (pve). The current usual candidate is Kubuntu 26.04, but other distributions are available and loaded in the library.

If a distribution that is not currently available is wanted, select local (pve) from the left panel, click on ISO Images and the upload. This will load an image from the local machine to the pve system.

A minimal install will work on server VMs. The complete set of tools that comes with the full distribution is not needed. It is nice to have a desktop display that can be run from the console, however.

Click on Create VM on the upper right to start the process. Proxmox will assign a number, or you can assign one that is not currently in use. Pick a memorable name based on use. I use the distro name if I am testing. Pick volume that has sufficient space to hold the vdisk.

The only configuration that is normally needed is to set the number of cores to be assigned. and the size to allocate for memory.

The system will boot after confirmation. Go to the console for the machine to continue the installation of the OS.

Install the Linux Disro

This is pretty much a case of answer obvious questions and then waiting for the install to complete.

Installation screen: Next 
Timezone: Next unless you want the machine to be elsewhere
Keyboard: Next
Installation mode: Select full for a desktop, minimal for a server VM
  Select Download and install updates: Next
In partitions, the disk is already selected, select erase: Next
Set the user and machine information. Since we are all friends, click on Log oin automatically: Next
Review the confirmation page and fix if necessary: Install
There will be a popup confirming that the disk contents will be destroyed, but we don't care: Install now

Now you can go away for a while. Don't panic, the progress stalls at around 90% for a while but everything is working correctly.

After the install completes, the system will need to reboot. 
Proxmox takes care to boot from the drive rather than the virtual CD: Done

The Kubuntu splash screen will appear and move on to configuring the system.

The process for installing native Ubuntu has a few more options, particularly on formatting the disk. The process is pretty much the same though.

Note: If you are installing Ubuntu DO NOT install with the ZFS option

After Installation Actions

First Things First

Get the System Up To Date

In spite of selecting to install updates during the main installation, the non-OS packages don't get this treatment in the full install. Regardless, this step is a good idea.

sudo apt update
sudo apt upgrade

Install and Open Cockpit

Cockpit is a very useful tool for viewing and modifying a number of system configuration pieces. All of these can be changed with the installed tools, but Cockpit is an easy way to do them in one place. The main screen also shows system activity.

By default, the system will be assigned a DHCP address.

. /etc/os-release
sudo apt install -t ${VERSION_CODENAME}-backports cockpit

Open URL from a web browser:

 https://<ip address>:9090

Login with the user created on the install. After logging in, do a quick check, switch to administrative access and then open the terminal window. Change the network connection information and verify that the DNS server is set to 192.168.86.2

See Also

Cockpit Reference Install Cockpit on Ubuntu

Todo: Add the connection information to the Start.me section for connections


Install and Configure sshd (Minimal Install only)

Note: With Kubuntu user the local Konsole window as ssh is quite broken. The ssh server is still needed

The sshd server needs to be running so that you can login. This is required in order to cut and paste. This means that you need to type the commands manually.

sudo apt install openssh-server putty-tools -y
sudo systemctl start ssh

Input your password if prompted.

Note: With Kubuntu use the local Konsole window since ssh is quite broken

On Ubuntu continue configuring the system from an ssh terminal session

Note: With Kubuntu, skip this section

Install Putty

Click on the Application Launcher. Search for the putty app. Click on the selection to connect to ssh servers. Click on install in the installation popup. Once installed, just click on launch. Enter localhost as the Host Name. Accept on the Security Alert popup.

Alternatively you can connect from another system, use:

ip a

to get the systems IP address to use in your local putty session. After entering the host, click on Open.

Initiate putty to continue

Accept on the Security Alert popup.

Login using the credentials that you entered during the install. Now you can cut and paste.

Terminal Access using Kubuntu

If you have installed on a desktop it is easy to use the Konsole application.

Just a reminder. Multi line pastes fail when entering commands.

Fix sudo to not prompt for password

As a person who has worked as the root user since the Unix days, I find being prompted for a password when using sudo to get admin privileges.

Note: Do this as login user, NOT root.

Create a file for the user in the /etc/sudoers.d directory and add the following line to it. ${USER} matches the user created during the install. This needs to be done by the ordinary user or the steps will create a sudoers.d file for root. Do in two steps because you will be asked to authenticate assuming that this is probably the first sudo command of the session.

echo "${USER}    ALL=(ALL) NOPASSWD:ALL">${USER};chmod 400 ${USER};sudo chown 0:0 ${USER}
sudo mv ${USER} /etc/sudoers.d/${USER}

Give yourself superuser privileges before you continue.

sudo /bin/bash