安裝Arch Linux手冊

選擇安裝方式

CD/USB Arch啟動盤安裝

使用Arch啟動盤比較簡單方便,沒有額外設(shè)置,直接閱讀下一步。
USB flash installation media

啟動盤制作: USB flash installation media

從已經(jīng)存在的Linux系統(tǒng)中安裝(非Arch類)

從已經(jīng)存在的非Arch系統(tǒng)環(huán)境中安裝arch,本質(zhì)上是搭建引導(dǎo)過程中可以運行arch-install-scripts 腳本(包括pacstraparch-chroot命令) 的系統(tǒng)環(huán)境。

  • 創(chuàng)建Arch chroot環(huán)境
    1、推薦使用bootstrap鏡像
### Download the bootstrap image from a mirror:
 [root@GENTOO ~] curl -O http://mirrors.kernel.org/archlinux/iso/2015.10.01/archlinux-bootstrap-2015.10.01-x86_64.tar.gz
### Extract the tarball:
 [root@GENTOO ~] cd /tmp# tar xzf <path-to-bootstrap-image>/archlinux-bootstrap-2015.10.01-x86_64.tar.gz

2、編輯/tmp/root.x86_64/etc/pacman.d/mirrorlist本件,選擇鏡像源
3、進(jìn)入chroot環(huán)境

/tmp/root.x86_64/bin/arch-chroot /tmp/root.x86_64/
  • 使用Arch chroot環(huán)境
    1、初始化pacman keyring
# pacman-key --init
# pacman-key --populate archlinux

2、編輯/etc/pacman.d/mirrorlist本件,選擇鏡像源
3、更新軟件列表

# pacman -Syyu

4、安裝系統(tǒng)
Arch Chroot環(huán)境已經(jīng)具備,繼續(xù)下面的步驟,選擇安裝需要的系統(tǒng)base, base-devel, parted等.

參考:https://wiki.archlinux.org/index.php/Install_from_existing_Linux

準(zhǔn)備

準(zhǔn)備磁盤分區(qū)

  • 新建并格式化分區(qū)

至少準(zhǔn)備一個足夠大的/分區(qū),如果磁盤容量足夠,可以額外創(chuàng)建/home、/boot等。

  • 創(chuàng)建掛載目錄
mkdir /mnt
mkdir /mnt/boot
mkdir /mnt/home
  • 掛載根分區(qū)和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

準(zhǔn)備連接

  • 有線:

默認(rèn)使用Dhcp,一般自動檢測,無需設(shè)置

  • 無線:
wifi-menu
  • 編輯鏡像列表
wget -O /etc/pacman.d/mirrorlist https://www.archlinux.org/mirrorlist/all/

取消注釋中國的鏡像

安裝系統(tǒng)

pacstrap /mnt base

配置系統(tǒng)

fstab文件

  • Generate an fstab file (use -U or -L to define by UUID or labels):
genfstab -p /mnt >> /mnt/etc/fstab

chroot

arch-chroot /mnt

Hostname:

echo computer_name > /etc/hostname

Time zone:

ln -sf /usr/share/zoneinfo/zone/subzone /etc/localtime

Locale:

nano -w /etc/locale.gen
locale-gen

Password:

passwd

Initial RAM:

mkinitcpio -p linux

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

重啟

exit
reboot
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容