|
前段时间在arch.org的wiki上看到一篇文章,比较有意思,用livecd(不一定是arch)来安装arch
http://wiki.archlinux.org/index. ... tro&redirect=no
在自己的虚拟机+slax livecd上试了一把,果然不错,可以算是Linux From Pacman(LFP)了,整理加工后拿出来和大家分享.
有些命令是针对个人机器喜好的,你可以换成适合自己的命令
1.Configure your network
如果你的livecd做的比较好,网络应该会自动帮你配好了,所以就可以跳过这一步了
不过配置网络也不复杂:
modprobe 8139too or pcnet32(虚拟机)
ifconfig eth0 up
ifconfig lo up
dhcpcd
route
ping 网关
2.Prepare Hard Drive
cfdisk
分成两个分区/dev/sda1(作根分区,bootable) /dev/sda2(swap)
mkreiserfs /dev/sda1
mkswap /dev/sda2
挂载分区:
mkdir /newarch
mount /dev/sda1 /newarch
3.Select packages
我是从bjtu的镜像下载的:
wget(or snarf) http://mirror.bjtu.edu.cn/ArchLinux/current/os/i686/setup/packages.txt
只安装base包:
grep base packages.txt | awk -F '/|-[0-9]' '{print $2}' >base.txt
vi base.txt 把不想装的包剔去
4.Install Packages
先查看一下pacman的完整名
grep pacman packages.txt
output: base/pacman-2.9.8-4.pkg.tar.gz[/CODE]
下载pacman:
wget http://mirror.bjtu.edu.cn/ArchLinux/current/os/i686/pacman-2.9.8-4.pkg.tar.gz
解压到/下:
cp pacman-2.9.8-4.pkg.tar.gz /
cd /
tar -xvzf pacman-2.9.8-4.pkg.tar.gz
更改源:
vi /etc/pacman.conf
[current]
Server = http://mirror.bjtu.edu.cn/ArchLinux/current/os/i686/
[extra]
Server = http://mirror.bjtu.edu.cn/ArchLinux/extra/os/i686[/CODE]
更新软件仓库信息:
pacman.static -Sy -r /newarch
安装base包:
pacman.static -S `cat ~/base.txt` -r /newarch
5.Configure System
[color="Blue"]/etc/pacman.conf: cp /etc/pacman.conf /newarch/etc/pacman.conf
[color="Blue"]/etc/rc.conf: vi /newarch/etc/rc.conf
[color="Blue"]/etc/hosts: vi /newarch/etc/hosts
[color="Blue"]/etc/fstab必须)
vi /newarch/etc/fstab
/dev/sda1 / reiserfs defaults 0 1
/dev/sda2 swap swap defaults 0 0
[color="Blue"]/etc/mkinitrd.conf
vi /newarch/etc/mkinitrd.conf
MODULES='reiserfs'
[color="Blue"]/etc/modprobe.conf: vi /newarch/etc/modprobe.conf
[color="Blue"]/etc/resolv.conf: cp /etc/resolv.conf /newarch/etc/resolv.conf
6.Install Kernel
安装你喜欢的kernel
pacman.static -S kernel26 -r /newarch
7.Install Bootloader
安装grub
cp /newarch/sbin/grub* /sbin
cp -r /newarch/usr/lib/grub /usr/lib
grub-install --root-directory=/newarch --recheck /dev/sda
8.Configure grub/menu.lst
vi /newarch/boot/grub/menu.lst
title Arch Linux
boot (hd0,0)
kernel /boot/vmlinuz26 root=/dev/sda1 ro
initrd /boot/kernel26.img
reboot
整个流程是按照安装光盘的步骤完成的,如果你想装其它软件就可以交给新系统的pacman了
如果网速够快的话,不失为一种装系统的好方法... |
|