· KLDP.org · KLDP.net · KLDP Wiki · KLDP BBS ·
Gentoo Install Simple


1. GentooInstallSimple

Á¨Åõ ¸®´ª½º °£´Ü ÀνºÅç ¸í·É·Î±× ÀÔ´Ï´Ù. - ¼ÛÈ¿Áø

2. Log

2.1. liveCD booting

  • Ubuntu ÃֽŠDesktop CD Ãßõ
sudo passwd
su - root
  • ²öÁú±ä dhcp ½Ãµµ Á×À̱â
ps aux | grep -E "network|avahi|dhclient" | grep -v grep | awk '{ print $2 }' | xargs kill -s 9

2.2. sync time

cd /etc
ln -sf /usr/share/zoneinfo/ROK localtime
date MMDDHHmmYYYY
hwclock --systohc

2.3. network

ifconfig eth0 (ip) netmask (netmask) broadcast (broadcast)
route add default gw (gateway)
echo nameserver 8.8.8.8 > /etc/resolv.conf
echo nameserver 8.8.4.4 >> /etc/resolv.conf

2.4. ubuntu ¿ø°Ý¼³Ä¡

  • screen ÀÛ¾÷ Ãßõ
apt-get install ssh-server #(sshd ¿Ã¶ó¿È)
  • ¸ø¹Þ¾Æ¿Ã ¶§ ¿ä·É
openssh-server_4.3p2-5ubuntu1_amd64.deb ¸¦ °¡Á®¿ÀÁö ¸øÇß´Ù´Â ¿À·ù°¡ ³­´Ù.
±¸±Û¿¡¼­ ãÀ¸¸é ³ª¿Â´Ù.
wget À¸·Î ¾Æ¹«µ¥³ª ¹Þ¾Æ³õ°í dpkg -i ¸í·ÉÀ¸·Î ¼³Ä¡ÇÑ´Ù.

2.5. mount hdd

cd /mnt
mkdir gentoo
cfdisk /dev/sda #(ÀûÀýÈ÷ ÆÄƼ¼Å´× /boot (100M), swap (1024M), / (All) Á¤µµ Ãßõ) /boot ¿¡ boot flag Çʼö
mkswap /dev/sda2
swapon /dev/sda2
mkfs.ext2 /dev/sda1 #(/boot xfs ºÒ°¡)
mkfs.ext4 /dev/sda3 #(ext4 ¼º´É ÁÁÀ½)
mount /dev/sda3 gentoo
cd gentoo
mkdir boot
mount /dev/sda1 boot

2.6. Gentoo Linux Download

wget http://ftp.lecl.net/pub/gentoo/releases/amd64/current-stage3/stage3-amd64-20110428.tar.bz2
wget http://ftp.lecl.net/pub/gentoo/releases/snapshots/current/portage-latest.tar.bz2
tar xjpf stage3-amd64-20110428.tar.bz2 #(p option important)
tar xjpf portage-latest.tar.bz2
mv portage usr

2.7. mount system directory

cp -a /dev dev
mount -t proc none proc
mount -o bind /dev dev
mount -t devpts none dev/pts
mount -t sysfs none sys

2.8. resolv º¹»ç

cp /etc/resolv.conf etc

2.9. chroot

chroot . /bin/bash
source /etc/profile
passwd

2.10. sync time

cd etc
ln -sf /usr/share/zoneinfo/ROK localtime
date MMDDHHmmYYYY
hwclock --systohc

2.11. make.conf

CHOST="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CXXFLAGS="${CFLAGS}"
GENTOO_MIRRORS="http://ftp.daum.net/gentoo/ http://gentoo.channelx.biz/ http://ftp.kaist.ac.kr/pub/gentoo/"
LINGUAS=ko
USE="amd64 unicode ucs2 ucs4 cjk
        ithreads threads threadsafe
        usb
        mmx sse sse2 sse3 ssse3 opengl glitz
        gmp djbfft
        socks5 -ipv6 -ldap
        -bindist branding
        bash-completion vim-syntax xml
        bzip2
        -berkdb"
# for desktop USE (gnome)
#       a52 aac amr dts x264 theora xvid tiff wmf svg ffmpeg dv yv12 mp4 mng sndfile
#       mp3 mp3rtp nas ogg vorbis
#       jpeg png gif gd
#       xinerama -xprint gnutls dbus cairo
#       X gtk gtk2 xv
#       xml2 gd truetype xpm
#       alsa oss -arts -xmms
#       gnome -qt -qt3 -qt4 -kde
#       startup-notification hal libnotify xcomposite"
MAKEOPTS="-j3" #ÀâÈ÷´Â cpu °¹¼ö +1 cat /proc/cpuinfo
#PORTDIR_OVERLAY="/usr/local/portage"
CCACHE_SIZE="2G"
CCACHE_DIR="/var/tmp/ccache"
FEATURES="ccache"

2.12. portage sync

emerge --sync

2.13. kernel ¼³Ä¡

echo sys-kernel/gentoo-sources symlink >> /etc/portage/package.use
emerge portage gentoo-sources ccache debianutils grub gentoolkit xz-utils e2fsprogs
cd /usr/src/linux
make menuconfig #(screen broken cui)
make all install modules_install

2.14. /boot/grub/grub.conf

default=0
timeout=15
splashimage=(hd0,0)/grub/splash.xpm.gz

title vmlinuz-2.6.25-gentoo-r6 #grub ¸Þ´º¸í
root (hd0,0) # /boot ÀǹÌ
kernel /vmlinuz-2.6.25-gentoo-r6 root=/dev/sda3 #/boot ¿¡ µé¾î°£ ¹ÙÀ̳ʸ®¸í, / ÆÄƼ¼Ç

2.15. grub ¼³Á¤

grub --no-floppy #(½Ã°£Áö¿¬ ´ÜÃà)
root (hd0,0) # /boot ÀǹÌ
setup (hd0) # ºÎÆ® ÆÄƼ¼ÇÀÌ µé¾îÀÖ´Â hdd ÀǹÌ
quit

2.16. /etc/conf.d/net

config_eth0=( "(ip) netmask (nm) broadcast (bc)" )
routes_eth0=( "default via (gw)" )
dns_servers_eth0=( "8.8.8.8 8.8.4.4" )
  • DHCP¸¦ »ç¿ëÇÏ´Â °æ¿ì DHCP Client¸¦ ¼³Ä¡ÇØ Áà¾ß ÀçºÎÆà ÈÄ ³×Æ®¿÷À» »ç¿ëÇÒ ¼ö ÀÖ´Ù.
emerge -av dhcpcd
  • 2009-10-23 ¿äÁò¿£ network ¶ó´Â À̸§À¸·Î ¹Ù²ïµí ÇÏ´Ù.
  • µ¥½ºÅ©Å¾ »ç¿ëÀÚ¶ó¸é ¾Æ¿¹ ¼³Á¤ÇÏÁö ¸»°í wicd ¸¦ ¼³Ä¡ÇÏ´Â °ÍÀ» ±ÇÇÑ´Ù. X ÀÇ Æ®·¹À̾ÆÀÌÄÜÀ¸·Î ÆíÇÏ°Ô ¼³Á¤ÇÒ ¼ö ÀÖ´Ù.

2.17. /etc/fstab

  • Àڽſ¡°Ô ¸Â°Ô ¿øº» fstabÀ» ¼öÁ¤
/dev/sda1 /boot ext2 noauto,noatime 1 2
/dev/sda3 / ext4 noatime 0 1
/dev/sda2 none swap sw 0 0

2.18. rc level

rc-update add net.eth0 default
rc-update add sshd default

2.19. file system utils

emerge xfsprogs

2.20. reboot

  • ÀÚµ¿ ¸®¼Â ºÒ°¡ÀÏ ¼ö ÀÖÀ½
exit
umount boot dev/pts dev proc sys
cd ..
umount gentoo
reboot

2.21. system logger, cron, hotplug, xfsprogs, vi

emerge syslog-ng dcron hotplug vim app-misc/screen pciutils logrotate
rc-update add syslog-ng default
rc-update add dcron default
rc-update add hotplug default
crontab /etc/crontab

2.22. default system files

/etc/conf.d/hostname # ¹Ú½º À̸§À» Áö¾îÁÖÀÚ
/etc/conf.d/clock # local ½Ã°£°ú Çϵå¿þ¾î½Ã°è µ¿±âÈ­
/etc/hosts # ÇÒ´çÇÑ ip ¿¡ hostname À» ¿¬°áÇÏÀÚ

2.23. ½Ï »õ·Î ºôµå

emerge -epv world # use check
emerge -v portage && emerge -v glibc gcc && gcc-config 4.5.2 && source /etc/profile && emerge -ev --keep-going world
  • Áß°£ ¿À·ù½Ã /var/log/emerge.log È®ÀÎ - emerge gcc glibc ¿¡¼­ ¿À·ùÀÌ¸é ¿À·ùÈ®ÀÎ ÈÄ ÀçµµÀü
    - emerge -ev world ¿¡¼­ ¿À·ùÀÌ¸é ¿À·ù³­ ÆÐÅ°Áö È®ÀÎÇÏ°í use, mask µî È®ÀÎ ÈÄ emerge --resume (emerge -pv ´Â ±¦ÂúÁö¸¸ emerge ·Î ¹º°¡¸¦ ¼³Ä¡Çϸé resume ºÒ°¡)
  • revdep-rebuild -pi ¸í·É¿¡¼­ ÆÐÅ°ÁöµéÀÌ °É¸®¸é revdep-rebuild ¸í·ÉÀ¸·Î À缳ġ.

2.24. Localize

emerge subversion layman
perl -pi -e "s/^(overlays\s.*)$/\\1\\n\\t\\t\\thttp:\/\/gentoo-kr.kldp.net\/overlays.xml/m" /etc/layman/layman.cfg
layman -f
layman -a gentoo-kr
echo PORTAGE_ECLASS_WARNING_ENABLE=\"0\" >> /etc/make.conf
echo source /usr/local/portage/layman/make.conf >> /etc/make.conf

2.25. Bash Profile

@mysetting.sh.txt (2.05 KB) /etc/profile.d/mysetting.sh

2.26. sync time

emerge clockspeed
echo "clockspeed &" >> /etc/conf.d/local.start
clockspeed &
ntpclockset
  • °¡²û ntpclockset À» ÇØ ÁÖ¸é clockspeed °¡ ÄÄÇ»ÅÍ ½Ã°èÀÇ ¿ÀÂ÷¸¦ º¸Á¤ÇØÁÖ¾î Á¡Á¡ ¿ÀÂ÷°¡ ÁÙ¾îµë.

2.27. problem

  • ´©°¡ ¿Ö ±×·¨´ÂÁö´Â ¸ð¸£°Ú´Âµ¥ À̹ø¿¡ »õ·Î ¼³Ä¡Çϸ鼭 /usr/bin ¹Ø¿¡ ex, vi, view °¡ busybox ·Î ¸µÅ©µÇ¾î ÀÖ¾ú´Ù. Áö¿öÁØ ÈÄ vim À» ¼³Ä¡ÇØ¾ß vim À¸·Î Á¦´ë·Î µÈ´Ù.
  • 2009-01-18 ÇöÀç ÀÇÁ¸¼º ¹ö±×°¡ ÀÖ´Â°Í °°´Ù. ÃÖÃÊ ¼³Ä¡½Ã -X -gtk -qt µîÀ» Á༭ ÀÏ´Ü xorg-x11 À» ¼³Ä¡ÇÑ ÈÄ USE ¸¦ ¹Ù²ã ´Ù½Ã ¼³Ä¡ÇÏ´Â µîÀÇ ¼ö°í°¡ ÇÊ¿äÇÏ´Ù.
  • 2009-07-23 /etc/ssh/ssh_host_* °¡ 0 À¸·Î »ý¼ºµÇ´Â ¹®Á¦ ¹ß»ý. »ý¼ºÀÌ µÇ¾î Àֱ⠶§¹®¿¡ Àç»ý¼ºÀ» ¾ÈÇÏ°í ±×³É ¿À·ù. Áö¿ì°í sshd restart ÇÏ¸é ¹®Á¦ ÇØ°á.

2.28. for desktop

  • nvidia, xfce4 ±âÁØ ±âº»ÀûÀΰ͵é Ãßõ¸ñ·Ï
emerge -pv nvidia-drivers alsa-driver alsa-oss alsa-lib alsa-utils xfce4 mozilla-firefox mozilla-thunderbird gimp gqview acroread mplayer mplayerplug-in openoffice-bin gnome-terminal rar unzip unalz p7zip lha unace

2.29. for kernel modules

  • emerge modules-rebuild
  • nvidia-drivers, virtualbox-modules °°Àº Ä¿³Îºôµå ÈÄ ´Ù½Ã ¼³Ä¡ÇØ¾ß Çϴ¸ðµâÀ» ¾Ë¾Æ¼­ ¸®ºôµå ÇØ ÁØ´Ù.
  • module-rebuild -X rebuild

3. kernel option for hardwares

  • Çϵå¿þ¾îº°·Î ºÎÆýà Ŀ³Î¿¡ ¿É¼ÇÀ» Áà¾ß Á¤»óºÎÆÃµÉ ¼öµµ ÀÖ´Ù.
  • ¿¹) kernel /vmlinuz-2.6.28-gentoo root=/dev/sda3 acpi=ht iommu=soft

3.1. ati video

  • Àý´ë·Î ati ¿¡¼­ Á÷Á¢ ¹Þ¾Æ ¼³Ä¡ÇÏÁö ¾Ê´Â´Ù. µå¶óÀ̹ö ²¿ÀδÙ.
  • http://en.gentoo-wiki.com/wiki/Radeon ÀÇ ¹æ¹ý´ë·Î ¿ÀǼҽº µå¶óÀ̹ö·Î ¼³Ä¡ÇÏ¸é ¼º´ÉÀÌ ´õ ÁÁ´Ù. (Ä¿³Î¿É¼Ç staging ºÎºÐÀº ¾ÈÇÏ´Â°Ô ÁÁÀº°Í °°´Ù. 2010-05-21:¹öÀüÀÌ ³Ê¹« ¿Ã¶ó°£µí ÇÏ´Ù. 9999 °¡ ¾Æ´Ñ ¹öÀüÀ¸·Î ¼³Ä¡ÇØ¾ß ÇÑ´Ù.)

3.2. HP EliteBook 8530p

  • Ubuntu CD ºÎÆýà F6 À» ´­·¯ acpi=ht ¸¦ Ãß°¡ÇØ ÁØ´Ù.
  • ¿Ïº®È÷ µ¿ÀÛÇÏ·Á¸é ´õ ±â´Ù·Á¾ß ÇÒ°Í °°´Ù. acpi=off hpet=off irqpoll Çϸé ÀÏ´Ü ¿Àµ¿ÀÛÀº ¾ø´Ù.
  • http://www.linlap.com/wiki/hp elitebook 8530p
  • xf86-video-radeon À¸·Î Çϸé acpi ¸¦ »ç¿ëÇÒ ¼ö ÀÖ´Ù.
  • aticonfig --acpi-services=off Çϸé acpi ÄÒ Ã¤·Î fglrx °¡ µ¿ÀÛÀÌ µÈ´Ù.


4. Copy

  • ÀÌ¹Ì ¼³Ä¡µÈ ½Ã½ºÅÛÀ» º¹»çÇÏ¿© ¼³Ä¡½Ã°£À» ÁÙ¿©º¸ÀÚ.

4.1. Backup

cd /
tar cjpf intelCore2Backup.tar.bz2 \
bin boot etc home lib lib32 lib64 mnt opt root sbin service usr var \
--exclude=etc/udev/rules.d/70-persistent-net.rules \
--exclude=usr/portage/distfiles/ \
--exclude=var/tmp/ \
--exclude=var/log/*.log \
--exclude=etc/ssh/ssh_host_*
# dev proc sys ´Â ¹é¾÷ÇÏÁö ¾Ê´Â´Ù. ÆÄÀÏ¸í¿¡ CFLAGS ¸¦ ´ëÃæÀº ±¸ºÐÇÏ°Ô Àû¾îÁØ´Ù.
# -msse4.1 À» ÇÑ ½Ã½ºÅÛÀ» ¹é¾÷Çϸé /proc/cpuinfo ¿¡ sse4_1 flag ÀÌ ¾ø´Â ½Ã½ºÅÛ¿¡ ³ÖÀ» ¼ö ¾ø´Ù.

4.2. Restore

  • 2.5 ±îÁö ÁøÇàÇÑ´Ù.
cd /mnt/gentoo
tar xjpf intelCore2Backup.tar.bz2
cp -a /dev dev
mkdir proc sys home mnt service tmp
chmod 1777 tmp
  • 2.7, 2.9 ¸¦ ÇÑ ÈÄ Ä¿³Î¿É¼Ç ¸ÂÃß¾î ÀçÄÄÆÄÀÏ ÇÏ°í, 2.15 ¸¦ ÇÏ¸é ºÎÆà °¡´ÉÇÑ ½Ã½ºÅÛÀÌ µÈ´Ù.
  • ÀçºÎÆÃÇÏ¿© ºÎÆà Àß µÇ´Â°Å È®ÀÎÇÑ ÈÄ, emerge --sync && emerge -uDN --keep-going world ¸¦ ÇÏÀÚ.

ID
Password
Join
You are dishonest, but never to the point of hurting a friend.


sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2011-05-11 18:12:20
Processing time 0.0227 sec