Install Gentoo From Stage 3
bladebai 2005.12.28
http://www.gentoo.org/doc/zh_tw/handbook/2005.0/handbook-x86.xml?style=printable&full=1
passwd
输入root密码
/etc/init.d/sshd start
fdisk分区
/dev/hda1 ext2 32M 開機分割區(Boot partition)
/dev/hda2 (swap) 512M Swap 分割區
/dev/hda3 ext3 磁碟剩下的空間 根 或是 主分割區(Root partition)
mke2fs /dev/hda1
mke2fs -j /dev/hda3
mkswap /dev/hda2
swapon /dev/hda2
mount -t ext3 /dev/hda3 /mnt/gentoo
mkdir /mnt/gentoo/boot
mount /dev/hda1 /mnt/gentoo/boot
date
设置时间
cd /mnt/gentoo
tar -xvjpf /mnt/cdrom/stages/stage3-x86-2005.1-r1.tar.bz2
tar -xvjf /mnt/cdrom/snapshots/portage-20050709.tar.bz2 -C /mnt/gentoo/usr
mkdir /mnt/gentoo/usr/portage/distfiles
cp /mnt/cdrom/distfiles/* /mnt/gentoo/usr/portage/distfiles/
mount -t proc none /mnt/gentoo/proc
cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile
ln -sf /usr/share/zoneinfo/Asia /etc/localtime
emerge gentoo-sources
rm /usr/src/linux
cd /usr/src
ln -s linux-2.6.12-gentoo-r10 linux
emerge genkernel
zcat /proc/config.gz > /usr/share/genkernel/x86/kernel-config-2.6
genkernel all
emerge -k coldplug
rc-update add coldplug boot
{
cd /usr/src/linux
make menuconfig
General setup --->
[*] Support for hot-pluggable devices
Processor type and features --->
Subarchitecture Type (PC-compatible) --->
(依照您的處理器所更換)
(Athlon/Duron/K7) Processor family
File systems --->
Pseudo Filesystems --->
<*> /proc file system support
< > /dev file system support (OBSOLETE)
<*> Automatically mount at boot
<*> Virtual memory file system support (former shm fs)
(按照您系統所需要的檔案系統開啟以下選項)
<*> Reiserfs support
<*> Ext3 journalling file system support
<*> JFS filesystem support
<*> Second extended fs support
<*> XFS filesystem support
Device Drivers --->
ATA/IDE/MFM/RLL support --->
[*] Generic PCI bus-master DMA support
[*] Use PCI DMA by default when available
Device Drivers --->
Networking support --->
<*> PPP (point-to-point protocol) support
<*> PPP support for async serial ports
<*> PPP support for sync tty ports
Device Drivers --->
USB Support --->
<*> USB Human Interface Device (full HID) support
[*] HID input layer support
make && make modules_install
cp arch/i386/boot/bzImage /boot/kernel-2.6.12-gentoo-r10
cp .config /boot/config-2.6.12-gentoo-r10
}
nano -w /etc/fstab
/dev/hda1 /boot ext2 defaults,noatime 1 2
/dev/hda2 none swap sw 0 0
/dev/hda3 / ext3 noatime 0 1
none /proc proc defaults 0 0
none /dev/shm tmpfs nodev,nosuid,noexec 0 0
/dev/cdroms/cdrom0 /mnt/cdrom auto noauto,user 0 0
echo bladebai > /etc/hostname
echo homenetwork > /etc/dnsdomainname
rc-update add domainname default
nano -w /etc/conf.d/net
iface_eth0="dhcp"
dhcpcd_eth0="-HD"
# rp-pppoe
#iface_eth0="up"
rc-update add net.eth0 default
nano -w /etc/hosts
127.0.0.1 localhost
passwd
输入root密码
echo "tts/0" >> /etc/securetty
nano -w /etc/rc.conf
emerge syslog-ng
rc-update add syslog-ng default
emerge vixie-cron
rc-update add vixie-cron default
emerge slocate
檔案系統 工具 安裝指令
XFS xfsprogs emerge xfsprogs
ReiserFS reiserfsprogs emerge reiserfsprogs
JFS jfsutils emerge jfsutils
emerge dhcpcd
USE="-X" emerge rp-pppoe
emerge grub
nano -w /boot/grub/grub.conf
default 0
timeout 30
splashimage=(hd0,0)/grub/splash.xpm.gz
title=Gentoo Linux 2.6.12-r10
root (hd0,0)
kernel /kernel-genkernel-x86-2.6.12-gentoo-r10 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hda3 udev
initrd /initramfs-genkernel-x86-2.6.12-gentoo-r10
title=Windows XP
root (hd0,5)
makeactive
chainloader +1
cp /proc/mounts /etc/mtab
grub-install /dev/hda
{
# 將為開機預設。0為第一,1為第二,以此類推。
default 0
# 使用預設前等待的開機秒數。
timeout 30
# 將漂亮又肥大的 splash-image 啟用:)
# 如果您沒有安裝顯示卡,請註解這行
splashimage=(hd0,0)/grub/splash.xpm.gz
title=Gentoo Linux 2.6.11-r3
# 儲存核心檔的分割區(或是作業系統)
root (hd0,0)
kernel /kernel-2.6.11-gentoo-r3 root=/dev/hda3
# 以下三行為 Windows 系統適合的雙重開機。
# 在我們的例子,Windows是放在 /dev/hda6
title=Windows XP
rootnoverify (hd0,5)
makeactive
chainloader +1
grub
grub> root (hd0,0) (指定你的 /boot 分割區位置)
grub> setup (hd0) (安裝 GRUB 到 MBR)
grub> quit (離開 GRUB shell)
}
exit
cd
umount /mnt/gentoo/boot /mnt/gentoo/proc /mnt/gentoo
reboot
ln -s /usr/lib/gcc-lib/i686-linux-gnu /usr/lib/gcc-lib/i386-linux-gnu
emerge --sync
emerge kde
{
mount /mnt/cdrom
export PKGDIR="/mnt/cdrom"
emerge --usepkg kde
}
reboot
echo "startkde" > ~/.xinitrc
startx
posted on 2006-12-03 20:19
Flutist 阅读(339)
评论(0) 编辑 收藏 引用 所属分类:
学习文章