Documenting all my install steps
- https://www.reddit.com/r/linux/comments/37uoya/easiest_way_to_move_complete_linux_install_from/
- https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_X230
- http://www.thinkwiki.org/wiki/Category:X230
- https://bbs.archlinux.org/viewtopic.php?pid=1393759#p1393759
- https://www.digitalocean.com/community/tutorials/understanding-systemd-units-and-unit-files
- https://raw.githubusercontent.com/windelicato/dotfiles/master/why_bspwm.gif
- Kernel boots fine from either USB port, but for some reason, the filesystem is not mounted if the left side USB port is used
- Set boot mode to UEFI Only to boot in UEFI mode, double check with
ls /sys/firmware/efi/efivars
- Stop
dhcp
on the wired network, we will use wireless:
Interface name autocompletes with tabsystemctl stop dhcpcd@enp0s25.service
- Check driver is properly loaded
lspci -k | grep wifi
- Identify the wireless interface
ip link
- Bring the interface up
ip link set wlp3s0 up ip link | grep UP
- Create a new
wpa_supplicant
configuration file ready to use withwpa_cli
:echo "ctrl_interface=/run/wpa_supplicant" > /etc/wpa_supplicant/wpa_supplicant.conf echo "update_config=1" >> /etc/wpa_supplicant/wpa_supplicant.conf
- Launch
wpa_supplicant
:wpa_supplicant -B -i wlp3s0 -c /etc/wpa_supplicant/wpa_supplicant.conf
- Configure
wpa_supplicant
withwpa_cli
:scan scan_results add_network set_network 0 ssid "MYSSID" set_network 0 psk "passphrase" enable_network 0 save_config
- Obtain an IP address
dhcpcd wlp3s0 ping archlinux.org
- Update the system clock
timedatectl set-ntp true timedatectl status
- Partinioning the disk
The bellow partition scheme was used on the default 128G SDD
gdisk /dev/sda o n default +512M EF00 n default +118G 8300 n default default 8200 c 1 EFI c 2 ROOT c 3 SWAP w
- Create FileSystems
mkfs.fat -F32 /dev/sda1 mkfs.ext4 /dev/sda2 mkswap /dev/sda3 swapon /dev/sda3
- Mount FileSystems
mount /dev/sda2 /mnt mkdir /mnt/boot mount /dev/sda1 /boot
- Install Base Software
pacstrap /mnt base
- Generate
fstab
genfstab -U /mnt >> /mnt/etc/fstab
- Change root
arch-chroot /mnt
- Set timezone, locales, keyboard and fonts
ln -sf /usr/share/zoneinfo/Europe/Lisbon /etc/localtime vi /etc/locale.gen (uncomment en_US.UTF-8 UTF-8 and en_US ISO-8859-1) locale-gen echo "LANG=en_US.UTF-8" > /etc/locale.conf loadkeys us-acentos echo "KEYMAP=us-acentos" > /etc/vconsole.conf setfont eurlatgr echo "FONT=eurlatgr" >> /etc/vconsole.conf
- Set the root password
passwd
- Set the hostname
echo x230 > /etc/hostname echo "127.0.0.1 localhost x230 x230.localdomain" >> /etc/hosts echo "::1 localhost x230 x230.localdomain" >> /etc/hosts
- Configure
/etc/systemd/network/25-wired.network
[Match] Name=enp0s25 [Network] DHCP=ipv4 [DHCP] RouteMetric=10
- Configure
/etc/systemd/network/25-wireless.network
[Match] Name=wlp3s0 [Network] DHCP=ipv4 [DHCP] RouteMetric=20
- Configure
wpa_supplicant
pacman -S wpa_supplicant wpa_passphrase SSID PASSWORD > /etc/wpa_supplicant/wpa_supplicant-wlp3s0.conf systemctl enable wpa_supplicant@wlp3s0 systemctl enable systemd-networkd.service
- Configure
systemd-resolved
Edit/etc/systemd/resolved.conf
:
EnableFallbackDNS=4.2.2.1 1.1.1.1 8.8.8.8 9.9.9.10 DNSSEC=allow-downgrade Cache=yes DNSStubListener=true ReadEtcHosts=yes
systemd-resolved
name resolution:
A soft link is required forsystemctl enable systemd-resolved
systemd-resolved
to perform name resolution, if not possible at this point perform this action latter.ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
- Install packages
pacman -S grub efibootmgr intel-ucode grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB grub-mkconfig -o /boot/grub/grub.cfg
- Exit chroot and reboot
useradd -m ferrao -G wheel
pacman -S sudo
visudo
%wheel ALL=(ALL) ALL
passwd ferrao
- Add to
/etc/systemd/system/kbdrate.service
:
[Unit]
Description = Keyboard repeat rate in tty.
[Service]
Type = oneshot
RemainAfterExit = yes
StandardInput = tty
StandardOutput = tty
ExecStart = /usr/bin/kbdrate -s -d 200 -r 60
[Install]
WantedBy = multi-user.target
pacman -S --needed base-devel
pacman -S vim git
su - ferrao
git clone https://aur.archlinux.org/aur.git
cd aurutils
makepkg -si
cd ..
Aur packages can be fetched with aur fetch <package>
and installed with makepkg -si
sudo pacman -S acpid acpi lm_sensors
sudo systemctl enable acpid
sudo sh -c 'echo "options snd_hda_intel power_save=1" > /etc/modprobe.d/audio_powersave.conf'
TODO: laptop-mode-tools
aur fetch thinkfan
cd thinkfan
makepkg -si
sudo sh -c 'echo "START=yes" > /etc/default/thinkfan'
sudo sh -c 'echo "options thinkpad_acpi experimental=1 fan_control=1" > /etc/modprobe.d/thinkpad-acpi.conf'
sudo cp /usr/share/doc/thinkfan/examples/thinkfan.conf.simple /etc/thinkfan.conf
Edit /etc/thinkfan.conf
:
tp_fan /proc/acpi/ibm/fan
hwmon /sys/class/thermal/thermal_zone0/temp
(0, 0, 42)
(1, 40, 47)
(2, 45, 52)
(3, 50, 57)
(4, 55, 62)
(5, 60, 72)
(6, 65, 77)
(7, 70, 80)
(127, 75, 32767)
Enable fan control:
sudo systemctl enable thinkfan
systemctl status thinkfan
Requires reloading all acpi and thinkpad related modules to get thinkfan working properly, should be ok at next reboot.
- Edit
/etc/mkinitcpio.conf
and make sure we have:
MODULES=(i915)
- Edit
/etc/default/grub
and set the following line:GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=video acpi_osi=\"!Windows 2012\""
- Fetch and install plymouth
aur fetch plymouth plymouth-theme-dark-arch
Edit /etc/plymouth/plymouth.conf
:
Theme=dark-arch
ShowDelay=1
Add plymouth
to HOOKS
after base udev
on /etc/mkinitcpio.conf
and rebuild ram image and boot loader:
sudo mkinitcpio -p linux
sudo grub-mkconfig -o /boot/grub/grub.cfg
sudo reboot
sudo pacman -S openssh dnsutils tcpdump lynx i7z neofetch htop lsof udisk2 bc mlocate
For some reason the halt
command does not shutdow the machine, shutdown
command is required
alias reboot="sudo reboot"
alias halt="sudo shutdown -h now"
- Uncomment the
multilib
repo in/etc/pacman.conf
- Install the xorg server
sudo pacman -S xorg xorg-xinit xf86-video-intel xf86-video-fbdev mesa mesa-demos lib32-mesa vulkan-intel libva-intel-driver xterm xorg-xclock xorg-twm xbindkeys ttf-liberation ttf-ubuntu-font-family ttf-fira-mono ttf-freefont adobe-source-code-pro-fonts ttf-freefont adobe-source-sans-pro-fonts ttf-linux-libertine xorg-fonts-type1 xorg-fonts-misc ttf-bitstream-vera ttf-dejavu bdf-unifont ttf-font-awesome libxcb xcb-util xcb-util-keysysm xcb-util-wm upower notification-daemon udiskie xdotool
- Edit
/etc/X11/xinit/xserverrc
and start the server with:
exec /usr/bin/X -dpi 125.37 -nolisten tcp "$@"
- Let
Xorg
start as root, required forxf86-video-fbdev
:
sudo sh -c 'echo "needs_root_rights = yes" > /etc/X11/Xwrapper.conf'
- Configure automont by adding to
/etc/X11/xinit/xinitrc
:
udiskie &
- Configure the X typematic rate by adding to
/etc/X11/xinit/xinitrc
:
xset r rate 200 60
- Configure the keyboard by adding
/etc/X11/xorg.conf.d/00-keyboard.conf
:
Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbLayout" "us"
Option "XkbVariant" "altgr-intl"
EndSection
- Instal alsa utils
sudo pacman -S alsa-utils alsa-plugins alsa-firmware
- Map X events to alsa commands on
~/.xbindkeysrc
:
# ALSA
"amixer set Master toggle"
XF86AudioMute
"amixer set Master 5%-"
XF86AudioLowerVolume
"amixer set Master 5%+"
XF86AudioRaiseVolume
- Execute
xbindkeys
on/etc/X11/xinit/xinitrc
before any window manager
- Configure Trackpoint with
libinput
andxorg
by setting/etc/X11/xorg.conf.d/20-trackpoint.conf
Section "InputClass"
Identifier "trackpoint"
Driver "libinput"
MatchProduct "TPPS/2 IBM TrackPoint"
MatchDevicePath "/dev/input/event*"
Option "NaturalScrolling" "false"
# adaptive or flat
Option "AccelProfile" "adaptive"
# float between -1 and 1
Option "AccelSpeed" "0.5"
EndSection
pacman -S arandr
- Fetch and install required packages
sudo pacman -S bspwm sxhkd polybar kitty rofi dunst libnotify feh compton gtk3 gtk2 qt5-base qt4 arc-gtk-theme arc-icon-theme gtk-engine-murrine ranger xdg-utils atool
- Add
compton -Cb
to/etc/X11/xinit/xinitrc
- Execute the
bspwm
binary on/etc/X11/xinit/xinitrc
- Copy configuration files
mkdir ~/.config
mkdir ~/.config/bspwm
mkdir ~/.config/sxhkd
cp /usr/share/doc/bspwm/examples/bspwmrc ~/.config/bspwm
cp /usr/share/doc/bspwm/examples/sxhkdrc ~/.config/sxhkd
ranger --copy-config=all
Hi @ferrao, thanks for putting this together. I've been referencing as I go through the Arch wiki install page (as I have an x230 as well) and it's quite helpful. I believe you may have a typo when mounting the boot partition: 'mount /dev/sda1 /boot' should be 'mount /dev/sda1 /mnt/boot' because you have not changed to the new root directory yet. Please let me know if I'm misunderstanding something. Also you have close quotation marks after the output files in your echo statements when configuring wpa_supplicant.