使用u盤啟動盤安裝arch到硬盤
一:準(zhǔn)備工作:
1)下載arch鏡像文件和sig文件并放到同一個文件夾下。https://www.archlinux.org/download/
linux非arch環(huán)境下的校驗(yàn)代碼如下:
#gpg --verify ./archlinux-2012.10.06-dual.iso.sig
得到了一個錯誤:gpg: Signature made Sat 06 Oct 2012 03:28:53 PM IST using RSA key ID 9741E8ACgpg: Can’t check signature: public key not found
#gpg --no-default-keyring --keyring vendors.gpg --keyserver pgp.mit.edu --recv-key 9741E8AC
#gpg --verify --verbose --keyring vendors.gpg ./archlinux-2012.10.06-dual.iso.sig
看到如下信息
gpg: assuming signed data in `./archlinux-2012.10.06-dual.iso’gpg: Signature made Sat 06 Oct 2012 03:28:53 PM IST using RSA key ID 9741E8ACgpg: using PGP trust modelgpg: Good signature from “Pierre Schmitz “gpg: WARNING: This key is not certified with a trusted signature!gpg: There is no indication that the signature belongs to the owner.PRimary key fingerprint: 4AA4 767B BC9C 4B1D 18AE 28B7 7F2D 434B 9741 E8ACgpg: binary signature, digest algorithm SHA1
2)準(zhǔn)備一個1Gu盤就可以做啟動盤
# dd bs=4M if=/path/to/archlinux.iso of=/dev/sdx && sync用lsblk 找到U盤并確保沒有掛載啟動盤做好后設(shè)置bios從u盤啟動,重啟進(jìn)入Boot Archlinux(i686)我是32位
二:開始安裝
1)設(shè)置鍵盤布局
# loadkeys us
2)接入網(wǎng)絡(luò),我的網(wǎng)卡是broadcom使用的是動態(tài)ip
#ip link沒有發(fā)現(xiàn)端口
#modprobe -r tg3
#modprobe broadcom
#modprobe tg3
#ip link
#ip link set interfacename up
#ping -c 3 www.baidu.com
3)硬盤分區(qū),我使用fdisk自帶工具,其實(shí)很簡單
我先創(chuàng)建三個主分區(qū),一個擴(kuò)展分區(qū),再從擴(kuò)展分區(qū)創(chuàng)建兩個邏輯分區(qū)
詳細(xì)請查閱wiki很好
4)分別格式化分區(qū),并掛載
#mkfs.ext4 /dev/sdaX
若您分了一個 swap 區(qū),也不要忘了格式化并啟用它
#mkfs.ext4 /dev/sda1
#mkswap /dev/sda2
#swapon /dev/sda2
#mkfs.ext4 /dev/sda3
#mkfs.ext4 /dev/sda5
#mkfs.ext4 /dev/sda6
掛載各分區(qū),根據(jù)個人方案掛載各分區(qū),我的分區(qū)
/dev/sda1 200M /boot
/dev/sda2 500M swqp
/dev/sda3 20G /
/dev/sda5 12G /var
/dev/sda6 265G /home
掛載
#mount /dev/sda3 /mnt
#mkdir /mnt/boot
#mount /dev/sda1 /mnt/boot
#mkdir /mnt/var
#mount /dev/sda5 /mnt/var
#mkdir /mnt/home
#mount /dev/sda6 /mnt/home
5)vi /etc/pacman.d/mirrorlist
Server=http://mirrors.ustc.edu.cn/archlinux/$repo/os/$arch
可以使用其他的源,修改后一定要強(qiáng)制刷新
#pacman -Syy
6) 安裝
#pacstrap /mnt base base-devel
7)生成fstab
#genfstab -U -p /mnt >> /mnt/etc/fstab
8)切到新系統(tǒng)
#arch-chroot /mnt /bin/bash
9)nano /etc/locale.gen
取消注釋
en.US.UTF-8 UTF-8
zh.CN.UTF-8 UTF-8
zh.TW.UTF-8 UTF-8
#locale-gen
10)
#ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
11)
#hwclock --systohc --utc
12)
# echo myhostname > /etc/hostname
并在 /etc/hosts 添加同樣的主機(jī)名:
## /etc/hosts: static lookup table for host names##<ip-address><hostname.domain.org><hostname>127.0.0.1localhost.localdomainlocalhostmyhostname::1localhost.localdomainlocalhost# End of file
13) 配置網(wǎng)絡(luò)一勞永逸
#systemctl enable dhcpcd@interfacename.service
14)設(shè)置Root密碼
#passwd
15)
# pacman -S grub# grub-install --target=i386-pc --recheck /dev/sda# grub-mkconfig -o /boot/grub/grub.cfg#exit#rebootThe End
注:以上信息來源https://wiki.archlinux.org
新聞熱點(diǎn)
疑難解答
圖片精選