Personal scripts for bootstrapping an Arch Linux system with i3.
- Installs Arch Linux per the Installation Guide
- Configures systemd-boot (assumes system supports EFI)
- Creates a user and adds it to common groups, plus any groups defined in
chroot/packages/groups
- Installs
aurutils
and configures a local pacman repository - Optionally, installs packages listed in
chroot/packages
- Optionally, enables services listed in
chroot/services
- Optionally, installs the long-term support kernel
- Detects CPU manufacturer and installs microcode package
- Detects a VirtualBox environment, installs the guest libraries and enables
vboxservice.service
- Optionally, installs my dotfiles (e.g.
.Xresources
, i3 config, bash aliases) and system-specific configuration files (e.g. mouse/trackpad settings, pacman hooks, bluetooth audio config) - Optionally, performs the installation over wireless (assumes WPA)
-
Make sure the internet is available
-
Download and extract the project:
$ curl -L https://github.com/Lizards/arch-installer/tarball/master | tar -xz --strip-component=1
-
Edit the variables in
.config
Variable Description Required BOOT_PART
Device name of boot partition, mounted at /boot
⚫ ROOT_PART
Device name of root partition, mounted at /
⚫ SWAP_PART
Device name of swap partition, optional HOME_PART
Device name of /home
partition, optionalUSERNAME
The installer will create a user with this username. This user will be added to groups defined by USER_GROUPS
, and the groups listed inchroot/packages/groups
that are provided by installed packages⚫ PASS
Password for the user created by the installer ⚫ USER_GROUPS
Default: wheel,optical,audio,video,lp
ROOT_PASS
Root password ⚫ HOSTNAME
Computer's hostname, also used to install machine-specific system configs
WithINSTALL_DOTFILES=1
, accepted values areasds-laptop
(ThinkPad W540),boris
(ThinkPad X1 Carbon), ormikhail
(a desktop PC with dual monitors). IfHOSTNAME
matches none of these, a generic system config base package andmikhail
's dotfiles will be installed. If installing in VirtualBox, a branch of the dotfiles specific to VirtualBox will be installed.⚫ INSTALL_PACKAGES
Default: 1
With1
, install the packages inchroot/packages/arch
, import GPG keys fromchroot/packages/gpg-keys
thenchroot/packages/aur
, enable the services inchroot/services/system
andchroot/services/user
, and add theUSERNAME
user to the groups inchroot/packages/groups
. Edit these files and opt out of installing the dotfiles to install an alternative Desktop Environment.INSTALL_DOTFILES
Default: 1
With1
, install system configs and dotfiles. SeeHOSTNAME
below. Set to0
to disable. Dotfiles will not be installed withINSTALL_PACKAGES=0
.INSTALL_BLUETOOTH
Default: 1
With1
, install and configure Bluetooth for PulseAudioINSTALL_LTS_KERNEL
Default: 0
With1
, install the long-term support kernel and make its bootloader entry the defaultTIMEZONE
Default: US/Eastern
COUNTRY
Default: United States
Used withreflector
to generate pacman mirror listPAUSE_BETWEEN_STEPS
For debugging, set to 1
to pause and wait for keyboard input between stepsCHROOT_SCRIPT_DIR
Default: /usr/local/lib/bootstrap
Directory where the install scripts are copied duringchroot
step, deleted on successful installationWLAN_INSTALL
Default: 0
Set to1
to enable installation over wireless. Wireless installation assumes WPA. Manually enable wireless per the Arch Wiki if unsure.WLAN_SSID
Wireless network SSID. Required with WLAN_INSTALL=1
WLAN_PASS
Wireless network password. Required with WLAN_INSTALL=1
WLAN_INTERFACE
With WLAN_INSTALL=1
, script will attempt to discover the wireless interface name, but assumes there's only one. Set this variable to explicitly declare the interface name.ETH_INTERFACE
With WLAN_INSTALL=1
, script will attempt to discover the active ethernet interface to stop dhcp. Set this variable to explicitly declare the interface name. -
Run the install script:
$ ./install.sh
You will be prompted at least once for the user password. This happens during the installation of AUR packages, as
aur sync
is run as the user to build the packages, then the user must authenticate to install them. -
System will reboot upon successful installation. You should be greeted with an LXDM login screen. Select
i3
underDesktop
in the bottom left corner before logging in for the first time.
-
Networking requires setup:
NetworkManager
service should be running, but network connectivity will not work without configuration. Useip link
to list interfaces. -
If screen resolution is wrong, use
arandr
to change it. Export anxrandr
command fromarandr
. If dotfiles were installed, update$HOME/dotfiles/bin/xrandr.local
with it, then runmake
in$HOME/dotfiles
to fix permanently. If not, put it in the i3 config as anexec_always
command. -
If dotfiles were not installed, there is no Polybar and the default
i3bar
display is broken.- Install
i3status
thenWin+Shift+R
to fix thei3bar
display, or - Launch Polybar with its default config with
polybar -c /usr/share/doc/polybar/config example > /dev/null 2>&1 &
- Install
-
If Polybar doesn't appear, run
polybar.local
to inspect errors. A common culprit is themonitor
value in the bar definitions in$HOME/dotfiles/.config/polybar/config
. Runpolybar -m
to find active display names. -
If network status is missing from Polybar, update the
eth
andwlan
modules in$HOME/dotfiles/.config/polybar/config
with the correct interface names. This can be done withPOLYBAR_ETH_INTERFACE
andPOLYBAR_WLAN_INTERFACE
environment variables (look in.xprofile
). -
If using a Mac, i3 keyboard controls probably won't work as configured, which means you can't do anything in i3. You must drop to a shell (
Fn+Ctrl+Opt+F2
?) to do anything further. Edit$HOME/.config/i3/config
, adding the linebindsym Shift+Return exec i3-sensible-terminal
to temporarily enableShift+Enter
to open a terminal in i3, reboot, and...- Use
i3-config-wizard
to generate a new config, then replace the key bindings in the existing config with the newly generated ones, or - Bind some other key to
Mod4
:sudo pacman -Syu xorg-xmodmap
to installxmodmap
- Use
xev
to capture key input, and configurexmodmap
to map the Command or some other key toMod4
- Use
The installer will detect a VirtualBox environment and install the guest libraries. If dotfiles are being installed, they will be installed from a dedicated virtualbox
branch with some small tweaks.
Originally forked from leomao/arch-bootstrap