# Important Settings

1. Upgrade your local Ubuntu Server from 20.04 to 22.04 LTS

Keep a backup of your most sensitive data to avoid unnecessary risks.

Update your system with the following command

```
sudo apt update
sudo apt upgrade
sudo apt autoremove   #Removes all obsolete packages from your system
```

Check the system version

```
cat /etc/os-release
lsb_release -a   # another command 
```

Normally, the update-manager-core package should be installed, but you’d better be sure

```
apt install update-manager-core
```

Now do the upgrade with the command

```
do-release-upgrade
```

You may see a screen where you will be asked if you want to automatically restart the services.

Restart Services during package upgrades without asking?

Select "yes" and proceed.

You will then be informed of the number of new packages to install and how long it may take.

You will then be asked about obsolete packages and if you want to remove them.

Finally, if all goes well, you will see this message stating that the process was successful and that to enjoy the new system, you will need to reboot your computer.

After rebooting check the ubuntu version installed/system version with

```
cat /etc/os-release  
lsb_release -a   # another command 
```

{% hint style="info" %}
Packaging problem with 22.04. After upgrading to Ubuntu Server 22.04 you may get this message - " libssl.so.1.1: cannot open shared object file: No such file or directory".

Fix this with:

```python
wget http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.20_amd64.deb

sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2.20_amd64.deb
```

PS: If the link is expired, check <http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/?C=M;O=D> for a valid one.

Current version is: libssl1.1\_1.1.1f-1ubuntu2.20\_amd64.deb
{% endhint %}

2. Set Grub2 bootloader to remember the last boot choice in your dual boot operating system

&#x20;Edit the grub file with text editor:

```
sudo nano /etc/default/grub
```

> GRUB\_DEFAULT=0
>
> GRUB\_TIMEOUT\_STYLE=hidden
>
> GRUB\_TIMEOUT=10
>
> GRUB\_DISTRIBUTION='lsb\_release -i -s 2> /dev/null || echo Debian'
>
> GRUB\_CMDLINE\_LINUX\_DEFAULT="quiet splash"
>
> GRUB\_CMDLINE\_LINUX=" "

Put the following two lines and save the file:&#x20;

```
GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true
```

Then run:

```
sudo update-grub
```

3. Check Kernel Version

You can use any of the following three commands to check the kernel version

```
uname -srm
```

```
hostnamectl
```

```
cat /proc/version
```

4. How to boot into a specific kernel version

Get the currently installed kernel menu entries using the command below.

```
sudo grub-mkconfig | grep -iE "menuentry 'Ubuntu, with Linux" | awk '{print i++ " : "$1, $2, $3, $4, $5, $6, $7}'
```

> 1 : menuentry 'Ubuntu, with Linux 5.4.0-80-generic (recovery mode)'
>
> 2 : menuentry 'Ubuntu, with Linux 4.15.0-159-generic' --class ubuntu
>
> 3 : menuentry 'Ubuntu, with Linux 4.15.0-159-generic (recovery mode)'
>
> 4 : menuentry 'Ubuntu, with Linux 4.15.0-45-generic' --class ubuntu
>
> 5 : menuentry 'Ubuntu, with Linux 4.15.0-45-generic (recovery mode)'

Modify the `GRUB_DEFAULT=0` value as per your need.

Currently my server booted with `5.4.0-80-generic`

```
uname -srn
```

> Linux ubuntu 5.4.0-80-generic

So i want to boot my system with `4.15.0-45-generic` which is menu entry `4.`

Modify `GRUB_DEFAULT="1>4"` value in `/etc/default/grub`&#x20;

Execute below command to regenerate a grub config file with modified GRUB\_DEFAULT settings.

```
sudo update-grub
```

Reboot the ubuntu system.

```
sudo systemctl reboot
```

Post reboot my ubuntu server booted with old kernel `4.15.0-45-generic`

```
uname -srn
```

> Linux ubuntu 4.15.0-45-generic

&#x20;5\.  Uninstall specific kernel version

As root, issue the following commands:

```
dpkg -l | grep linux-image
```

Find the kernel image you want to remove, which should be `linux-image-5.11.0-38-generic` (be sure it is). Then

```
apt-get remove linux-image-5.11.0-38-generic 
```

I don't think a GRUB update is needed, it should just disappear from the GRUB menu. If you get any errors with GRUB just issue, also as root, `update-grub`.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://prime-stake-pool.gitbook.io/node-setup-guide/server-settings/important-settings.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
