* Mounting proc at /proc [ ok ]
* Mounting sysfs at /sys [ !! ]
can't create lock file /etc/mtab~944: Read-only file system (use -n flag to override)livecd root # passwd
livecd root # /etc/init.d/sshd start
livecd root # ifconfig
(at this point, I switch over to using SecureCRT on the other system)
livecd root # modprobe md
livecd root # modprobe raid1
livecd root # for i in 0 1 2 3; do mknod /dev/md$i b 9 $i; done
livecd root # mdadm --assemble /dev/md0 /dev/hda1 /dev/hdc1
livecd root # mdadm --assemble /dev/md1 /dev/hda2 /dev/hdc2
livecd root # mdadm --assemble /dev/md2 /dev/hda3 /dev/hdc3
livecd root # mdadm --assemble /dev/md3 /dev/hda4 /dev/hdc4livecd root # swapon /dev/md2
livecd root # mount /dev/md1 /mnt/gentoo
livecd root # mount /dev/md0 /mnt/gentoo/boot
livecd root # modprobe dm-mod
livecd root # mkdir /etc/lvm
livecd root # echo 'devices { filter=["r/cdrom/"] }' >/etc/lvm/lvm.conf
livecd / # lvscan
livecd / # lvchange -ay vgmirror# mount /dev/vgmirror/opt /mnt/gentoo/opt
# mount /dev/vgmirror/usr /mnt/gentoo/usr
# mount /dev/vgmirror/var /mnt/gentoo/var
# mount /dev/vgmirror/home /mnt/gentoo/home
# mount /dev/vgmirror/tmp /mnt/gentoo/tmp
# chmod 1777 /mnt/gentoo/tmp
# mount /dev/vgmirror/vartmp /mnt/gentoo/var/tmp
# chmod 1777 /mnt/gentoo/var/tmp
# mount -t proc none /mnt/gentoo/proc# chroot /mnt/gentoo /bin/bash ; env-update# cd /usr/src/linux
# make menuconfig# make && make modules_install
# cp arch/i386/boot/bzImage /boot/kernel-2.6.11-gentoo-Apr20
# cp System.map /boot/System.map-2.6.11-gentoo-Apr20
# cp .config /boot/config-2.6.11-gentoo-Apr20
# nano -w /etc/modules.autoload.d/kernel-2.6
(remove dm-mod from being auto-loaded)
livecd linux # exit
livecd / # cd /
livecd / # cat /proc/mounts
(unmount all of your mounted partitions, including the LVM mounts)
livecd / # umount ... (insert list of mounted file systems)
livecd / # vgchange -an vgmirror
livecd / # reboot
(remove the gentoo boot CD)# echo 'sys-fs/lvm2 static' >> /etc/portage/package.use
# emerge lvm2* Mounting proc at /proc [ ok ]
* Mounting sysfs at /sys [ !! ]
can't create lock file /etc/mtab~944: Read-only file system (use -n flag to override)
* Mounting ramfs at /dev... [ ok ]
* Configuring system to use udev... [ ok ]
* Populating /dev with device nodes...
* Using /sbin/hotplug for udev management...
* Mounting devpts at /dev/pts... [ ok ]
* Activating (possible) swap... [ ok ]
* Remounting root filesystem read-only (if necessary)... [ ok ]
* Checking root filesystem...
ext2fs_check_if_mount: No such file or directory while determining whether /dev/md2 is mounted.
fsck.ext3: No such file or directory while trying to open /dev/md2
/dev/md2: The superblock could not be read or does not describe a correct ext2 filesystem. If the device is valid and it really contains an ext2 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck -b 8193 <device>
* Filesystem couldn't be fixed :( [ !! ]
Give root password for maintenance
(or type Control-D for normal startup):livecd linux # emerge (something)
!!! Your current profile is deprecated and not supported anymore.
!!! Please upgrade to the following profile if possible:
default-linux/x86/2005.0
To upgrade do the following steps:
# emerge -n '>=sys-apps/portage-2.0.51'
# cd /etc/
# rm make.profile
# ln -s ../usr/portage/profiles/default-linux/x86/2005.0 make.profile
# Gentoo has switched to 2.6 as the defaults for headers/kernels. If you wish
# to use 2.4 headers/kernels, then you should do the following to upgrade:
# emerge -n '>=sys-apps/portage-2.0.51'
# cd /etc/
# rm make.profile
# ln -s ../usr/portage/profiles/default-linux/x86/2005.0/2.4 make.profile
# More information can be found at the following URLs:
# http://www.gentoo.org/doc/en/gentoo-upgrading.xml
# http://www.gentoo.org/doc/en/migration-to-2.6.xml
# emerge grub# 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> quit
## nano -w /boot/grub/grub.conf# cat /boot/grub/grub.conf
default 0
timeout 30
title=Gentoo Linux 2.6.11 (April 20 2005)
root (hd0,0)
kernel /kernel-2.6.11-gentoo-Apr20 root=/dev/md2
## emerge syslog-ng
# rc-update add syslog-ng default
# emerge dcron
# rc-update add dcron default
# crontab /etc/crontablivecd gentoo # exit
livecd / # cd /
livecd / # cat /proc/mounts
(unmount all of your mounted partitions, including the LVM mounts)
livecd / # umount ... (insert list of mounted file systems)
livecd / # vgchange -an vgmirror
livecd / # rebootLabels: 2005, Gentoo, Gigabyte-GA-6VA7+
# emerge lvm2
# emerge mdadm
# cd /usr/src/linux
# make menuconfig# make && make modules_install# cp arch/i386/boot/bzImage /boot/kernel-2.6.11-gentoo-Apr20
# cp System.map /boot/System.map-2.6.11-gentoo-Apr20
# cp .config /boot/config-2.6.11-gentoo-Apr20# nano -w /etc/modules.autoload.d/kernel-2.6# /etc/modules.autoload.d/kernel-2.6: kernel modules to load when system boots.
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/modules.autoload.d/kernel-2.6,v 1.1 2003/07/16 18:13:45 azarah Exp $
#
# Note that this file is for 2.6 kernels.
#
# Add the names of modules that you'd like to load when the system
# starts into this file, one per line. Comments begin with # and
# are ignored. Read man modules.autoload for additional details.
# For example:
# 3c59x
dm-mod# /etc/fstab: static file system information.
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/fstab,v 1.14 2003/10/13 20:03:38 azarah Exp $
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed; notail increases performance of ReiserFS (at the expense of storage
# efficiency). It's safe to drop the noatime options if you want and to
# switch between notail and tail freely.
# <fs> <mountpoint> <type> <opts> <dump/pass>
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/md0 /boot ext2 noauto,noatime 1 2
/dev/md1 / ext3 noatime 0 1
/dev/md2 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
# 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 defaults 0 0# echo yourhostname > /etc/hostname
# echo yourdnsname > /etc/dnsdomainname
# rc-update add domainname default
# nano -w /etc/conf.d/net
(either use iface_eth0="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/rc.conf
(change CLOCK="UTC" to CLOCK="local")
# passwod
(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)Labels: 2005, Gentoo, Gigabyte-GA-6VA7+
# ls /usr/share/zoneinfo
# ln -sf /usr/share/zoneinfo/EST5EDT /etc/localtime
# date
# zdump GMT
# zdump EST5EDT# emerge gentoo-sources
# ls -l /usr/srcLabels: 2005, Gentoo, Gigabyte-GA-6VA7+
# ls -l /etc/make.profile# cd /usr/portage
# scripts/bootstrap.sh# emerge --emptytree systemLabels: 2005, Gentoo, Gigabyte-GA-6VA7+
# echo 'DEVICES /dev/hda*' >> /etc/mdadm.conf
# echo 'DEVICES /dev/hdc*' >> /etc/mdadm.conf
# mdadm --detail --scan >> /etc/mdadm.conf
# nano -w /etc/mdadm.confEVICES /dev/hda*
DEVICES /dev/hdc*
ARRAY /dev/md3 level=raid1 num-devices=2 devices=/dev/hda4,/dev/hdc4
ARRAY /dev/md2 level=raid1 num-devices=2 devices=/dev/hda3,/dev/hdc3
ARRAY /dev/md1 level=raid1 num-devices=2 devices=/dev/hda2,/dev/hdc2
ARRAY /dev/md0 level=raid1 num-devices=2 devices=/dev/hda1,/dev/hdc1 # mke2fs /dev/md0
# mke2fs -j /dev/md1
# mkswap /dev/md2
# swapon /dev/md2
# mount /dev/md1 /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 -L4G -ntmp vgmirror
# lvcreate -L4G -nvartmp vgmirror
# lvcreate -L2G -nopt vgmirror
# lvcreate -L4G -nusr vgmirror
# lvcreate -L4G -nvar vgmirror
# lvcreate -L4G -nhome vgmirror
# ls -l /dev/vgmirror
# lvscan ACTIVE '/dev/vgmirror/tmp' [4.00 GB] next free (default)
ACTIVE '/dev/vgmirror/vartmp' [4.00 GB] next free (default)
ACTIVE '/dev/vgmirror/opt' [2.00 GB] next free (default)
ACTIVE '/dev/vgmirror/usr' [4.00 GB] next free (default)
ACTIVE '/dev/vgmirror/var' [4.00 GB] next free (default)
ACTIVE '/dev/vgmirror/home' [4.00 GB] next free (default)# 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
# mkdir /mnt/gentoo/usr
# mkdir /mnt/gentoo/var
# mkdir /mnt/gentoo/home
# mount /dev/vgmirror/opt /mnt/gentoo/opt
# mount /dev/vgmirror/usr /mnt/gentoo/usr
# mount /dev/vgmirror/var /mnt/gentoo/var
# 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
# mkdir /mnt/gentoo/proc
# mount -t proc none /mnt/gentoo/proc# date
# ls -l /mnt/cdrom/stages
# cd /mnt/gentoo
# tar -xvjpf /mnt/cdrom/stages/stage1-x86-2004.3.tar.bz2
# ls -l /mnt/cdrom/snapshots
# cd /mnt/gentoo
# tar -xvjf /mnt/cdrom/snapshots/portage-20041022.tar.bz2 -C /mnt/gentoo/usr
# cd /mnt/gentoo
# mkdir /mnt/gentoo/usr/portage/distfiles
# cp /mnt/cdrom/distfiles/* /mnt/gentoo/usr/portage/distfiles/# cat /proc/version
Linux version 2.6.9-gentoo-r1 (root@inertia) (gcc version 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6)) #1 SMP Thu Nov 25 03:43:53 UTC 2004
# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 8
model name : Celeron (Coppermine)
stepping : 6
cpu MHz : 568.097
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# nano -w /mnt/gentoo/etc/make.confCFLAGS="-Os -march=pentium3 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j2"
USE="apache2 kerberos ldap -apm -gif -gnome -gtk -jpeg -kde -mad -mikmod -mpeg -oggvorbis -opengl -oss -pdflib -png -qt -quicktime -sdl -truetype -xmms -xv"# mirrorselect -i -o >> /mnt/gentoo/etc/make.conf
# mirrorselect -i -r -o >> /mnt/gentoo/etc/make.confGENTOO_MIRRORS="http://gentoo.osuosl.org/ http://csociety-ftp.ecn.purdue.edu/pub/gentoo/ http://gentoo.chem.wisc.edu/gentoo/"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"# cp -L /mnt/gentoo/etc/make.conf /mnt/gentoo/boot/make.conf-backupcopy
# cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
# cp -L /etc/mdadm.conf /mnt/gentoo/etc/mdadm.conf
# cp -L /etc/mdadm.conf /mnt/gentoo/boot/mdadm.conf-backupcopy
# mkdir /mnt/gentoo/etc/lvm
# cp -L /etc/lvm/lvm.conf /mnt/gentoo/etc/lvm/lvm.conf
# cp -L /etc/lvm/lvm.conf /mnt/gentoo/boot/lvm.conf-backupcopy# chroot /mnt/gentoo /bin/bash
# env-update
# source /etc/profile
# emerge --syncLabels: 2005, Gentoo, Gigabyte-GA-6VA7+
# 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
Command: n
Command action: p
Partition number: 3
First cylinder: [enter]
Last cylinder: +2048M
Command: t
Partition number: 3
Hex code: fd
Command: n
Command action: p
First cylinder: [enter]
Last cylinder: [enter]
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/hdc1
mdadm: array /dev/md0 started.
# mdadm --create /dev/md1 --level=1 --raid-devices=2 /dev/hda2 /dev/hdc2
mdadm: array /dev/md1 started.
# cat /proc/mdstat
Personalities : [raid1]
md1 : active raid1 hdc2[1] hda2[0]
2000256 blocks [2/2] [UU]
[==>..................] resync = 13.8% (277760/2000256) finish=3.6min speed=7920K/sec
md0 : active raid1 hdc1[1] hda1[0]
125376 blocks [2/2] [UU]
unused devices: <none># 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/hdc4Labels: 2005, Gentoo, SoftwareRAID