Created
March 14, 2020 05:32
-
-
Save hr3lxphr6j/00dde079c96ade59d230caa0c50f4d0f to your computer and use it in GitHub Desktop.
install archlinux on XPS 13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install archlinux on XPS 13 | |
# change root password in archiso | |
passwd | |
# enable wifi if need | |
wifi-menu | |
# get ip address | |
ip addr | |
# start ssh | |
systemctl start sshd | |
# update pacman and install btrfs utils. | |
pacman -Syy && pacman -S btrfs-progs | |
# disk partition | |
parted /dev/nvme0n1 -s -a optimal mklabel gpt mkpart primary 1m 256m mkpart primary 256m 100% set 0 esp set 1 lvm && | |
mkfs.fat -F32 /dev/nvme0n1p1 && | |
pvcreate /dev/nvme0n1p2 && | |
vgcreate vg00 /dev/nvme0n1p2 && | |
lvcreate -l 100%FREE vg00 -n lv00 && | |
cryptsetup luksFormat /dev/vg00/lv00 && | |
cryptsetup open /dev/vg00/lv00 root && | |
mkfs.btrfs /dev/mapper/root && | |
mount /dev/mapper/root /mnt && | |
mkdir /mnt/boot && | |
mount /dev/nvme0n1p1 /mnt/boot | |
# install system | |
sed -i -e '/163/! s/^Server/#Server/' /etc/pacman.d/mirrorlist && | |
pacstrap /mnt base base-devel linux linux-firmware \ | |
btrfs-progs lvm2 intel-ucode vim git sudo efibootmgr wpa_supplicant dialog iw \ | |
openssh curl wget rsync screen zsh dhcpcd ntp | |
# gen fstab | |
genfstab -U -p /mnt >/mnt/etc/fstab | |
arch-chroot /mnt | |
echo LANG=zh_CN.UTF-8 >/etc/locale.conf && echo KEYMAP=us >/etc/vconsole.conf && echo fubuki >/etc/hostname && | |
sed -i -e 's/^#\(en_US.UTF-8\|zh_CN.UTF-8\|zh_CN.GBK\)/\1/' /etc/locale.gen && locale-gen && | |
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime | |
useradd -m -G wheel -s /bin/bash chigusa | |
passwd | |
passwd chigusa | |
vim /etc/sudoers | |
# Change: HOOKS=(base systemd autodetect modconf block sd-lvm2 keyboard sd-vconsole sd-encrypt filesystems) | |
vim /etc/mkinitcpio.conf | |
mkinitcpio -p linux | |
bootctl --path=/boot install | |
# Create bootloader entry | |
# Get luks-uuid with: `cryptsetup luksUUID /dev/vg00/lv00` | |
# blkid -s UUID -o value /dev/mapper/root | |
--- | |
/boot/loader/entries/arch.conf | |
--- | |
title Arch Linux | |
linux /vmlinuz-linux | |
initrd /intel-ucode.img | |
initrd /initramfs-linux.img | |
options rw luks.uuid=8000a844-26eb-4c35-bd11-465bee86e6b1 luks.name=8000a844-26eb-4c35-bd11-465bee86e6b1=root root=/dev/mapper/root | |
--- | |
# Set default bootloader entry | |
--- | |
/boot/loader/loader.conf | |
--- | |
default arch | |
--- | |
pacman -S xorg plasma konsole dolphin fcitx wqy-zenhei wqy-microhei adobe-source-han-sans-cn-fonts && | |
sddm --example-config > /etc/sddm.conf && | |
sed -i -e 's/^Current=/Current=breeze/' /etc/sddm.conf && | |
echo -e 'export GTK_IM_MODULE=fcitx\nexport QT_IM_MODULE=fcitx\nexport XMODIFIERS="@im=fcitx"' >/home/chigusa/.xprofile && | |
systemctl enable sddm NetworkManager |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment