There are many different ways to create a bootable USB flash drive. I will in this guide, not show you how to create a bootable USB flash drive.
After rebooting your computer from the USB flash drive and when the installation medium’s boot loader menu appears
The default console key-map is US. You can change that using for example:
loadkeys sv-latin1
Use iwctl to connect to a wireless network (If you are using a cable to connect to the internet, you can skip this step)
-
To get an interactive prompt, use the command
iwctl -
The interactive prompt is then displayed with a prefix of
[iwd]# -
First, if you do not know your wireless device name, list all Wi-Fi devices:
device list -
If the device or its corresponding adapter is turned off, turn it on:
device [name] set-property Powered on -
Then, to initiate a scan for networks (note that this command will not output anything):
station [name] scan -
You can then list all available networks:
station name get-networks -
Finally, to connect to a network:
station name connect [Network name] -
To display the connection state, including the connected network of a Wi-Fi device:
station device show -
To exit from iwctl, type
exit.
To be able to save the install script you need to mount your USB flash drive.
First we need to locate the USB flash drive on you system. Discs are assigned to
a block device such as /dev/sda or /dev/nvme0n1. The command lsblk gives
us that information. On my machine, lsblk shows me that my USB flash drive
is assigned to sda1. Next we need to mount the USB flash drive:
mount --mkdir /dev/sda1 /mnt/myusb
Run archinstall script
archinstall
After you have gone through the install scrip, it should look something like this. This is just a example!
It is now time to save you configuration to your USB flash drive. Do this by choosing ‘Save configuration’.
There are 2 different configuration files to consider
user_configuration.json- contains all general installation configurationuser_credentials.json- contains the sensitive user configuration such as user password, root password, and encryption password.
I recommend that you only save user_configuration.json, to avoid saving sensitive information to the USB flash drive
Now that you have saved your configuration to your USB flash drive, you can safely continue with your installation of arch-Linux.
The next time you want to install arch-Linux, using the preloaded configuration file, simply insert you USB flash drive and type:
archinstall --config /mnt/myusb/user_configuration.json
Known errors
During the installation I stumbled across this error
Could not strap in packages: 256
Probably a problem when downloading from a mirror. Try again or from another mirror.
Could not strap in packages, signature from “nnn” is unknown trust
-
To force a refresh of all package lists and upgrade
pacman -Syu -
Or: refreshing your keys (this may take a long time, prepare with lots of coffee).
pacman-key --refresh
