Код: Выделить всё
# wget -c
http://gentoo.osuosl.org/releases/x86/2005.0/installcd/install-x86-minimal-2005.0.iso
# hdparm -a256A1c1d1m16u1 /dev/hda
# fdisk /dev/hda
# mkreiserfs /dev/hda1 && mkreiserfs /dev/hda3
# mkswap /dev/hda2 && swapon /dev/hda2
# mount /dev/hda3 /mnt/gentoo
# mkdir /mnt/gentoo/boot
# mount /dev/hda1 /mnt/gentoo/boot
# cd /mnt/gentoo
# wget http://gentoo.osuosl.org/releases/x86/2005.0/stages/x86/stage3-x86-2005.0.tar.bz2
# wget http://gentoo.osuosl.org/releases/x86/2005.0/stages/x86/stage3-x86-2005.0.tar.bz2.md5
# md5sum -c stage3-x86-2005.0.tar.bz2.md5
stage3-x86-2005.0.tar.bz2: OK
# tar -xjpvf stage3-x86-2005.0.tar.bz2
# wget http://gentoo.osuosl.org/snapshots/portage-20050326.tar.bz2
# wget http://gentoo.osuosl.org/snapshots/portage-20050326.tar.bz2.md5sum
# md5sum -c portage-20050326.tar.bz2.md5sum
# tar -xjvf /mnt/gentoo/portage-20050326.tar.bz2 -C /mnt/gentoo/usr
# cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
# mount -t proc none /mnt/gentoo/proc
# cp /proc/mounts /mnt/gentoo/etc/mtab
# chroot /mnt/gentoo /bin/bash
# env-update
# source /etc/profile
# ln -sf /usr/share/zoneinfo/Europe/Moscow /etc/localtime
Код: Выделить всё
# cat /etc/make.conf
CFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
LDFLAGS="-Wl,-O1 -Wl,--enable-new-dtags -Wl,--sort-common"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j2"
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
PORTDIR_OVERLAY="/usr/local/portage/"
USE="-xmms icq 3dnow hal win32codecs sse dvdr -mmx -esd alsa -oss -arts gnome -kde -ipv6 nvidia mp3 opengl ntl nptlonly mmap -mmx2 nls pic pie dvd pthreads threads userlocales unicode disablexmb"
LINGUAS="ru en"
VIDEO_CARDS="nvidia"
ALSA_CARDS="intel8x0"
Код: Выделить всё
# mkdir /var/log/portage
# mkdir /usr/local/portage
Код: Выделить всё
# cat /etc/portage/package.keywords
~sys-devel/gcc-3.4.4 ~x86
sys-devel/gcc-config ~x86
sys-libs/libstdc++-v3 ~x86
sys-libs/glibc ~x86
Код: Выделить всё
# emerge --sync
Код: Выделить всё
# cat /etc/portage/package.use
sys-libs/glibc userlocales
sys-devel/libperl ithreads
dev-lang/perl ithreads
Код: Выделить всё
# cat /etc/locales.build
ru_RU/ISO-8859-1
ru_RU.KOI8-R/KOI8-R
Код: Выделить всё
# env-update && source /etc/profile
# emerge gcc-config glibc binutils libstdc++-v3 gcc
Код: Выделить всё
# gcc-config -l
[1] i686-pc-linux-gnu-3.3.5 *
[2] i686-pc-linux-gnu-3.3.5-hardened
[3] i686-pc-linux-gnu-3.3.5-hardenednopie
[4] i686-pc-linux-gnu-3.3.5-hardenednossp
[5] i686-pc-linux-gnu-3.4.4
[6] i686-pc-linux-gnu-3.4.4-hardened
[7] i686-pc-linux-gnu-3.4.4-hardenednopie
[8] i686-pc-linux-gnu-3.4.4-hardenednossp
Код: Выделить всё
# gcc-config 5
# env-update && source /etc/profile
# emerge glibc binutils libstdc++-v3 gcc portage
# emerge -e system && emerge -e system
# emerge -P gcc
# emerge ccache
# emerge syslog-ng xinetd grub vixie-cron reiserfsprogs sysfsutils dhcpcd hotplug coldplug gentoolkit
# emerge --nodeps acpid ntp
# rc-update add syslog-ng default
# rc-update add net.eth0 default
# rc-update add vixie-cron default
# rc-update add xinetd default
# rc-update add sshd default
# rc-update add hotplug default
# rc-update add coldplug default
# rc-update add acpid default
# rc-update add ntp-client default
# ntpdate -b -u ntp.ru
# date
# emerge gentoo-sources
# rm /usr/src/linux
# cd /usr/src
# ln -s linux-2.6.12-gentoo-r6 linux
# cd /usr/src/linux
# make menuconfig
# make && make modules_install
# cp arch/i386/boot/bzImage /boot/vmlinuz
# echo "HOSTNAME="gentoo"" > /etc/conf.d/hostname
# echo "127.0.0.1 localhost gentoo" > /etc/hosts
# emerge splashutils splash-themes-gentoo
# splash_geninitramfs -v -g /boot/fbsplash-emergence-1024x768 -r 1024x768 emergence && splash_geninitramfs -v -g /boot/fbsplash-emergence-1280x1024 -r 1280x1024 emergence && splash_geninitramfs -v -g /boot/fbsplash-emergence-1600x1200 -r 1600x1200 emergence && rc-update add splash default
# cd /boot/grub
# touch grub.conf
Код: Выделить всё
$ cat grub.conf
# Grub boot menu configuration file
#
# Boot automatically after 30 secs.
timeout 30
# By default, boot the second entry.
default 1
# Fallback to the first entry.
fallback 0
# Use default Grub Splash image
# splashimage=(hd0,0)/grub/splash.xpm.gz
#
# Use custom (downloaded) Gentoo Splash Image
splashimage=(hd0,0)/grub/gentoo.xpm.gz
# Boot Gentoo Linux (no framebuffer)
title Gentoo-2.6.12-r6
root (hd0,0)
kernel (hd0,0)/vmlinuz ro root=/dev/hda3 video=vesafb:ywrap,pmipal,1024x768-16@85
# Boot Gentoo Linux at 1024x768 framebuffer resolution
title Gentoo-2.6.12-r6, 1024x768
root (hd0,0)
kernel (hd0,0)/vmlinuz ro root=/dev/hda3 video=vesafb:ywrap,pmipal,1024x768-24@85 splash=verbose,fadein,theme:emergence CONSOLE=/dev/tty1
initrd (hd0,0)/fbsplash-emergence-1024x768
# Boot Gentoo Linux at 1280x1024 framebuffer resolution
title Gentoo-2.6.12-r6, 1280x1024
root (hd0,0)
kernel (hd0,0)/vmlinuz ro root=/dev/hda3 video=vesafb:ywrap,pmipal,1280x1024-24@85 splash=verbose,fadein,theme:emergence CONSOLE=/dev/tty1
initrd (hd0,0)/fbsplash-emergence-1280x1024
# For installing GRUB into the hard disk
title Install GRUB into the hard disk
root (hd0,0)
setup (hd0)
Код: Выделить всё
# grub
grub> root (hd0,0)
grub> setup (hd0)
grub> quit
Код: Выделить всё
# wget http://www.schultz-net.dk/downloads/grub/gentoo.xpm.gz
Код: Выделить всё
$ cat /etc/fstab
# <fs> <mountpoint> <type> <opts> <dump/pass>
/dev/hda1 /boot reiserfs noauto,notail 1 2
/dev/hda3 / reiserfs notail 0 1
/dev/hda2 none swap sw 0 0
/dev/cdroms/cdrom0 /mnt/cdrom iso9660 user,noauto,ro,exec 0 0
/dev/fd0 /mnt/floppy auto noauto,users 0 0
# NOTE: The next line is critical for boot!
none /proc proc defaults 0 0
# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
# use almost no memory if not populated with files)
# Adding the following line to /etc/fstab should take care of this:
none /dev/shm tmpfs nodev,nosuid 0 0
Код: Выделить всё
# cat /etc/conf.d/hdparm
disc0_args="-a256A1c1d1m16u1"
cdrom0_args="-d1c1u1"
Код: Выделить всё
# rc-update add hdparm boot
Код: Выделить всё
# passwd
New password: (Enter your new password)
Re-enter password: (Re-enter your password)
Код: Выделить всё
# useradd -m -G users,wheel,audio,games user
# passwd user
New password: (Enter user's password)
Re-enter password: (Re-enter user's password)
Код: Выделить всё
# rc-update add numlock default
# setterm -blank n
# echo “setterm –blank n” >> /etc/conf.d/local.start
# exit
# cd ~/
# umount /mnt/gentoo/proc /mnt/gentoo/boot /mnt/gentoo
# swapoff /dev/hda2
# shutdown -r now
make.conf у каждого свой.