Install Arch Linux on ThinkPad X1 Carbon
14 Sep 2018 | LinuxIt’s really a hard time installing Arch Linux on my ThinkPad X1 Carbon. Just write this down to remember the correct installation steps. Reference: Arch Wiki, viseator’s blog.
-
Make the USB installation disk via
dd: Arch Wiki and turn secure boot off. - Login and connect to the internet (for WPA/WPA2)
- Stop dhcpcd service:
systemctl stop dhcpcd@interfacewhereinterfaceis tab-completed. - Get the name of interface:
iw dev(here the name is wlp4s0) - Scan the wireless connection:
iwlist wlp4s0 scan - Connect:
wpa_supplicant -B -i wlp4s0 -c <(wpa_passphrase SSID KEY) - Check status:
iw dev wlp4s0 link - Start dhcpcd service:
dhcpcd - Update clock:
timedatectl set-ntp true
- Stop dhcpcd service:
- Partite the disk
- Check here for making new partition (acturally, no need here)
- Format the partition:
mkfs.ext4 /dev/nvme0n1p2
- Mount the filesystem
mount /dev/nvme0n1p2 /mnt- (For EFI)
mkdir /mnt/boot && mount /dev/nvme0n1p1 /mnt/bootwhere/dev/nvme0n1p1is the existing EFI partition
- Select the source mirrors
vim /etc/pacman.d/mirrors, usey(copy) andp(paste) to copy U.S. sources to the beginning- Install base pkgs:
pacstrap /mnt base base-devel
- Configure the system
- Fstab:
genfstab -L /mnt >> /mnt/etc/fstab(-Ufor defined by UUID and-Lfor labels); Check bycatto see if there’s errors - Change root:
arch-chroot /mnt - Select timezone:
ln -sf /usr/share/zoneinfo/America/Chicago /etc/localtime hwclock --systohc - set root password:
passwd - Pre-install pkgs:
pacman -S vim dialog wpa_supplicant ntfs-3g networkmanager - Set locale:
vim /etc/locale.gen, uncommentzh_CN, en_US, thenlocale-gen echo "LANG=en_US.UTF-8" >> /etc/locale.conf - Set hostname:
echo "chuan" >> /etc/hostname - Set hosts:
vim /etc/hostsand add entries127.0.0.1 localhost ::1 localhost 127.0.1.1 chuan.localdomain chuan - Install bootloader
pacman -S intel-ucode pacman -S os-prober pacman -S grub efibootmgr grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=grub grub-mkconfig -o /boot/grub/grub.cfgIF WARNING/ERROR: check viseator’s blog
- Check: see the same link above.
- Reboot:
exit reboot
- Fstab:
- Configure after installations Ref: viseator’s blog, Arch Wiki
- If in 7.10 there’s no entry for Windows, then run
grub-mkconfig -o /boot/grub/grub.cfg - Connect to internet:
wifi-menu - Add user: (
-m: add home folder,-G wheel: add to group)useradd -m -G wheel chuan - Install and configure
sudo:pacman -S sudo visudouncomment
# %wheel ALL=(ALL)ALL,reboot-> notice to connect to the Internet!
- If in 7.10 there’s no entry for Windows, then run
- Install GUI
- Driver for graphics card
sudo pacman -S xf86-video-intel - Xorg
sudo pacman -S xorg - DE
sudo pacman -S gnome sudo pacman -S sddm - startups
sudo systemctl enable sddm sudo systemctl disable netctl sudo systemctl enable NetworkManager
- Driver for graphics card
Done.