E D R , A S I H C RSS

FrontPage GentooInstallGuide

까나리's Gentoo Install Guide


Contents

1. 까나리's Gentoo Install Guide
1.1. get! gentoo
1.2. Booting the LiveCD(s)
1.2.1. NIC Detect
1.2.2. Network Setup
1.2.3. DMA on
1.2.4. ROOT passwd change
1.2.5. Option
1.2.6. FDISK
1.3. Creating Filesystems
1.4. Mounting
1.5. Install a Stage Tarball
1.5.1. Internet 으로부터 stage 얻기
1.5.2. LiveCD 로부터 stage 얻기
1.5.3. USE Flag 와 mirror 조정
1.6. Chrooting
1.6.1. glibc locale 사용자 설정하기 (옵션)
1.6.2. Stage 1 to Stage 2
1.6.3. Stage 2 to Stage 3
1.7. Timezone
1.8. Kernel Compile
1.9. fstab
1.10. Network Information
1.10.1. Centrino Wireless LAN 잡기
1.10.2. Wireless LAN eth1
1.11. System Information
1.11.1. 각자 시스템에 맞는 파일시스템 패키지를 설치해 준다.
1.12. Boot Loader
1.13. Rebooting the System
1.14. Neccesary programs
1.15. NPTL
1.15.1. NPTL 적용시키기 (The Native POSIX Thread Library)
1.15.2. NPTL 확인하기
1.16. X-Windows
1.16.1. TTF font setting
1.16.2. 한글입력기 설치
1.16.3. 모니터 dpms 정보가 잘못 되었을시 수동으로 입력하는 방법


1.1. get! gentoo

http://www.gentoo.org/main/en/mirrors.xml
ex) http://mirror.gentoo.gr.jp/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 (minimal or universal)

minimal 은 시스템 부팅할 수 있는 최소의 용량만 갖고있다. (stageX.tar.bz2 필요함) – 2004.3 약 50MB
universal 은 아키텍쳐에 맞는 stage 들이 들어있다. - 2004.3 약 650MB

1.2. Booting the LiveCD(s)

boot: gentoo(gentoo-nofb) or smp (smp-nofb)

자신의 CPU 가 single일 경우 Enter 또는 gentoo 라고 입력하고 들어가며 되고, smp(펜티엄4 계열 하이퍼쓰레딩도 포함됨) 으로 부팅하면 된다. 그 밖에 다른 모드 옵션을 보려면 F2 키를 누르면 자세하게 설명이 나온다.

1.2.1. NIC Detect

# modprobe 8139too or e100 (network modules)
가끔 랜카드 모듈이 안 올라올 경우가 있는데, 그럴때는 자신의 NIC 에 맞는 모듈을 올려주면 된다.

1.2.2. Network Setup

# net-setup eth0 (네트워크  설정)
# ifconfig eth0 (네트워크 설정확인)
# ping -c 3 kr.yahoo.com
net-setup eth0 이라고 입력을 하면, 스크립트에 따라서 순서대로 자신의 네트워크 셋업을 해주면 되는데, dhcp 또는 static 상황에 맞게 값을 넣어주면 된다. (ADSL 은 사용해보지 않아서 skip)

1.2.3. DMA on

# hdparm -d 1 /dev/hda
IDE 하드웨어를 갖고있는 사람은 특별하지 않는 이상 DMA 를 꼭 켜주기 바란다. (대부분 해당)
* 알고 있겠지만 SCSI HDD 는 이 옵션이 먹지 않는다. 더 자세한 사항은 DMA 대해서 알아보며 좋다.

1.2.4. ROOT passwd change

# passwd
sshd 데몬을 띄우고 설치할 사람은 root passwd 를 설정해야 한다

1.2.5. Option

# /etc/init.d/sshd start
# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:01:02:82:DB:58
          inet addr:192.168.0.100  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:158606 errors:0 dropped:0 overruns:0 frame:0
          TX packets:123666 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:96163883 (91.7 Mb)  TX bytes:20863289 (19.8 Mb)
          Interrupt:11 Base address:0xc000
sshd 데몬을 띄우고 다른 터미널에서 작업을 할 수 있다.

1.2.6. FDISK

Partition		Fileststem		Size		Description
/dev/hda1		ext3			100M		Boot Partition
/dev/hda2		swap			2G		Swap Partition
/dev/hda3		xfs			remaining	Root Partition

FDISK 항목을 설정한다
위의 예는 /dev/hda 디스크 1개를 hda1~3 번으로 나누었다. /dev/hda1 은 /boot 파티션으로 사용할 부분이며 파일시스템은 ext3 로 정하였다. /dev/hda2 부분은 swap 영역인데 메모리의 1 ~ 1.5배 정도 입력하면 될 것이다. /dev/hda3 영역은 남은 하드디스크를 모두 할당하고 파일시스템은 xfs 로 정하였다.
더 자세한 사항은 젠투 메뉴얼 또는 man fdisk 를 참고하기 바란다.

FilesystemCreation Command
ext2mke2fs
ext3mke2fs -j
reiserfsmkreiserfs
xfsmkfs.xfs
jfsmkfs.jfs

1.3. Creating Filesystems

# mke2fs -j /dev/hda1 (ext3 로 만들기)
# mkfs.xfs /dev/hda3 (xfs 로 만들기)
# mkswap /dev/hda2 (스왑만들기)
# swapon /dev/hda2

1.4. Mounting

# mount /dev/hda3 /mnt/gentoo
# mkdir /mnt/gentoo/boot
# mount -t ext3 /dev/hda1 /mnt/gentoo/boot
chroot 하기위한 준비작업

1.5. Install a Stage Tarball

# date 120416102004 (2004년 12월 04일 16:10)
현재 컴퓨터의 시간을 지정해주기

1.5.1. Internet 으로부터 stage 얻기

# cd /mnt/gentoo
# links2 http://www.gentoo.org/main/en/mirrors.xml
이동키 : 방향키, 다운로드키 "d"
stage 파일과 스냅샷 파일을 다운로드 한다, 물론 확인을 위해 md5도 받으면 좋다
# md5sum -c stage?-*.tar.bz2.md5 (stage 2, 3)
# md5sum -c portage-*.tar.bz2.md5 (snapshot)
다운로드 받은 파일의 이상유무 검사
# tar -xvjpf stage?-*.tar.bz2
# tar -xvjf /mnt/gentoo/portage-20041202.tar.bz2 -C /mnt/gentoo/usr
tarball 풀기

1.5.2. LiveCD 로부터 stage 얻기

# cd /mnt/gentoo
# ls /mnt/cdrom/stages
# tar -xvjpf /mnt/cdrom/stages/stage?-*.tar.bz2
# tar -xvjpf /mnt/cdrom/snapshot/portage-*.tar.bz2
tarball 풀기

1.5.3. USE Flag 와 mirror 조정

# nano -w /mnt/gentoo/etc/make.conf
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 mp3 opengl pam pdflib png python -qt quicktime readline sdl slang spell ssl svga tcpd truetype X xml2 xv zlib cjk multichar sse sse2 mmx"
GENTOO_MIRRORS="http://ftp.gentoo.or.kr/ http://mirror.gentoo.or.kr/"
미러는 한국과 일본미러

1.6. Chrooting

# cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
chroot 하기전에 DNS 정보파일인 resolv.conf 파일을 chroot 될 etc 디렉토리 밑에 복사

# mount -t proc none /mnt/gentoo/proc
# chroot /mnt/gentoo /bin/bash
root directory change !
# env-update
/etc/env.d/ 디렉토리에 있는 환경값을 업데이트 해줌
# source /etc/profile
/etc/profile 적용
# emerge --sync
portage sync

1.6.1. glibc locale 사용자 설정하기 (옵션)

# mkdir /etc/portage
# echo "sys-libs/glibc userlocales" >> /etc/portage/package.use
# nano -w /etc/locales.build
en_US/ISO-8859-1
en_US.UTF-8/UTF-8
ko_KR.EUC-KR/EUC-KR
ko_KR.UTF-8/UTF-8
ko_KR/EUC-KR

1.6.2. Stage 1 to Stage 2

# cd /usr/portage
# scripts/bootstrap.sh
부트스트랩 과정 (상당히 오래 걸린다 !!!)

1.6.3. Stage 2 to Stage 3

# emerge system
시스템 패키지를 모두 업데이트 해준다 (조금 오래걸림)

1.7. Timezone

# ls /usr/share/zoneinfo
# ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime
현재 컴터의 타임존을 아시아/서울로 심볼릭 링크를 걸어줌 (-f 는 강제)

1.8. Kernel Compile

# cd /usr/portage/sys-kernel/gentoo-dev-source
# emerge gentoo-dev-sources-2.6.9-r9.ebuild (gentoo-dev-source 사용)
# cd /usr/src/linux
# make menuconfig
커널설정은 본인의 PC 와 환경에 맞게 세팅해주되, 아래 사항들은 젠투리눅스 사용시 꼭 필요한 옵션들이니 넣어주기 바람

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
커널컴파일후 산출된 파일들을 /boot 디렉토리로 복사

# emerge coldplug
# rc-update add coldplug boot
coldplug 데몬 설치 & 서비스 등록

# emerge hotplug
# rc-update add hotplug default
hotplug 데몬 설치 & 서비스 등록

# nano -w /etc/modules.autoload.d/kernel-2.X
# modules-update
커널 컴파일시 모듈로 넣었던 부분을 넣어주면 된다 (kernel-2.4 or kernel-2.6)

1.9. fstab

/dev/hda1	/boot		ext3		noatime		1 1
/dev/hda3	/		xfs		noatime		0 0
/dev/hda2	none		swap		sw			0 0
위의 FDISK 할때 잡아준 파일시스템과 마운트위치를 맞춰준다

1.10. Network Information

# echo ns > /etc/hostname (호스트네임 등록)
# echo kkanari.info > /etc/dnsdomainname
# echo kkanari.info > /etc/nisdomainname
# 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”

1.10.1. Centrino Wireless LAN 잡기

# emerge ipw2100
# modprobe ipw2100
# iwlist scanning (essid 찾기)
# iwconfig eth1 essid “3com” key 1234 (암호값이 문자일경우 key s:abcd 라고 입력해줌)

1.10.2. 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

1.11. System Information

# passwd
# nano -w /etc/rc.conf (해당항목에 필요한 사항이 있으면 수정해 준다, 아래는 내가 수정한 내역)
CLOCK="local"
EDITOR="/usr/bin/vim"
DISPLAYMANAGER="gdm"
XSESSION="Gnome"

# emerge metalog
# rc-update add metalog default
metalog 설치 & 서비스 등록

# emerge vixie-cron
# rc-update add vixie-cron default
vixie-cron 설치 & 서비스 등록

# emerge slocate (filesystem indexing)
# emerge xfsprogs (xfs filesystem needs)

1.11.1. 각자 시스템에 맞는 파일시스템 패키지를 설치해 준다.

File SystemToolInstall Command
XFSxfsprogsemerge xfsprogs
ReiserFSreiserfsprogsemerge reiserfsprogs
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2005-09-17 18:10:59
Processing time 0.0461 sec