Gentoo Install Simple
Contents
2.1. liveCD booting ¶
sudo passwd
su - root
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 원격설치 ¶
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.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.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" )
emerge -av dhcpcd
2.17. /etc/fstab ¶
/dev/sda1 /boot ext2 noauto,noatime 1 2
/dev/sda3 / ext4 noatime 0 1 /dev/sda2 none swap sw 0 0 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
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.26. sync time ¶
emerge clockspeed
echo "clockspeed &" >> /etc/conf.d/local.start clockspeed & ntpclockset
2.27. problem ¶
2.28. for desktop ¶
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 ¶
3. kernel option for hardwares ¶
3.1. ati video ¶
3.2. HP EliteBook 8530p ¶
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 이 없는 시스템에 넣을 수 없다. |











