2009/06/30

젠투 리눅스 (gentoo linux) 설치

http://www.gentoo.org/doc/en/gentoo-x86-quickinstall.xml

boot: gentoo-nofb
# lspci
# modprobe pcnet32
# net-setup eth0
# ifconfig
# /etc/init.d/sshd start
# passwd

>> 원격 로그인(ssh)

# fdisk /dev/sda // or /dev/hda
# fdisk -l /dev/sda
Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x6310e0ec

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 136 987997+ 82 Linux swap / Solaris
/dev/sda3 137 1044 7293510 83 Linux

# mke2fs /dev/sda1
# mke2fs -j /dev/sda3 // (-j:ext3)
# mkswap /dev/sda2 && swapon /dev/sda2

# mount /dev/sda3 /mnt/gentoo
# mkdir /mnt/gentoo/boot
# mount /dev/sda1 /mnt/gentoo/boot
# cd /mnt/gentoo

livecd gentoo # links http://www.gentoo.org/main/en/mirrors.xml
livecd gentoo # wget http://ftp.gentoo.or.kr/releases/x86/autobuilds/20090630/stage3-i686-20090630.tar.bz2
livecd gentoo # time tar xjpf stage3*
livecd gentoo # cd /mnt/gentoo/usr

livecd usr # wget http://ftp.gentoo.or.kr/snapshots/portage-20090707.tar.bz2
livecd usr # time tar xjf portage-lat*
livecd usr # cd /

livecd / # mount -t proc proc /mnt/gentoo/proc
livecd / # mount -o bind /dev /mnt/gentoo/dev
livecd / # cp -L /etc/resolv.conf /mnt/gentoo/etc/
livecd / # chroot /mnt/gentoo /bin/bash
livecd / # env-update && source /etc/profile

livecd / # nano -w /etc/make.conf

GENTOO_MIRRORS="http://ftp.gentoo.or.kr/ http://ftp.kaist.ac.kr/pub/gentoo/ http://ftp.daum.net/gentoo/ "

livecd / # cp /usr/share/zoneinfo/Asia/Seoul /etc/localtime
livecd / # date 070910472009
livecd / # cd /etc

livecd etc # echo "127.0.0.1 zzo.goanygate.com zzo localhost" > hosts
livecd etc # sed -i -e 's/HOSTNAME.*/HOSTNAME="zzo"/' conf.d/hostname
livecd etc # hostname zzo
livecd etc # hostname -f

livecd etc # emerge gentoo-sources
livecd etc # cd /usr/src/linux

livecd linux # lsmod //활성화된 모듈들을 적어 놓자.
livecd linux # make menuconfig
livecd linux # make -j2
livecd linux # make modules_install
livecd linux # cp arch/i386/boot/bzImage /boot/kernel
livecd linux # cd /etc

livecd etc # nano -w fstab
/dev/sda1 /boot ext2 noauto,noatime 1 2
/dev/sda3 / ext3 noatime 0 1
/dev/sda2 none swap sw

livecd etc # cd conf.d

livecd conf.d # echo 'config_eth0=( "192.168.176.135" )' >> net
livecd conf.d # echo 'routes_eth0=( "default via 192.168.176.1" )' >> net

livecd conf.d # echo 'config_eth0=( "dhcp" )' >> net // dhcp 경우

livecd conf.d # rc-update add net.eth0 default
livecd conf.d # echo pcnet32 >> /etc/modules.autoload.d/kernel-2.6
(나중에 해줘도 되고, 커널에 포함됐을경우는 생략)
livecd conf.d # rc-update add sshd default
livecd conf.d # passwd
livecd conf.d # nano -w /etc/conf.d/clock

CLOCK="KST"
TIMEZONE="Asia/Seoul"

livecd conf.d # nano -w /etc/rc.conf
livecd conf.d # nano -w /etc/conf.d/rc
livecd conf.d # nano -w /etc/conf.d/keymaps
(위셋의 체크)

livecd conf.d # emerge syslog-ng vixie-cron
livecd conf.d # rc-update add syslog-ng default
livecd conf.d # rc-update add vixie-cron default
livecd conf.d # emerge dhcpcd
livecd conf.d # emerge grub

livecd conf.d # nano -w /boot/grub/grub.conf

default 0
timeout 10

title Gentoo
root (hd0,0)
kernel /boot/kernel root=/dev/sda3

livecd conf.d # grub --no-floppy
Probing devices to guess BIOS drives. This may take a long time.

grub> root (hd0,0) // 첫번째 하드디스크 첫번째 파티션
Filesystem type is ext2fs, partition type 0x83

grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 16 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 (hd0) (hd0)1+16 p(hd0,0)/boot/grub/stage2 /boot/grub/menu.lst"... succeeded
Done.

grub> quit


livecd conf.d # exit
livecd / # umount /mnt/gentoo/dev /mnt/gentoo/proc /mnt/gentoo/boot /mnt/gentoo
livecd / # reboot

댓글 없음:

댓글 쓰기

Bee Gees - Strayin' Alive