Fedora Linux Install

1. OS Install

  1. Download the OS

    1. Download Fedora Linux from here.

  2. Copy to USB stick with Rufus

  3. Set PC to boot from the USB stick

2. Post Boot Setup

These steps require console access.

  1. After booting for the first time into Fedora you can

    1. Enable 3rd Party Repositories

    2. Set your UserName and Password

  2. Change the hostname

    1. Check the current hostname

      hostnamectl
    2. Set the hostname

      sudo hostnamectl set-hostname my-new-computer
    3. Reboot

3. OpenSSH-Server

3.1. Confirm if SSH is already installed

  1. Confirm if the openssh-server is already installed

    Run this command
    rpm -qa | grep openssh-server
    Example output indicating openssh-server is already installed
    openssh-server-7.9p1-5.fc30.x86_64

3.2. Install OpenSSH-Server

  1. If the above command produced no output, then install:

    sudo dnf install openssh-server
  2. Enable:

    sudo systemctl enable sshd
  3. Start:

    sudo systemctl start sshd

    Now you can connect remotely via ssh and continue with the remaining installation steps.

3.3. Configure X11

  1. Confirm X11 forwarding is configured.

    Execute this
    sudo cat /etc/ssh/sshd_config|grep Forwarding
    The following is an example where Xll is not configured
    #AllowAgentForwarding yes
    #AllowTcpForwarding yes
    #X11Forwarding no
    #	X11Forwarding no
    #	AllowTcpForwarding no
  2. If not configured:

    Edit
    sudo vi /etc/ssh/sshd_config
    Add these lines
    X11Forwarding yes
    #X11DisplayOffset 10    # Not sure if this is required
    #X11UseLocalhost yes    # Not sure if this is required
    Restart the daemon
    sudo systemctl daemon-reload
    Install xauth
    sudo dnf -y install xauth
  3. Now exit the current ssh session and reconnect for the change to take place.

3.4. Check SSH Daemon Status

  1. Check status:

    sudo systemctl status sshd

4. Update System

  1. Update System via dnf.

    sudo dnf -y update

    If the above seems to hang, run this first:

    sudo dnf clean all

    This will take a long time…​

  2. Upgrade the System via dnf.

    sudo dnf -y upgrade

    This will take a long time…​

5. Install the DNF Package Manager

  1. Install the DNF package manager (not required on RedHat 8/CentOS 8/Rocky 8)

    sudo yum install -y dnf
  2. Install EPEL repository

    sudo dnf install -y epel-release

    If the previous command failed, try this one:

    sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
  3. Make the DNF cache

    sudo dnf makecache

6. Resize Root partition

6.1. Rocky

Incomplete!
  • On Rocky Linux, the root partition will start off at ~70GB with the /home partition being allocated with the bulk of the remaining space.
    Use the following to first shrink the /home file system and grow the root file system.

    1. First, get the Filesystem name for the /home filesystem:

      lsblk
      Example output
      sda                             8:0    0 931.5G  0 disk
      ├─sda1                          8:1    0   576M  0 part /boot/efi
      ├─sda2                          8:2    0     1G  0 part /boot
      └─sda3                          8:3    0 929.8G  0 part
        ├─rl_p--rocky--phoenix-root 253:0    0    70G  0 lvm  /var/lib/containers/storage/overlay
        │                                                     /
        ├─rl_p--rocky--phoenix-swap 253:1    0  15.7G  0 lvm  [SWAP]
        └─rl_p--rocky--phoenix-home 253:2    0 844.1G  0 lvm  /home

6.2. Fedora Server

  • On Fedora Server, the root partition will start off at 15GB.
    Use the following to use all of the available space.

    1. First, get the Filesystem name for the root / filesystem:

      df -hT
      Sample
      Filesystem                              Type      Size  Used Avail Use% Mounted on
      /dev/mapper/fedora_p--fed--phoenix-root xfs        15G   12G  3.3G  79% /           (1)
      devtmpfs                                devtmpfs  4.0M     0  4.0M   0% /dev
      tmpfs                                   tmpfs      16G  168K   16G   1% /dev/shm
      1 Note the Filesystem name required for the next steps.
    2. Resize the volume

      sudo lvextend /dev/mapper/fedora_p--fed--phoenix-root -l+100%FREE
      Sample Result
        Size of logical volume fedora_p-fed-phoenix/root changed from 15.00 GiB (3840 extents) to <929.80 GiB (238028 extents).
        Logical volume fedora_p-fed-phoenix/root successfully resized.
    3. Grow

      sudo xfs_growfs /dev/mapper/fedora_p--fed--phoenix-root
      Sample Result
      meta-data=/dev/mapper/fedora_p--fed--phoenix-root isize=512    agcount=4, agsize=983040 blks
      . . .
      data blocks changed from 3932160 to 243740672
    4. Confirm the / Filesystem has grown:

      df -hT
      Sample
      Filesystem                              Type      Size  Used Avail Use% Mounted on
      /dev/mapper/fedora_p--fed--phoenix-root xfs       930G   30G  901G   4% /           (1)
      devtmpfs                                devtmpfs  4.0M     0  4.0M   0% /dev
      tmpfs                                   tmpfs      16G  168K   16G   1% /dev/shm
      1 Note the Filesystem has a new size.

7. Install Apps

7.1. NMAP

  1. Install

    sudo dnf -y install nmap

7.2. Fastfetch

  1. Install

    sudo dnf -y install fastfetch

7.3. Firewall GUI Tool

  1. Install

    sudo dnf install -y firewall-config

7.4. Gedit

  1. Install

    sudo dnf -y install gedit

7.5. Snap

  1. Install

    sudo dnf -y install snapd

    This will take some time…​

  2. To enable classic snap support, enter the following to create a symbolic link between /var/lib/snapd/snap and /snap:

    sudo ln -s /var/lib/snapd/snap /snap
  3. Either log out and back in again, or restart your system, to ensure snap’s paths are updated correctly.

  4. To test your system, install the hello-world snap and make sure it runs correctly:

    Run
    sudo snap install hello-world
    Example Result
    hello-world 6.3 from Canonical✓ installed
    $ hello-world
    Hello World!

7.6. Developer Tools

7.6.1. Git

sudo dnf -y install git

7.6.2. Visual Studio Code

  • Reference this VSCode doc.

    Snap needs to be installed first.

7.7. Samba

7.8. ZFS

  1. Reference the ZFS Notes to install ZFS.

  2. Reference the above Doc to also import ZFS Storage Pools.

7.9. Install Containerization

7.9.1. Podman

  1. Reference doc.

  2. Install

    sudo dnf install -y podman podman-compose
  3. Config

    systemctl --user enable --now podman.socket

7.10. Video Driver

7.11. Cockpit

7.12. Podman

8. Install Desktop

9. Install Backup Software

  1. Install Time Shift

    sudo dnf -y install timeshift

10. Additional Configurations

11. Troubleshooting

11.1. Boot failure

  • If booting the system results in Emergency Mode

    1. First try to boot with the previous kernal which can be selected from the initial boot menu.

    2. After booting into the system with the previous kernal, try to Update/Reinstall the Kernal:

      sudo dnf reinstall kernel-core
    3. Now reboot