E D R , A S I H C RSS

GentooInstallGuide (rev. 1.2)

FrontPage GentooInstallGuide

Dec 03, 2004
Gentoo Install Guide
Submitted by king @ 12-03 [01:42 am]

Gentoo Install Guide (private)



1.gentoo CD download
http://www.gentoo.org/main/en/mirrors.xml
    ex) ftp://ftp.ecc.u-tokyo.ac.jp/GENTOO/releases/x86/2004.3/livecd/install-x86-minimal-2004.3-r1.iso

¹Ì·¯´Â Çѱ¹ or ÀϺ»ÂÊ¿¡¼­ ¹Þ´Â°Ô ¼Óµµ³ª Á¤½Å°Ç°­»ó ÁÁ´Ù. LiveCD ¸¦ ´Ù¿î¹ÞÀ¸¸é µÇ´Âµ¥, µé¾î°¡´Â ¼ø¼­´Â 

release -> x86 (or Àڽſ¡ ¸Â´Â architecture ¸¦ ¼±ÅÃ) -> 2004.3 (2004³â 12¿ù ÇöÀç ÃÖ½Å) -> LiveCD -> Pentium4 (ÀÚ½ÅÀÇ CPU¿¡ ¸Â°Ô ¼±ÅÃ) -> CD Download (mini or universal)

mini ´Â ½Ã½ºÅÛ ºÎÆÃÇÒ ¼ö ÀÖ´Â ÃÖ¼ÒÀÇ ¿ë·®¸¸ °®°íÀÖ´Ù. (stageX.tar.bz2 ÇÊ¿äÇÔ) – 2004.3 ¾à 50MB
universal Àº ¾ÆÅ°ÅØÃÄ¿¡ ¸Â´Â stageµéÀÌ µé¾îÀÖ´Ù. - 2004.3 ¾à 650MB


2.Booting the LiveCD(s)
boot: gentoo(gentoo-nofb) or smp (smp-nofb)

ÀÚ½ÅÀÇ CPU °¡ singleÀÏ °æ¿ì [Enter] ¶Ç´Â gentoo ¶ó°í ÀÔ·ÂÇÏ°í µé¾î°¡¸ç µÇ°í, smp(ÆæƼ¾ö4 °è¿­ ÇÏÀÌÆÛ¾²·¹µùµµ Æ÷ÇÔµÊ) À¸·Î ºÎÆÃÇÏ¸é µÈ´Ù. ±× ¹Û¿¡ ´Ù¸¥ ¸ðµå ¿É¼ÇÀ» º¸·Á¸é F2 Å°¸¦ ´©¸£¸é ÀÚ¼¼ÇÏ°Ô ¼³¸íÀÌ ³ª¿Â´Ù.  

NIC Detect
# modprobe 8139too or e100 (network modules)

°¡²û ·£Ä«µå ¸ðµâÀÌ ¾È ¿Ã¶ó¿Ã °æ¿ì°¡ Àִµ¥, ±×·²¶§´Â ÀÚ½ÅÀÇ NIC ¿¡ ¸Â´Â ¸ðµâÀ» ¿Ã·ÁÁÖ¸é µÈ´Ù.

Network Setup
# net-setup eth0 (³×Æ®¿öÅ©  ¼³Á¤)
# ifconfig eth0 (³×Æ®¿öÅ© ¼³Á¤È®ÀÎ)
# ping -c 3 kr.yahoo.com

net-setup eth0 À̶ó°í ÀÔ·ÂÀ» Çϸé, ½ºÅ©¸³Æ®¿¡ µû¶ó¼­ ¼ø¼­´ë·Î ÀÚ½ÅÀÇ ³×Æ®¿öÅ© ¼Â¾÷À» ÇØÁÖ¸é µÇ´Âµ¥, dhcp ¶Ç´Â static »óȲ¿¡ ¸Â°Ô °ªÀ» ³Ö¾îÁÖ¸é µÈ´Ù. (ADSL Àº »ç¿ëÇغ¸Áö ¾Ê¾Æ¼­ skip)

DMA on
# hdparm -d 1 /dev/hda

IDE Çϵå¿þ¾î¸¦ °®°íÀÖ´Â »ç¶÷Àº Ưº°ÇÏÁö ¾Ê´Â ÀÌ»ó DMA ¸¦ ²À ÄÑÁֱ⠹ٶõ´Ù. (´ëºÎºÐ ÇØ´ç)
* ¾Ë°í ÀÖ°ÚÁö¸¸ SCSI HDD ´Â ÀÌ ¿É¼ÇÀÌ ¸ÔÁö ¾Ê´Â´Ù. ´õ ÀÚ¼¼ÇÑ »çÇ×Àº DMA ´ëÇؼ­ ¾Ë¾Æº¸¸ç ÁÁ´Ù.

ROOT passwd change
# passwd

sshd µ¥¸óÀ» ¶ç¿ì°í ¼³Ä¡ÇÒ »ç¶÷Àº root passwd ¸¦ ¼³Á¤ÇØ¾ß ÇÑ´Ù

Option
# /etc/init.d/sshd start

sshd µ¥¸óÀ» ¶ç¿ì°í ´Ù¸¥ Å͹̳ο¡¼­ ÀÛ¾÷À» ÇÒ ¼ö ÀÖ´Ù.


3.FDISK
Partition		Fileststem		Size		Description
/dev/hda1		ext2			100M		Boot Partition
/dev/hda2		swap			2G		Swap Partition
/dev/hda3		xfs			remaining	Root Partition

FDISK Ç׸ñÀ» ¼³Á¤ÇÑ´Ù
À§ÀÇ ¿¹´Â /dev/hda µð½ºÅ© 1°³¸¦ hda1~3 ¹øÀ¸·Î ³ª´©¾ú´Ù. /dev/hda1 Àº /boot ÆÄƼ¼ÇÀ¸·Î »ç¿ëÇÒ ºÎºÐÀ̸ç ÆÄÀϽýºÅÛÀº ext2 ·Î Á¤ÇÏ¿´´Ù. /dev/hda2 ºÎºÐÀº swap ¿µ¿ªÀε¥ ¸Þ¸ð¸®ÀÇ 1~1.5¹è Á¤µµ ÀÔ·ÂÇÏ¸é µÉ °ÍÀÌ´Ù. /dev/hda3 ¿µ¿ªÀº ³²Àº Çϵåµð½ºÅ©¸¦ ¸ðµÎ ÇÒ´çÇÏ°í ÆÄÀϽýºÅÛÀº xfs ·Î Á¤ÇÏ¿´´Ù.
´õ ÀÚ¼¼ÇÑ »çÇ×Àº Á¨Åõ ¸Þ´º¾ó ¶Ç´Â man fdisk ¸¦ Âü°íÇϱ⠹ٶõ´Ù.

4.Creating Filesystems
# mke2fs /dev/hda1 (ext2 ·Î ¸¸µé±â)
# mkfs.xfs /dev/hda3 (xfs ·Î ¸¸µé±â)
# mkswap /dev/hda2 (½º¿Ò¸¸µé±â)
# swapon /dev/hda2

5.Mounting
# mount /dev/hda3 /mnt/gentoo
# mkdir /mnt/gentoo/boot
# mount /dev/hda1 /mnt/gentoo/boot

chroot ÇϱâÀ§ÇØ Á¨Åõ 

6.Install a Stage Tarball (stage3)
# date 120416102004 (2004³â 12¿ù 04ÀÏ 16:10)
# cd /mnt/gentoo
# links2 http://www.gentoo.org/main/en/mirrors.xml
# tar -xvjpf stage3-pentium4-2004.3.tar.bz2
# nano -w /mnt/gentoo/etc/make.conf (x31 use flag & mirrors add)
USE="x86 alsa acpi -arts avi berkdb crypt cups encode foomaticdb gdbm gif gpm gtk gtk2 imlib jpeg -kde gnome libg++ libwww mad mikmod motif mpeg ncurses nls nptl oggvorbis opengl pam pdflib png python -qt quicktime readline sdl slang spell ssl svga tcpd truetype X xml2 xv zlib cjk multichar sse mmx xosd"
GENTOO_MIRRORS="ftp://ftp.ecc.u-tokyo.ac.jp/GENTOO/ ftp://xinicks.com/pub/linux/gentoo http://gentoo.gg3.net/ ftp://gg3.net/pub/linux/gentoo/"

7.Chrooting
# cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
# mount -t proc none /mnt/gentoo/proc
# chroot /mnt/gentoo /bib/bash
# env-update
# source /etc/profile
# emerge sync

8.Timezone
# ls /usr/share/zoneinfo
# ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime

9.Kernel Compile
# cd /usr/portage/sys-kernel/gentoo-dev-source
# emerge gentoo-dev-sources-2.6.9-r9.ebuild
# cd /usr/src/linux
# make menuconfig
Activating Required Options
Code Listing 6: Selecting experimental code/drivers
Code maturity level options --->
  [*] Prompt for development and/or incomplete code/drivers
Code Listing 7: Selecting correct processor family
Processor type and features --->
  (Change according to your system)
  (Athlon/Duron/K7) Processor family
Code Listing 8: Selecting necessary file systems 
(With a 2.6.x kernel)
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)

(Select one or more of the following options as needed by your system)
  <*> Reiserfs support
  <*> Ext3 journalling file system support
  <*> JFS filesystem support
  <*> Second extended fs support
  <*> XFS filesystem support
Code Listing 11: Activating SMP support
Processor type and features  --->
  [*] Symmetric multi-processing support
Code Listing 12: Activating USB Support for Input Devices
USB Support --->
  <*>   USB Human Interface Device (full HID) support
(For 2.6 kernel)
# make && make modules_install
# cp arch/i386/boot/bzImage /boot/gentoo-2.6.9-r9
# cp System.map /boot/System.map-gentoo-2.6.9-r9
# cp .config /boot/config-2.6.9-r9

# emerge hotplug
# rc-update add hotplug default

10./etc/fstab
/dev/hda1	/boot		ext2		noatime		1 1
/dev/hda3	/		xfs		noatime		0 0
/dev/hda2	none		swap		sw			0 0

11.Network Information
# echo x31 > /etc/hostname
# echo kkanari.org > /etc/dnsdomainname
# rc-update add domainname default
# nano -w /etc/conf.d/net

- static
iface_eth1=¡±192.168.6.17 broadcast 192.168.6.255 netmask 255.255.255.0¡±
gateway=¡±eth1/192.168.6.1¡±

- dhcp
iface_eth1=¡±dhcp¡±

- Wireless LAN eth1
# cd /etc/init.d
# ln -s net.eth0 net.eth1
# nano -w /etc/hosts
127.0.0.1		localhost
192.168.6.17	x31.kkanari.org		x31

12.System Information
# passwd
# nano -w /etc/rc.conf
# emerge -C sysklogd
# rm /etc/init.d/sysklogd
# emerge metalog
# rc-update add metalog default
# emerge vixie-cron
# rc-update add vixie-cron default
# emerge slocate
# emerge xfsprogs

13.Boot Loader
# emerge grub
# nano -w /boot/grub/grub.conf
gentoo-dev-sources-2.6.9-r9.ebuild
default 1
timeout 5
splashimage=(hd0,5)/boot/grub/splash.xpm.gz
title=Microsoft Windows XP Professional sp2
rootnoverify (hd0,0)
chainloader +1
title=Gentoo Linux (2.6.9-gentoo-r6)
root (hd0,5)
kernel /boot/kernel-2.6.9-r6 root=/dev/hda7
title=Gentoo Linux (2.6.9-gentoo-r1)

# grub
grub> root (hd0,0)
grub> setup (hd0)
grub> quit

# useradd -m -G users,wheel,audio,tty -s /bin/bash tongseob
# passwd tongseob

14.Rebooting the System
# exit
cdimage ~# cd
cdimage ~# umount /mnt/gentoo/boot /mnt/gentoo/proc /mnt/gentoo
cdimage ~# reoot

15.Neccesary programs
# emerge openssh
# rc-update add sshd default
# emerge vim

# emerge gcc
# USE=¡±nptl¡± emerge glibc
# reboot

16.X-Windows
# emerge xorg-x11 gnome 
# emerge gdm
# rc-update add xdm default
# Xorg -scanpci
# Xorg -configure
# Xorg -probeonly
# cp /root/xorg.conf.new /etc/X11/xorg.conf 

17.TTF font setting
# mkdir /usr/share/fonts/ttf/korean/ms
# mv gulim.ttc batang.ttc ngulim.ttf Monaco.ttf /usr/share/fonts/ttf/korean/ms
# cd /usr/share/fonts/ttf/korean/ms
# mkfontscale 
# ttmkfdir 
# mkfontdir 
# fc-cache
# vi /etc/X11/xorg.conf
Load "freetype" 
Load "xtt" 
µÑÁß ¾Æ¹«°Å³ª ¼³Ä¡ÇÑ´Ù (xtt Ãßõ)
FontPath ¸¦ Ãß°¡ÇØ ÁÙ Â÷·ÊÀÌ´Ù. 
Section "Files" ¿¡ ´ÙÀ½°ú °°ÀÌ ±Û²Ã µð·ºÅ丮¸¦ µî·ÏÇØÁØ´Ù. 

FontPath "/usr/share/fonts/ttf/korean/ms/" 

ÇѱÛÀԷ±⠼³Ä¡
# emerge nabi imhangul
# vi /etc/env.d/00basic Ãß°¡
korean setting - euckr
LC_ALL=ko_KR.UTF-8
LC_LANG=ko_KR.UTF-8
LC_MESSAGE=ko_KR.UTF-8
LANG=ko_KR.UTF-8
GDM_LANG=ko_KR.UTF-8
XMODIFIERS="@im=nabi"
XIM_PROGRAM="/usr/bin/nabi"
GTK_IM_MODULE=hangul2
# env-update
\
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2005-09-17 18:10:59
Processing time 0.0222 sec