Linux学习|Gentoo/Arch/FreeBSD

Artix : Arch拥抱OpenRC 使用笔记

2018-10-09  本文已影响50人  孤逐王

轻量桌面Archlinux用户逃离systemd,拥抱Gentoo的openrc.

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/

安装详解:

It is possible to use runit iso to install OpenRC-based system, and vice-versa.
使用不同版本iso可以相互安装没有影响。

准备磁盘

 fdisk /dev/sda
 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,加入本地镜像,目前腾讯云和清华大学的镜像可用。

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取消注释。

安装的时候一定要先修改镜像地址,不然安装速度让人发狂。

 pacman -Syy

使用 basestrap 安装 base , init系统 (目前 openrcrunit 可用),base-devel 选装。

 basestrap /mnt base base-devel openrc
 fstabgen -L /mnt >>/mnt/etc/fstab

-U for UUIDs
-L for partition labels:

 artools-chroot /mnt

配置base系统

 pacman -S grub os-prober
 grub-install --recheck /dev/sda
 grub-mkconfig -o /boot/grub/grub.cfg
 useradd  user -g wheel -m
 passwd user
 passwd
 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: ~/.bashrc

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

安装完成

 exit   <- exit chroot environment
 umount -R /mnt
 reboot
上一篇下一篇

猜你喜欢

热点阅读