# How to setup hardened Ubuntu environment on Intel computer
## Requirements
The following hardware is required.
- Computer [compatible](https://ubuntu.com/download/desktop) with Ubuntu 22.04.1 LTS
- USB flash drive (used to create Ubuntu for desktops bootable installer, 4GB min)
- USB flash drive (used to install Ubuntu for desktops, 16GB min)
## Recommendations
Physically removing internal disk(s) and wireless interface(s) if not soldered to motherboard or disabling interface(s) using BIOS if soldered is recommended to strengthen data persistence and air gap hardening.
Installing Ubuntu for desktops on [datAshur PRO²](https://istorage-uk.com/product/datashur-pro2/) USB flash drive is recommended to enforce access control, data persistence and tamper resistance hardening.

### Step 11: set `ext4` and `vfat` filesystems to read-only
```shell-session
$ sudo sed -i 's/errors=remount-ro/errors=remount-ro,noload,ro/g' /etc/fstab
$ sudo sed -i 's/umask=0077/umask=0077,ro/g' /etc/fstab
```
### Step 12: disable `fsck.repair`
```shell-session
$ sudo sed -i 's/quiet splash/quiet splash fsck.repair=no/g' /etc/default/grub
$ sudo update-grub
```
### Step 13: set `overlayroot` to `tmpfs`
```shell-session
$ sudo sed -i 's/overlayroot=""/overlayroot="tmpfs"/g' /etc/overlayroot.conf
```
### Step 14: clear Bash history
```shell-session
$ history -cw
```
### Step 15: reboot
> Heads-up: filesystem will be mounted as read-only following reboot.
```shell-session
$ sudo systemctl reboot
```
### Step 16: shutdown
> Heads-up: filesystem is ready for optional hardware read-only hardening.
```shell-session
$ sudo systemctl poweroff
```
### Step 17 (optional): physically remove internal disk(s) and wireless interface(s) if not soldered to motherboard or disable interface(s) using BIOS if soldered
### Step 18 (optional): enable datAshur PRO² global read-only (see product [documentation](https://istorage-uk.com/product-documentation/) for instructions)