½ö¹©²Î¿¼Ñ§Ï°¡£
½Ó´¥linuxÒѽ«½üÒ»Ä꣬°²×°²Ù×÷ϵͳ´ó¶¼ÊÇÓùâÅÌ°²×°»òÓ²ÅÌ°²×°£¬Ö±µ½Á½ÔÂǰżÓöchroot°²×°£¬¾¹È»Ò»¼ûÇãÐÄ£¬¸Ð¾õÕâÖÖ°²×°·½Ê½²»µ«ÈÝÒ×£¬¶øÇÒ½Úʡʱ¼ä£¬Ê¹×Ô¼º¹¤×÷°²×°Á½²»Îó¡£»ØÊ×ÍùÊ£¬ÀúÀúÔÚÄ¿£¬Ìرð¸Ð¼¤ÎҵĶ÷ʦclsjz,ûÓÐËû¾ÍûÓÐÎÒÏÖÔڵijɼ¨¡£°²×°Ç°ÔÚ×Ô¼ºµÄµçÄÔÉϱØÐëÒªÓÐÒ»¸ölinux²Ù×÷ϵͳ£¬È»ºóÏÂÔØstage3-*-2006.1.tar.bz2°üºÍportage-*.tar.bz2°ü.
1¡¢
mkfs.ext3 /dev/hda* (ÎÒÖ»Ó÷ÖÁËÒ»¸ö¸ù·ÖÇø£¬swap·ÖÇøÊǹ²ÏídebianµÄ)
mkdir -p /mnt/gentoo
mount /dev/hda* /mnt/gentoo
tar jxvf stage3-*-2006.1.tar.bz2 -C /mnt/gentoo
tar jxvf portage-*.tar.bz2 -C /mnt/gentoo/usr
cp /etc/resolv.conf /mnt/gentoo/etc
2¡¢
chroot /mnt/gentoo /bin/bash
mount -t proc proc /proc
env-update
source /etc/profile
(ÓÉÓÚÇ°ÃæÒѾ½âѹÁËÒ»¸ö×îеÄportage£¬ËùÒÔ´Ë´¦¾Í²»ÓÃÔÙÓÃemerge syncÃüÁîÁË£¬ÆäʵÎÒ¸öÈ˸оõÕâÑù×öºÜ½Úʡʱ¼ä£¬¶øÁ½ÕßµÄ×îÖÕ½á¹û¶¼ÊÇÒ»ÑùµÄ)
3¡¢
emerge vim (ÓÉÓÚÎÒ¸öÈ˱ȽÏÏ°¹ßÓÃvim£¬ËùÒÔÏÈ°ÑËü×°ÉÏ)
emerge prozilla (¶àÏß³ÌÏÂÔع¤¾ß£¬ÓÃËüÌæ´úwget£¬¿ÉÒÔÌá¸ßÏÂÔØËÙ¶È)
4¡¢
vi /etc/make.conf
ÔÚÔÀ´µÄ»ù´¡ÉϼÓÈë:
LDFLAGS="-Wl,-O1"
ACCEPT_KEYWORDS="~x86" (ÈÃ×Ô¼ºÏÂÔصİüÊÇ×îеÄ)
USE="cjk nls nptl nptlonly -qt -kde gtk gnome"
GENTOO_MIRRORS="http://gentoo.gg3.net" (¾²âÊÔ£¬ËÙ¶Èͦ¿ì)
MAKEOPTS="-j2"
FETCHCOMMAND='/usr/bin/proz --no-getch -s ${URI} -P ${DISTDIR}' (½«prozÉèΪĬÈϵÄÏÂÔع¤¾ß)
FEATURES="parallel-fetch " (¾Ý˵¿ÉÒÔÔÚ±àÒëʱ¼ÌÐøÏÂÔØ£¬µ«ºÜ¶àÍøÓѶ¼ËµÓò»ÁËÕâ¸ö¹¦ÄÜ(°üÀ¨ÎÒÔÚÄÚ)£¬ÈçÓÐÖªÇéÕߣ¬ÇëÖ¸µãÒ»ÏÂÃÔ½ò)
5¡¢
emerge gentoo-sources
cd /usr/src/linux
make menuconfig
make && make modules_install
cp arch/i386/boot/bzImage /boot/vmlinuz*
cp .config /boot/config*
6¡¢
emerge grub
menu.lstºÍfstabÁ½¸öÎļþµÄÄÚÈÝÇë¸ù¾Ý×Ô¼ºµÄÇé¿ö×ÔÐÐÉèÖã¬ÒÔÏÂÊÇÎÒµÄÅäÖÃÎļþ£¬½ö¹©²Î¿¼:
menu.list:
default=2
timeout=10
password --md5 $1$mr0Cg1$/tct8ZxZfbHpL195HTzTM0
splashimage=(hd0,5)/boot/grub/debiangreen.xpm.gz
title ThizServer (2.4.22-3Thiz)
lock
root (hd0,0)
kernel /boot/vmlinuz-2.4.22-3Thiz ro root=/dev/hda1 hdc=ide-scsi acpi=off vga=791 splash=silent
initrd /boot/initrd-2.4.22-3Thiz.img
boot
title Debian-sarge-fvwm (2.6.8-1-686)
lock
root (hd0,4)
kernel /boot/vmlinuz-2.6.18-1-686 root=/dev/hda5 ro
initrd /boot/initrd.img-2.6.18-1-686
boot
title Debian-sid-e17 (2.6.18-1-686)
lock
root (hd0,5)
kernel /boot/vmlinuz-2.6.18-1-686 root=/dev/hda6 ro vga=791
initrd /boot/initrd.img-2.6.18-1-686
boot
title Gentoo 2006.1 (2.6.18)
lock
root(hd0,6)
kernel /boot/vmlinuz-2.6.18 root=/dev/hda7 ro
boot
fstab:
/dev/hda7 / ext3 defaults 1 1
/dev/hda3 swap swap defaults 0 0
proc /proc proc defaults 0 0
7¡¢´Ë²½ÖèÐèÒª¼¸¸öСʱµÄʱ¼ä£¬Äã¿ÉÒÔÉÏÉÏÍø»ò´ò´òÓÎÏ·£¬¶ø²»ÓÃÈ¥¿´µçÊÓ»ò±¨Ö½ÁË£¬ºÇºÇ¡£
emerge gnome (ÈôÏë°²×°kde£¬¿ÉÔÚmake.confÎļþÖн«USE="cjk nls nptl nptlonly -qt -kde gtk gnome"¸ÄΪUSE="cjk nls nptl nptlonly qt kde -gtk -gnome")
rc-update add gdm default
emerge dhcp (Èç¹ûÊÇÓÃADSLÉÏÍø¿É°²×°rp-pppoe)
rc-update add dhcpd default
¿É½«×Ô¼ºÕýʹÓõÄlinux²Ù×÷ϵͳµÄXF86config-4»òxorg.conf¿½±´µ½gentooÖУ¬ÎÒʹÓõÄÊÇdebian,ËùÒÔÎÒʹÓÃÒÔÏÂÃüÁî:
cp /etc/X11/xorg.conf /mnt/gentoo/etc/X11/
8¡¢
exit
umount /mnt/gentoo/proc
umount /mnt/gentoo
reboot