# cp arch/i386/boot/bzImage /boot/kernel-2.6.12-Sep2005
# cp System.map /boot/System.map-2.6.12-Sep2005
# cp .config /boot/config-2.6.12-Sep2005# echo 'dm-mod' >> /etc/modules.autoload.d/kernel-2.6
# cat /etc/modules.autoload.d/kernel-2.6# nano -w /etc/fstab
/dev/md0 /boot ext2 noauto,noatime 1 2
/dev/md2 / ext3 noatime 0 1
/dev/md1 none swap sw 0 0
/dev/cdroms/cdrom0 /mnt/cdrom auto noauto,ro,user 0 0
#/dev/fd0 /mnt/floppy auto noauto 0 0
proc /proc proc defaults 0 0
shm /dev/shm tmpfs nodev,nosuid,noexec 0 0# nano -w /etc/fstab
/dev/md0 /boot ext2 noauto,noatime 1 2
/dev/md2 / ext3 noatime 0 1
/dev/md1 none swap sw 0 0
/dev/cdroms/cdrom0 /mnt/cdrom auto noauto,ro,user 0 0
#/dev/fd0 /mnt/floppy auto noauto 0 0
/dev/vgmirror/opt /opt ext3 noatime 0 3
/dev/vgmirror/usr /usr ext3 noatime 0 3
/dev/vgmirror/var /var ext3 noatime 0 3
/dev/vgmirror/home /home ext3 noatime 0 3
/dev/vgmirror/tmp /tmp ext2 noatime 0 3
/dev/vgmirror/vartmp /var/tmp ext2 noatime 0 3
proc /proc proc defaults 0 0
shm /dev/shm tmpfs nodev,nosuid,noexec 0 0# nano -w /etc/conf.d/hostname
# nano -w /etc/conf.d/domainname
# rc-update add domainname default
# nano -w /etc/conf.d/net
(either leave empty for DHCP or configure your IP and gateway)
# rc-update add net.eth0 default
# cat /etc/resolv.conf
(verify your DNS servers if you specified a static IP)
# nano -w /etc/conf.d/clock
(change CLOCK="UTC" to CLOCK="local")
# passwd
(set your root password to something you will remember)
# useradd -m -G users,wheel,audio -s /bin/bash john
# passwd john
(add a user called 'john' and set a password)# emerge syslog-ng
# rc-update add syslog-ng default
# emerge dcron
# rc-update add dcron default
# crontab /etc/crontab# /usr/bin/ssh-keygen -t dsa -b 2048 -f /etc/ssh/ssh_host_dsa_key -N ""
(the key may take a few minutes to generate)
# chmod 600 /etc/ssh/ssh_host_dsa_key
# chmod 644 /etc/ssh/ssh_host_dsa_key.pub
# rc-update add sshd default# emerge grub# ls -l /boot
# nano -w /boot/grub/grub.conf# Which listing to boot as default. 0 is the first, 1 the second etc.
default 0
timeout 30
# Sep 2005 installation (software RAID, no LVM2)
title=Gentoo Linux 2.6.12 (Sep 22 2005)
root (hd0,0)
kernel /kernel-2.6.12-Sep2005 root=/dev/md2# grub --no-floppy
grub> find /grub/stage1
(hd0,0)
(hd1,0)
grub> root (hd0,0)
grub> setup (hd0)
grub> device (hd0) /dev/hdc
grub> root (hd0,0)
grub> setup (hd0)
grub> quitlivecd gentoo # exit
livecd / # cd /
livecd / # cat /proc/mounts
(gives you a list of what is mounted)
livecd / # umount /mnt/gentoo/boot
livecd / # umount /mnt/gentoo/proc
livecd / # umount /mnt/gentoo
livecd / # reboot# emerge mdadm
# emerge lvm2
# cd /usr/src/linux
# make menuconfig# make && make modules_install
...
>>> Completed installing grub-0.96-r2 into /var/tmp/portage/grub-0.96-r2/image/
>>> Merging sys-boot/grub-0.96-r2 to /
cat: /proc/mounts: No such file or directory
cat: /proc/mounts: No such file or directory
*
* Cannot automatically mount your /boot partition.
* Your boot partition has to be mounted rw before the installation
* can continue. grub needs to install important files there.
*
!!! ERROR: sys-boot/grub-0.96-r2 failed.
!!! Function mount-boot_mount_boot_partition, Line 51, Exitcode 0
!!! Please mount your /boot partition manually!
!!! If you need support, post the topmost build error, NOT this status message.
!!! FAILED preinst: 1
livecd linux # grub
bash: grub: command not foundmount -t proc /proc /mnt/gentoo/proc livecd linux # cat /proc/mounts
cat: /proc/mounts: No such file or directory
livecd linux # exit
exit
livecd gentoo # mount -t proc none /mnt/gentoo/proc
livecd gentoo # chroot /mnt/gentoo /bin/bash
livecd / # env-update
>>> Regenerating /etc/ld.so.cache...
livecd / # source /etc/profile
livecd / # emerge grub
# emerge mdadm
# emerge lvm2
# cd /usr/src/linux
# make menuconfig# make && make modules_installLabels: Gentoo
livecd / # emerge --sync
...
app-benchmarks/bashmark/
app-benchmarks/bashmark/files/
app-benchmarks/httperf/
app-benchmarks/httperf/files/
app-benchmarks/iozone/
app-benchmarks/iozone/files/
app-benchmarks/jmeter/
app-benchmarks/ltp/
app-benchmarks/nbench/
986 100% 0.00kB/s 0:00:00
app-accessibility/java-access-bridge/ChangeLog
2947 100% 0.00kB/s 0:00:00
app-accessibility/java-access-bridge/Manifest
568 100% 0.00kB/s 0:00:00
app-accessibility/java-access-bridge/files/digest-java-access-bridge-1.4.5-r1
77 100% 0.00kB/s 0:00:00
app-accessibility/java-access-bridge/java-access-bridge-1.4.5-r1.ebuild
1250 100% 0.00kB/s 0:00:00
app-accessibility/java-access-bridge/java-access-bridge-1.4.5.ebuild
1902 100% 0.00kB/s 0:00:00
app-accessibility/mbrola/ChangeLog
3274 100% 0.00kB/s 0:00:00
app-accessibility/mbrola/Manifest
616 100% 0.00kB/s 0:00:00
mkstemp "/usr/portage/app-accessibility/mbrola/files/.digest-mbrola-3.0.1h-r1.S11U8n" failed: Input/output error
236 100% 0.00kB/s 0:00:00
mkstemp "/usr/portage/app-accessibility/mbrola/files/.digest-mbrola-3.0.1h-r3.C8lndQ" failed: Read-only file system
...# fdisk /dev/hda
Command: n
Command action: p
Partition number: 1
First cylinder: 1
Last cylinder: +128M
Command: a
Partition number: 1
Command: t
Hex code: fd
Command: n
Command action: p
Partition number: 2
First cylinder: [enter]
Last cylinder: +2048M
Command: t
Partition number: 2
Hex code: fd
(note that partition #3 can be different sizes based on needs)
Command: n
Command action: p
Partition number: 3
First cylinder: [enter]
Last cylinder: +16384M or +2048M
Command: t
Partition number: 3
Hex code: fd
Command: n
Command action: p
First cylinder: [enter]
Last cylinder: (use 99% of what's available)
Command: t
Partition number: 4
Hex code: fd
Command: p
Command: w# modprobe md
# ls /dev/md*
ls: /dev/md*: No such file or directory
# for i in 0 1 2 3; do mknod /dev/md$i b 9 $i; done
# ls /dev/md*
/dev/md0 /dev/md1 /dev/md2 /dev/md3# modprobe raid1
# mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/hda1 /dev/hde1
# mdadm --create /dev/md1 --level=1 --raid-devices=2 /dev/hda2 /dev/hde2
# mdadm --create /dev/md2 --level=1 --raid-devices=2 /dev/hda3 /dev/hde3
# mdadm --create /dev/md3 --level=1 --raid-devices=2 /dev/hda4 /dev/hde4
# cat /proc/mdstat# modprobe raid1
# mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/hda1 /dev/hdc1
# mdadm --create /dev/md1 --level=1 --raid-devices=2 /dev/hda2 /dev/hdc2
# mdadm --create /dev/md2 --level=1 --raid-devices=2 /dev/hda3 /dev/hdc3
# mdadm --create /dev/md3 --level=1 --raid-devices=2 /dev/hda4 /dev/hdc4
# cat /proc/mdstat# mdadm --detail --scan >> /etc/mdadm.conf
# nano -w /etc/mdadm.conf# mke2fs /dev/md0
# mkswap /dev/md1 ; swapon /dev/md1
# mke2fs -j /dev/md2
# mount /dev/md2 /mnt/gentoo
# mkdir /mnt/gentoo/boot ; mount /dev/md0 /mnt/gentoo/boot# modprobe dm-mod
# pvcreate /dev/md3
# echo 'devices { filter=["r/cdrom/"] }' > /etc/lvm/lvm.conf
# vgcreate vgmirror /dev/md3
# vgscan
# lvcreate -L2G -ntmp vgmirror
# lvcreate -L2G -nvartmp vgmirror
# lvcreate -L2G -nopt vgmirror
# lvcreate -L4G -nusr vgmirror
# lvcreate -L2G -nvar vgmirror
# lvcreate -L2G -nhome vgmirror
# ls -l /dev/vgmirror
# lvscan
# mke2fs /dev/vgmirror/tmp
# mke2fs /dev/vgmirror/vartmp
# mke2fs -j /dev/vgmirror/opt
# mke2fs -j /dev/vgmirror/usr
# mke2fs -j /dev/vgmirror/var
# mke2fs -j /dev/vgmirror/home
# mkdir /mnt/gentoo/opt ; mount /dev/vgmirror/opt /mnt/gentoo/opt
# mkdir /mnt/gentoo/usr ; mount /dev/vgmirror/usr /mnt/gentoo/usr
# mkdir /mnt/gentoo/var ; mount /dev/vgmirror/var /mnt/gentoo/var
# mkdir /mnt/gentoo/home ; mount /dev/vgmirror/home /mnt/gentoo/home
# mkdir /mnt/gentoo/tmp ; mount /dev/vgmirror/tmp /mnt/gentoo/tmp
# chmod 1777 /mnt/gentoo/tmp
# mkdir /mnt/gentoo/var/tmp ; mount /dev/vgmirror/vartmp /mnt/gentoo/var/tmp
# chmod 1777 /mnt/gentoo/var/tmp# date
# ls -l /mnt/cdrom/stages
total 450586
-rw-r--r-- 1 root root 92520704 Aug 7 04:45 stage3-athlon-xp-2005.1.tar.bz2
-rw-r--r-- 1 root root 92413359 Aug 7 04:47 stage3-i686-2005.1.tar.bz2
-rw-r--r-- 1 root root 92122771 Aug 7 04:46 stage3-pentium3-2005.1.tar.bz2
-rw-r--r-- 1 root root 92475718 Aug 7 04:46 stage3-pentium4-2005.1.tar.bz2
-rw-r--r-- 1 root root 91866585 Aug 7 04:46 stage3-x86-2005.1.tar.bz2
# cd /mnt/gentoo
# tar -xvjpf /mnt/cdrom/stages/stage3-x86-2005.1.tar.bz2# cd /mnt/gentoo
# ls -l /mnt/cdrom/snapshot
# tar -xvjf /mnt/cdrom/snapshot/portage-2005.1.tar.bz2 -C /mnt/gentoo/usr# cat /proc/version
Linux version 2.6.12-gentoo-r6 (root@poseidon) (gcc version 3.3.5-20050130 (Gentoo 3.3.5.20050130-r1, ssp-3.3.5.20050130-1, pie-8.7.7.1)) #1 SMP Wed Aug 3 20:26:57 UTC 2005
# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 8
model name : Celeron (Coppermine)
stepping : 6
cpu MHz : 568.141
cache size : 128 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat pse36 mmx fxsr sse
bogomips : 1114.11
# cat /proc/meminfo
MemTotal: 320792 kB
MemFree: 7600 kB
Buffers: 57472 kB
Cached: 180320 kB
SwapCached: 4 kB
Active: 29596 kB
Inactive: 210948 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 320792 kB
LowFree: 7600 kB
SwapTotal: 2007992 kB
SwapFree: 2000156 kB
Dirty: 0 kB
Writeback: 0 kB
Mapped: 5144 kB
Slab: 63636 kB
CommitLimit: 2168388 kB
Committed_AS: 15752 kB
PageTables: 172 kB
VmallocTotal: 704504 kB
VmallocUsed: 6856 kB
VmallocChunk: 696436 kB# nano -w /mnt/gentoo/etc/make.conf# These settings were set by the catalyst build script that automatically built this stage
# Please consult /etc/make.conf.example for a more detailed example
CFLAGS="-Os -mcpu=i686"
CHOST="i386-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j2"# mirrorselect -i -o >> /mnt/gentoo/etc/make.conf
# mirrorselect -i -r -o >> /mnt/gentoo/etc/make.conf
# cat /mnt/gentoo/etc/make.conf
CFLAGS="-Os -mcpu=i686"
CHOST="i386-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j2"
GENTOO_MIRRORS="http://gentoo.osuosl.org/"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"# cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
# cp -L /etc/mdadm.conf /mnt/gentoo/etc/mdadm.conf
(do the next 2 commands if you are using LVM2)
# mkdir /mnt/gentoo/etc/lvm
# cp -L /etc/lvm/lvm.conf /mnt/gentoo/etc/lvm/lvm.conf
(end of optional LVM2 commands)
# mount -t proc none /mnt/gentoo/proc
# chroot /mnt/gentoo /bin/bash
# env-update
# source /etc/profile
# emerge --sync# ls -FGg /etc/make.profile
lrwxrwxrwx 1 48 Sep 21 10:22 /etc/make.profile -> ../usr/portage/profiles/default-linux/x86/2005.1/
# ls -d /usr/portage/profiles/default-linux/x86/2005.1/2.4
/usr/portage/profiles/default-linux/x86/2005.1/2.4livecd / # ls -l /etc/make.profile
lrwxrwxrwx 1 root root 48 Oct 22 21:04 /etc/make.profile -> ../usr/portage/profiles/default-linux/x86/2005.1
livecd / # cat /etc/make.profile/make.defaults
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/profiles/default-linux/x86/2005.1/make.defaults,v 1.4 2005/08/29 22:20:25 wolf31o2 Exp $
USE="alsa apm arts avi berkdb bitmap-fonts crypt cups eds emboss encode fortran foomaticdb gdbm gif gnome gpm gstreamer gtk gtk2 imlib ipv6 jpeg kde libg++ libwww mad mikmod motif mp3 mpeg ncurses nls ogg oggvorbis opengl oss pam pdflib perl png python qt quicktime readline sdl spell ssl tcpd truetype truetype-fonts type1-fonts vorbis X xml2 xmms xv zlib"
livecd / # # less /usr/portage/profiles/use.desc
# echo 'USE="apache2 kerberos ldap postgres samba -alsa -apm -arts -bitmap-fonts -gnome -gtk -gtk2 -kde -mad -mikmod -motif -opengl -oss -qt -quicktime -sdl -truetype -truetype-fonts -type1-fonts -X -xmms -xv"' >> /etc/make.conf
# nano -w /etc/make.conf# ls /usr/share/zoneinfo
# ln -sf /usr/share/zoneinfo/EST5EDT /etc/localtime
# date
# zdump GMT
# zdump EST5EDT# emerge gentoo-sources
# ls -l /usr/src