Artix : Arch擁抱OpenRC 使用筆記

輕量桌面Archlinux用戶逃離systemd,擁抱Gentoo的openrc.php

  • 鏡像源:官方鏡像源很是慢,曾經一度體驗artix後就放棄了,後來發現了清華和騰訊雲的鏡像,速度很是快,如今又從新安裝了Artix,替代Arch和Manjaro成爲了使用的主力發行版。

Artix介紹:

Artix Linux on DistroWatch:
Artix Linux is a fork (or continuation as an autonomous project) of the Arch-OpenRC and Manjaro-OpenRC projects. Artix Linux offers a lightweight, rolling-release operating system featuring the OpenRC init software. (An alternative spin features the runit init software.) Three editions of Artix are available, a minimal Base system, an edition featuring the i3 window manager and an edition which runs the LXQt desktop.
主頁:https://artixlinux.org/linux

安裝詳解:

It is possible to use runit iso to install OpenRC-based system, and vice-versa.
使用不一樣版本iso能夠相互安裝沒有影響。bash

準備磁盤

  • 使用fdisk進行硬盤分區 (這裏使用/dev/sda)
fdisk /dev/sda
  • 格式化分區(使用mkfs)
mkfs.ext4 -L ROOT /dev/sda1        <- root partition
 mkfs.ntfs -L HOME /dev/sda2        <- home partition, optional
 mkfs.ext4 -L BOOT /dev/sda3        <- boot partition, optional
 mkswap -L SWAP /dev/sda4           <- swap partition
  • The -L switch assigns labels to the partitions, which helps referring to them later through /dev/disk/by-label without having to remember their numbers.
  • 使用 mkfs.ntfs 時須要 ntfs-3g
  • 掛載分區
mount /dev/sda1 /mnt
 mount /dev/sda2 /mnt/home  (if created)
 mount /dev/sda3 /mnt/boot  (if created)
 swapon /dev/sda4

安裝base系統

  • 修改本地鏡像

編輯/etc/pacman.d/mirrorlist,加入本地鏡像,目前騰訊雲和清華大學的鏡像可用。app

Server = https://mirrors.cloud.tencent.com/artixlinux/$repo/os/$arch    # 騰訊雲
Server = https://mirrors.tuna.tsinghua.edu.cn/artixlinux/$repo/os/$arch    #清華大學

編輯/etc/pacman.d/mirrorlist-arch,註釋掉Worldwide ,選擇 China取消註釋。ide

安裝的時候必定要先修改鏡像地址,否則安裝速度讓人發狂。code

  • 更新軟件倉庫
pacman -Syy
  • 安裝系統

使用 basestrap 安裝 base , init系統 (目前 openrcrunit 可用),base-devel 選裝。rem

basestrap /mnt base base-devel openrc
  • 使用 fstabgen 生成 /etc/fstab
fstabgen -L /mnt >>/mnt/etc/fstab

-U for UUIDs
-L for partition labels:get

  • chroot 進入新安裝的Artix系統
artools-chroot /mnt

配置base系統

  • 安裝啓動項:grubos-prober
pacman -S grub os-prober
 grub-install --recheck /dev/sda
 grub-mkconfig -o /boot/grub/grub.cfg
  • 建立用戶和密碼
useradd  user -g wheel -m
 passwd user
  • 設置root密碼
passwd
  • 生成 locales:
nano /etc/locale.gen  <- uncomment your locale
 locale-gen

配置系統全局locale:編輯/etc/locale.conf(sourced by /etc/profile) 或
/etc/bash/bashrc.d/artix.bashrc/etc/bash/bashrc.d/local.bashrc
配置用戶級locale: ~/.bashrcit

export LANG="en_US.UTF-8"
 export LC_COLLATE="C"
  • 安裝networkmanager
pacman -S networkmanager networkmanager-openrc network-manager-applet
 rc-update add NetworkManager default

安裝完成

exit   <- exit chroot environment
 umount -R /mnt
 reboot
相關文章
相關標籤/搜索