- Detects CPU manufacturer and installs microcode package
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 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) - Optionally, performs the installation over wireless (assumes WPA)
-
Make sure the internet is available.
ip link
-->iwctl station <WLAN> connect <network SSID>
-
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 areradomir
,boris
(ThinkPad X1 Carbons), 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_IPTABLES
Default: 1
With1
, enableiptables.service
and install a default rule to only allow inbound on port 22INSTALL_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 installation -
Run the install script:
$ ./install.sh
-
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 andnm-connection-editor
to configure. -
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 the new command. 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/examples/config.ini 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.ini
. Runpolybar -m
to find active display names. The variables read by the Polybar config are defined in$HOME/dotfiles/.profile
. -
If network status is missing from Polybar, update the
eth
andwlan
modules in$HOME/dotfiles/.config/polybar/config.ini
with the correct interface names. This can be done withPOLYBAR_ETH_INTERFACE
andPOLYBAR_WLAN_INTERFACE
environment variables 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