четверг, 30 июня 2011 г.

Gentoo installation (new PC amd64)

1) boot from minimalcd
2) Configure network:
> ifconfig eth0 192.168.0.4 broadcast 192.168.0.255 netmask 255.255.255.0 up
> route add default gw 192.168.0.1
> nano -w /etc/resolv.conf // set nameservers
> ping google.com // check network
3) Prepare hdd:
> fdisk /dev/sda
delete paritions : d -> 1 -> d -> 2 ->...
create boot partition : n -> p -> 1 -> enter -> +64M -> a -> 1
craete swap partition : n -> p -> 2 -> enter -> +2048M -> t -> 2 -> 82
create extended partition : n -> e -> 3 -> enter -> enter
create root partition : n -> l -> enter -> +30G
create home partition : n -> l -> enter -> enter
write partition table : w
set fs to boot : mke2fs /dev/sda1
set fs to root : mkreiserfs /dev/sda5
set fs to home : mkreiserfs /dev/sda6
set swap signature :
mkswap /dev/sda2
swapon /dev/sda2
mount partitions :
> mount /dev/sda5 /mnt/gentoo/ (mount root partition )
> mkdir /mnt/gentoo/boot
> mount /dev/sda1 /mnt/gentoo/boot (mount boot partition)
> mkdir /mnt/gentoo/home
> mount /dev/sda6 /mnt/gentoo/home/ (mount home partition)
4) Set gentoo instalation scripts:
> cd /mnt/gentoo/
> wget wget http://gentoo.inode.at/releases/amd64/current-stage3/stage3-amd64-20110625.tar.bz2
> tar xvjpf stage3-amd64-20110625.tar.bz2
> wget http://gentoo.inode.at/snapshots/portage-latest.tar.bz2
> tar xvjf /mnt/gentoo/portage-latest.tar.bz2 -C /mnt/gentoo/usr
> nano -w etc/make.conf (edit file for your needs)
5) Install base gentoo system:
> mirrorselect -i -o >> /mnt/gentoo/etc/make.conf (set portage mirrors)
> mirrorselect -i -r -o >> /mnt/gentoo/etc/make.conf (set rsync mirrors)
> cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf (copy DNS settings)
> mount -t proc none /mnt/gentoo/proc (mount fs /proc to new location)
> mount -o bind /dev /mnt/gentoo/dev (mount fs /dev to new location)
> chroot /mnt/gentoo /bin/bash (change root catalog)
> env-update (create new enviroment)
> source /etc/profile (load new enviroment to memory)
> export PS1="(chroot) $PS1" (set prefix to command line)
> emerge --sync (update portage to latest version)
> nano -w /etc/make.conf (set USE flags)
> nano -w /etc/locale.gen (set locale: ru_UA.UTF-8 UTF-8)
> locale-gen
6) Configure Kernel:
> cp /usr/share/zoneinfo/Europe/Kiev /etc/localtime (set timezone)
> cd /usr/src/linux
> make menuconfig (configure kernel)
> make && make modules_install (compile kernel)
> cp arch/x86_64/boot/bzImage /boot/2.6.38-gentoo-r6_1 (install kernel)
7) Configure system:
> nano -w /etc/fstab (edit for your purposes)
> nano -w /etc/conf.d/hostname (set hostname)
> nano -w /etc/conf.d/net (set domain name, network configuration)
> cd /etc/init.d/
> ln -s net.lo net.eth0
> rc-update add net.eth0 default
> nano -w /etc/hosts
> passwd
> nano -w /etc/rc.conf
> nano -w /etc/conf.d/keymaps
> nano -w /etc/conf.d/hwclock
8) Install system utilities:
> emerge syslog-ng
> rc-update add syslog-ng default
> emerge vixie-cron
> chmod 0775 //var/spool/mail/
> rc-update add vixie-cron default
> emerge sys-apps/mlocate
> emerge reiserfsprogs
9 ) Install, configure GRUB
> emerge grub
> nano -w /boot/grub/grub.conf
> grep -v rootfs /proc/mounts > /etc/mtab
> grub --no-floppy
grub> root (hd0,0)
grub> setup (hd0)
grub> quit
> exit
> cd
> umount /mnt/gentoo/boot /mnt/gentoo/dev /mnt/gentoo/proc /mnt/gentoo

Комментариев нет:

Отправить комментарий