Intro
Installing in a VM, using Fedora’s Boxes software.
Pre-install Setup
Download Image
Grab it from the official download page . BT download is recommended (use a proper torrent client, like qBittorrent ).
Then drop it into your VM.
Verify Boot Mode
List the efivars directory:
| |
If the directory shows up correctly with no errors, your system is booting in UEFI mode. If it’s missing, you’re likely in BIOS mode (or CSM mode).
This VM uses BIOS mode.
Connect to the Internet
Network interface and DHCP service are enabled by default, no config needed.
Update System Time
Enable sync with Network Time Protocol (NTP) server:
| |
You can check service status with timedatectl status.
Create Disk Partitions
Used the classic fdisk command for partitioning (MBR). Since it’s BIOS boot, I followed the official partitioning example, making only two partitions (swap and one for everything else).
Use fdisk -l to list all disks (you can ignore devices ending in rom, loop, or airoot).
Start partitioning with fdisk /dev/device_name.
| Command | Description |
|---|---|
| n | Create new partition |
| p | Check partitions |
| t | Change partition type |
| w | Save changes |
Specify partition size using ++num+K/M/G/T/P. If no suffix (K/M/G/T/P), it allocates sectors.
Format Partitions
- Create swap partition
| |
- Create filesystem
Commands vary based on filesystem. For example, ext4:
| |
Mount Partitions
Mount the root partition to /mnt. If you have multiple partitions, make sure to mount the root partition first.
| |
Enable swap:
| |
Installation
Select Mirrors
The /etc/pacman.d/mirrorlist file defines where packages are downloaded from. It updates automatically once connected to the internet, or you can change it manually. I’m leaving it as is.
Install Packages
Use the pacstrap script to install the base package, Linux kernel, and vim. If you need other packages, just add their names to the command below. You can always install more later with pacman.
| |
System Config
Fstab
The /etc/fstab file describes how partitions are automatically mounted at system startup. You can generate it automatically with the following command (use -U or -L for UUIDs or labels; using UUIDs helps prevent boot issues).
| |
Check if auto-config is correct:
| |
Chroot
Chroot into the newly installed system:
| |
Time Zone
Taking Shanghai time as an example:
| |
Generate /etc/adjtime:
| |
Now you can use the date command to check if the time is correct.
Localization
Edit /etc/locale.gen and uncomment en_GB.UTF-8.
Then generate locale info:
| |
Create /etc/locale.conf and edit the LANG variable, e.g., LANG=en_GB.UTF-8.
Network Configuration
Create /etc/hostname and enter your hostname.
Since the VM uses DHCP, I’m skipping network configuration .
Root Password
| |
Install Bootloader
Typically, you’d install GRUB. My VM is BIOS+MBR, so I’m installing the grub package.
| |
Install GRUB (for the command below, use /dev/device, not a partition):
| |
Generate config file:
| |
Reboot
Use exit or Ctrl+D to leave the chroot environment.
Use umount -R /mnt to unmount the mounted partitions.
Reboot with reboot.