Arch Linux Install Battle
grub から systemd-boot にしたいなぁと思っていて,どうせなら綺麗にするかということで
Environment
Section titled “Environment”- Surface Pro
- Type Cover Keyboard (US)
インターネット接続
Section titled “インターネット接続”WiFi でやっていく
ip link set wlan0 upwpa_supplicant -B -i wlan0 -c <(wpa_passphrase SSID password)dhcpcdパーティションの作成
Section titled “パーティションの作成”gdisk と思ったら最近はワンライナーでいけるらしい
sgdisk -z /dev/sdasgdisk -n 1:0:+512M -t 1:ef00 -c 1:"EFI System" /dev/sdasgdisk -n 2:0: -t 2:8300 -c 2:"Linux filesystem" /dev/sdaフォーマット
Section titled “フォーマット”mkfs.fat -F32 /dev/sda1mkfs.ext4 /dev/sda2mount /dev/sda2 /mntmkdir -p /mnt/bootmount /dev/sda1 /mnt/bootあとあと reflector で良い感じにするとして適当な日本のやつを上に書いておく
vim /etc/pacman.d/mirrorlistServer = http://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch必須パッケージのインストール
Section titled “必須パッケージのインストール”どうせいれるやつはこの段階でいれちゃう
pacstrap -K /mnt base base-devel linux linux-firmware linux-firmware-marvell \ intel-ucode efibootmgr dosfstools netctl vim \ iw wpa_supplicant networkmanagergenfstab -U /mnt >> /mnt/etc/fstabchroot
Section titled “chroot”arch-chroot /mntタイムゾーン
Section titled “タイムゾーン”ln -sf /usr/share/zoneinfo/Asia/Tokyo /etc/localtimehwclock --systohcローカリゼーション
Section titled “ローカリゼーション”vim /etc/locale.gen# en_US.UTF-8 UTF-8 をアンコメントlocale-genecho "LANG=en_US.UTF-8" > /etc/locale.confホストネーム
Section titled “ホストネーム”みんなどんな hostname にしているのか気になる
echo "hostname" > /etc/hostnameInitramfs
Section titled “Initramfs”カーネルパッケージをインストールしたときに mkinitcpio が実行されているため、普通は新しい initramfs の作成は必要ありません,とのことだが一応やっておく
mkinitcpio -PRoot パスワード
Section titled “Root パスワード”passwdブートローダー
Section titled “ブートローダー”Secure boot はどっかのタイミングでやりたい
bootctl install設定は /boot/loader/loader.conf
default arch.conftimeout 3console-mode keepeditor noローダの追加は /boot/loader/entries/arch.conf とします
title Arch Linuxlinux /vmlinuz-linuxinitrd /intel-ucode.imginitrd /initramfs-linux.imgoptions root=/dev/sda2 rwsystemd-boot の定期更新を有効にしておく
systemctl enable systemd-boot-updateshutdown
Section titled “shutdown”USB メモリを抜くのを忘れない
exitshutdown -h now改めてネットワーク接続
Section titled “改めてネットワーク接続”systemctl start NetworkManagersystemctl enable NetworkManagernmctl d wifi connect SSID password passworduseradd -m -g wheel -d /home/yuzumone -m yuzumonepasswd yuzumonevisudo # いつものやつをアンコメントPacman 周り
Section titled “Pacman 周り”pacman
sudo vim /etc/pacman.conf# ParallelDownloads = 5 と Color をアンコメントreflector
sudo pacman -S reflectorsudo reflector --country Japan,Australiasudo systemctl enable reflector.timerpaccache
sudo pacman -S pacman-contribsudo systemctl enable paccache.timer毎週 TRIM するようにする
sudo systemctl enable fstrim.timergit clone https://aur.archlinux.org/yay.gitcd yaymakepkg -siGUI は sway + lightdm で設定