准备

  1. 联网
  2. timedatectl set-ntp true
  3. loadkeys dvorak
  4. pacman -S tmux fish btrfs-progs

分区

mkfs.fat -F32 /dev/sdb1

sd flags size mount point file system
sdb1 efi 550 Mib /boot FAT32
sdb2 94.8 Gib / BTRFS
sdb3 swap 16.5 Gib

挂载

mount /dev/sdb2 /mnt
cd /mnt

mkdir /mnt/boot /mnt/home

mount /dev/sdb1 /mnt/boot
mount /dev/sda2 /mnt/home
mkswap /dev/sdb3
swapon /dev/sdb3

安装配置基本系统

tmux
pacstrap /mnt base  # arch-install-scripts
genfstab -L /mnt >> /mnt/etc/fstab

arch-chroot /mnt
pacman -S intel-ucode
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
hwclock --systohc
# edit /etc/locale.gen
locale-gen
echo 'Laptop' > /etc/hostname
vim /etc/hosts

add below to /etc/hosts

# Static table lookup for hostnames.
# See hosts(5) for details.
127.0.0.1 localhost.localdomain localhost
#::1 localhost.localdomain localhost
useradd user
usermod user -aG adm
pacman -S sudo fish networkmanager
visudo

配置启动项

bootctl install

add to /etc/pacman.d/hooks/systemd-boot.hook

[Trigger]
Type=Package
Operation=Upgrade
Target=systemd

[Action]
Description=Updating sysdemd-boot
When=PostTransaction
Exec=/usr/bin/bootctl update

add to /boot/loader/entries/archlinux.conf

title Charles Xu's Arch Linux
linux /vmlinuz-linux
initrd /intel-ucode.img
initrd /initramfs-linux.img
options root=/dev/sdb2
options resume=/dev/sdb3

change /etc/mkinitcpio.conf

52:HOOKS=(base udev autodetect modconf block filesystems keyboard resume fsck)

安装后的配置

  • 安装 git, fish-shell, tmux, curl, wget
  • 安装 gnome
  • 安装 CharlesScripts
  • 安装/删除软件 inst (inst), yao (yao)
  • 开启相应服务
/etc/systemd/system
├── bluetooth.target.wants
│   └── bluetooth.service -> /usr/lib/systemd/system/bluetooth.service
├── dbus-fi.w1.wpa_supplicant1.service -> /usr/lib/systemd/system/wpa_supplicant.service
├── dbus-org.bluez.service -> /usr/lib/systemd/system/bluetooth.service
├── dbus-org.freedesktop.Avahi.service -> /usr/lib/systemd/system/avahi-daemon.service
├── dbus-org.freedesktop.NetworkManager.service -> /usr/lib/systemd/system/NetworkManager.service
├── dbus-org.freedesktop.nm-dispatcher.service -> /usr/lib/systemd/system/NetworkManager-dispatcher.service
├── dbus-org.freedesktop.resolve1.service -> /usr/lib/systemd/system/systemd-resolved.service
├── display-manager.service -> /usr/lib/systemd/system/lightdm.service
├── getty.target.wants
│   └── getty@tty1.service -> /usr/lib/systemd/system/getty@.service
├── multi-user.target.wants
│   ├── atd.service -> /usr/lib/systemd/system/atd.service
│   ├── avahi-daemon.service -> /usr/lib/systemd/system/avahi-daemon.service
│   ├── avahi-dnsconfd.service -> /usr/lib/systemd/system/avahi-dnsconfd.service
│   ├── cronie.service -> /usr/lib/systemd/system/cronie.service
│   ├── fail2ban.service -> /usr/lib/systemd/system/fail2ban.service
│   ├── gpm.service -> /usr/lib/systemd/system/gpm.service
│   ├── NetworkManager.service -> /usr/lib/systemd/system/NetworkManager.service
│   ├── org.cups.cupsd.path -> /usr/lib/systemd/system/org.cups.cupsd.path
│   ├── pkgfile-update.timer -> /usr/lib/systemd/system/pkgfile-update.timer
│   ├── preload.service -> /usr/lib/systemd/system/preload.service
│   ├── remote-fs.target -> /usr/lib/systemd/system/remote-fs.target
│   ├── sshd.service -> /usr/lib/systemd/system/sshd.service
│   ├── systemd-resolved.service -> /usr/lib/systemd/system/systemd-resolved.service
│   ├── tlp.service -> /usr/lib/systemd/system/tlp.service
│   └── wpa_supplicant.service -> /usr/lib/systemd/system/wpa_supplicant.service
├── network-online.target.wants
│   └── NetworkManager-wait-online.service -> /usr/lib/systemd/system/NetworkManager-wait-online.service
├── printer.target.wants
│   └── org.cups.cupsd.service -> /usr/lib/systemd/system/org.cups.cupsd.service
├── sleep.target.wants
│   └── tlp-sleep.service -> /usr/lib/systemd/system/tlp-sleep.service
├── sockets.target.wants
│   ├── avahi-daemon.socket -> /usr/lib/systemd/system/avahi-daemon.socket
│   └── org.cups.cupsd.socket -> /usr/lib/systemd/system/org.cups.cupsd.socket
├── systemd-rfkill.service -> /dev/null
└── systemd-rfkill.socket -> /dev/null

7 directories, 31 files
  • trizen powerline-console-fonts后,编辑/etc/vconsole.conf,加入ter-powerline-v16n
  • sudo groupadd users;sudo usermod $USER -aG users
  • /etc/lightdm/lightdm-gtk-greeter.conf
[greeter]
background = /home/charles/.cache/wallpaper/dialog-image.jpg
theme-name = Arc-Flatabulous-Dark
icon-theme-name = Papirus-Dark
screensaver-timeout = 10
  • /etc/polkit-1/rules.d/85-suspend.rules
polkit.addRule(function(action, subject) {
    if (action.id == "org.freedesktop.login1.suspend" &&
        subject.isInGroup("users")) {
        return polkit.Result.YES;
    }
});
  • /etc/polkit-1/rules.d/86-mount.rules
polkit.addRule(function(action, subject) {
    if (action.id == "org.freedesktop.udisks2.filesystem-mount-system" &&
        subject.isInGroup("users")) {
        return polkit.Result.YES;
    }
});

results matching ""

    No results matching ""