首先安装好一个gentoo系统后:
nfs服务器端:http://en.gentoo-wiki.com/wiki/NFS/Server
#/etc/init.d/nfs start
客户端(用u盘启动):
1:开启网络
2:分区(一定要用a来激活主分区)
1 ifconfig
10 ping saturn
18 fdisk /dev/sda
20 mke2fs /dev/sda1
21 mkfs.ext4 /dev/sda3
22 mkswap /dev/sda2
23 swapon /dev/sda2
vi /etc/exports
/boot/ 211.83.105.0/255.255.255.0(async,ro,no_subtree_check,no_root_squash)
25 mount -t nfs saturn:/boot/ /mnt/key/ 26 ls /mnt/key/
30 mount /dev/sda1 /mnt/gentoo/
31 cp -a /mnt/key/* /mnt/gentoo/
32 umount /mnt/gentoo/
umount /mnt/key/
服务器端:
#vi /etc/exports
/ 211.83.105.0/255.255.255.0(async,ro,no_subtree_check,no_root_squash)
saturn ~ # /etc/init.d/nfsreload
(在服务器端不需要 umount /boot/)
mount /dev/sda3 /mnt/gentoo
48 mount /dev/sda1 /mnt/gentoo/boot/
51 mount -t proc none /mnt/gentoo/proc
52 mount -o bind /dev/ /mnt/gentoo/dev
53 chroot /mnt/gentoo/ /bin/bash
env-update source /etc/profile
cp /proc/mounts /etc/mtab
grub-install --no-floppy /dev/sda
(出现(fd0)/dev/fd0
(hd0) /dev/sda
(hd1) /dev/sdb
才可以,又一次cp 忘了* 就只出现了下面2个)
50 rm /etc/udev/rules.d/70-persistent-net.rules -f
# exit cdimage ~# cd cdimage ~# umount /mnt/gentoo/boot /mnt/gentoo/dev /mnt/gentoo/proc /mnt/gentoo cdimage ~# reboot(无法umount时(busy),可能是其他终端有stop的任务,exit就OK)