Arch Linux安装详解

本文详细介绍了如何在Linux系统中进行磁盘分区、创建挂载目录、连接网络、安装系统、配置系统等操作,包括无线连接、编辑镜像列表、安装系统、生成fstab文件、设置主机名、时区、locale、密码、安装bootloader等步骤。
准备磁盘分区
  • 创建挂载目录
mkdir /mnt
mkdir /mnt/boot
mkdir /mnt/home
  • 挂在根分区和swap

    Mount the root partition on /mnt. After that, create directories for and mount any other partitions (/mnt/boot, /mnt/home, ...) and activate your swap partition if you want them to be detected later by genfstab.

mount /dev/sdax /mnt
mount /dev/sdax/boot
mount /dev/sdax/home
连接网络
  • 无线:
wifi-menu
  • 编辑镜像列表
wget -O /etc/pacman.d/mirrorlist https://www.archlinux.org/mirrorlist/all/
安装系统
pacstrap /mnt base
配置系统
  • Generate an fstab file (use -U or -L to define by UUID or labels):
genfstab -p /mnt >> /mnt/etc/fstab
  • chroot
arch-chroot /mnt
  • Set the hostname:
echo computer_name > /etc/hostname
  • Set the time zone:
ln -sf /usr/share/zoneinfo/zone/subzone /etc/localtime
  • Set the locale:
nano -w /etc/locale.gen
locale-gen
  • Set the password:
passwd
Create a new initial RAM disk:
mkinitcpio -p linux
Install a bootloader:
  • 安装grub2:
pacman -S grub
grub-install --target=i386-pc --recheck /dev/sda
  • Dual-booting:
pacman -S os-prober
  • 生成grub配置文件
grub-mkconfig -o /boot/grub/grub.cfg
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值