Terapix Star Formation Region IC 1396, © 2001 CFHT
Installation process
Article
following Gentoo handbook
by FMA - Updated November 3rd, 2006

* Booting the Universal Installation CD and Configuring your Network

-  start the machine with the gentoo install-amd64-universal CD in
-  choose "gentoo docache" (docache allows you to remove the CD)

# passwd
# [version<2005.0] modprobe tg3
# [version<2005.0] modprobe sata_sil
# [version<2005.0] vi /etc/conf.d/net
iface_eth0="dhcp"
# /etc/init.d/net.eth0 start
# /etc/init.d/sshd start
# umount /mnt/cdrom

-  ifconfig (to get dhcp IP)
-  eject cdrom, and back to office desk !
-  ssh on it
-  eventually some hdparm on IDE to make it faster


* Preparing the Disks

-  Partition the system disk:

# cfdisk /dev/sda,

with the following partition scheme:

mount point partition size filesystem disk device
/boot 128MB ext2 /dev/sda1
swap 4GB = 4096MB swap /dev/sda2
/ 15GB = 15360MB ext3 /dev/sda5
/var 15GB = 15360MB ext3 /dev/sda6
/home what remains ext3 /dev/sda7

Different for mix[345], etc... (swap size = RAM size):

mount point partition size filesystem disk device
/boot 128MB ext3 /dev/sda1
swap 4GB = 4096MB swap /dev/sda2
/var 30GB = 30720MB reiserfs /dev/sda3
/ 20GB = 20480MB reiserfs /dev/sda5
/home what remains xfs /dev/sda6

o
n
p
1

+128M
n
p
2

+12000M
n
p
3

+30720M
n
e


n
e

+20480M
n


t
2
82
a
1
w
or
echo -e "o\nn\np\n1\n\n+128M\nn\np\n2\n\n+12000M\nn\np\n3\n\n+30720M\nn\ne\n\n\nn\ne\n\n+20480M\nn\n\n\nt\n2\n82\na\n1\nw\n" | fdisk /dev/sda

4G for swap:

echo -e "o\nn\np\n1\n\n+128M\nn\np\n2\n\n+4096M\nn\np\n3\n\n+30720M\nn\ne\n\n\nn\ne\n\n+20480M\nn\n\n\nt\n2\n82\na\n1\nw\n" | fdisk /dev/sda

8G for swap:

echo -e "o\nn\np\n1\n\n+128M\nn\np\n2\n\n+8192M\nn\np\n3\n\n+30720M\nn\ne\n\n\nn\ne\n\n+20480M\nn\n\n\nt\n2\n82\na\n1\nw\n" | fdisk /dev/sda

16G for swap:

echo -e "o\nn\np\n1\n\n+128M\nn\np\n2\n\n+16384M\nn\np\n3\n\n+30720M\nn\ne\n\n\nn\ne\n\n+20480M\nn\n\n\nt\n2\n82\na\n1\nw\n" | fdisk /dev/sda

32G for swap:

echo -e "o\nn\np\n1\n\n+128M\nn\np\n2\n\n+32768M\nn\np\n3\n\n+30720M\nn\ne\n\n\nn\ne\n\n+20480M\nn\n\n\nt\n2\n82\na\n1\nw\n" | fdisk /dev/sda

partionning for pix* with fdisk:

# fdisk /dev/hda
o
n
p
1
1
+2048M
n
p
2
\n
\n
t
1
82
a
2
w

or

Warning: check the name ofthe disk !!, and change the swap size (2048M here):

echo -e "o\nn\np\n1\n1\n+2048M\nn\np\n2\n\n\nt\n1\n82\na\n2\nw\n" | fdisk /dev/hda
echo -e "o\nn\np\n1\n1\n+8192M\nn\np\n2\n\n\nt\n1\n82\na\n2\nw\n" | fdisk /dev/sda

-  format:

Obsolete !!

# mke2fs /dev/sda1
# mke2fs -j /dev/sda5
# mke2fs -j /dev/sda6
# mke2fs -j /dev/sda7
# mkswap /dev/sda2
# swapon /dev/sda2

For mix3 (and mix4, cosmix2, with some changes in the sizes):

# mke2fs -j /dev/sda1
# mkreiserfs --format 3.6 /dev/sda3
# mkreiserfs --format 3.6 /dev/sda5
# mkfs.xfs -d agcount=16 -l size=64m -f /dev/sda6
# mkswap /dev/sda2
# swapon /dev/sda2

Starting at mix5, use reiserfs for /home too:

# mke2fs -j /dev/sda1  -L "/boot"
# echo "y" | mkreiserfs /dev/sda3 -l "/var"
# echo "y" | mkreiserfs /dev/sda5 -l "/"
# echo "y" | mkreiserfs /dev/sda6 -l "/home"
# mkswap /dev/sda2
# swapon /dev/sda2

For pix*:

# mkreiserfs /dev/hda2 -l "/"
# mkswap /dev/hda1
# swapon /dev/hda1

-  mounting:

WARNING: mount all partitions needed for system, like /var or /tmp NOW !! or the following `tar x` won't fill the right directories.

# mount /dev/sda5 /mnt/gentoo/
# mkdir /mnt/gentoo/boot
# mount /dev/sda1 /mnt/gentoo/boot
# mkdir /mnt/gentoo/proc
# mount -t proc none /mnt/gentoo/proc
# mkdir /mnt/gentoo/home
# mount /dev/sda6 /mnt/gentoo/home
# mkdir /mnt/gentoo/var
# mount /dev/sda3 /mnt/gentoo/var

Obsolete (for mix1/mix2):

# mount /dev/sda6 /mnt/gentoo/var

For pix*:

# mount /dev/hda2 /mnt/gentoo/
# mkdir /mnt/gentoo/proc
# mount -t proc none /mnt/gentoo/proc

* Installing the Gentoo Installation Files

-  5.a Set the Date (UTC = Paris -1h), e.g.:

# date 060920152006

-  5.b. Default: Using a Stage from the Internet

# cd /mnt/gentoo
# links2 http://www.gentoo.org/main/en/mirrors.xml
     get stage1-amd64-2006.0.tar.bz2
     get stage1-amd64-2006.0.tar.bz2.DIGESTS
# md5sum -c stage1-amd64-2006.0.tar.bz2.DIGESTS
# tar xvjpf stage1-amd64-2005.0.tar.bz2

-  5.d Installing Portage (get latest snapshot)

# links http://www.gentoo.org/main/en/mirrors.xml
   get portage-20060608.tar.bz2
   get portage-20060608.tar.bz2.md5sum
# md5sum -c portage-20060608.tar.bz2.md5sum
# tar xvjf portage-20060608.tar.bz2 -C /mnt/gentoo/usr

-  5.e. Configuring the Compile Options

# mkdir /mnt/gentoo/usr/local/portage /mnt/gentoo/var/log/portage
# vi /mnt/gentoo/etc/make.conf
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
USE="-kde -gnome fftw gsl gd gif gpm gtk2 imagemagick jpeg mpi perl plotutils png qt readline truetype X xml2 zlib apache2 curl tiff lzw-tiff f77 memlimit mcal gmp snmp multilib nis"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j3"

On mix3:

# 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="-march=opteron -O2 -pipe"
# x86:
#CFLAGS="-march=athlon-mp -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
USE="X Xaw3d acl -alsa apache2 -arts authfile bash-completion -berkdb \
 big-tables blas bzip2 cgi cups curl -doc -dvdr emul-linux-x86 -esd extensions \
 fftw -flac gd geometry gimpprint gmp -gnustep gsl -gstreamer gtk2 gtkhtml icc \
 ifc innodb ithreads -kde lm_sensors memlimit -mikmod mmap mng mozsvg mpeg mpi \
 multislot mysql nagios-ssh nis nptl -oggvorbis -oss plotutils posix \
 -postgres pwdb qt ruby sasl shaper snmp soap softquota svg tcltk threads truetype unicode \
 wmf xinetd xml -xmms -xrandr"
# adjust to N+1 (N=number of CPU)
MAKEOPTS="-j5"

# PORTDIR_OVERLAY is a directory where local ebuilds may be stored without
#     concern that they will be deleted by rsync updates. Default is not
#     defined.
PORTDIR_OVERLAY=/usr/local/portage

# PORT_LOGDIR is the location where portage will store all the logs it
#     creates from each individual merge. They are stored as YYMMDD-$PF.log
#     in the directory specified. This is disabled until you enable it by
#     providing a directory. Permissions will be modified as needed IF the
#     directory exists, otherwise logging will be disabled.
PORT_LOGDIR=/var/log/portage

# PKGDIR is the location of binary packages that you can have created
#     with '--buildpkg' or '-b' while emerging a package. This can get
#     upto several hundred megs, or even a few gigs.
# Defaults to ${PORTDIR}/packages
PKGDIR=/usr/portage/packages

GENTOO_MIRRORS="http://ftp.club-internet.fr/pub/mirrors/gentoo http://pandemonium.tiscali.de/pub/gentoo/ http://gentoo.intergenia.de http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"

# Portage uses PORTAGE_BINHOST to specify mirrors for prebuilt-binary packages.
# This ftp connection is passive ftp.
#PORTAGE_BINHOST="ftp://login:pass@grp.mirror.site/pub/grp/i686/athlon-xp/"
# This ftp connection is active ftp.
#PORTAGE_BINHOST="ftp://login:pass@grp.mirror.site:21*/pub/grp/i686/athlon-xp/"

#SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
SYNC="rsync://rsync.fr.gentoo.org/gentoo-portage"

# FEATURES are settings that affect the functionality of portage. Most of
#     these settings are for developer use, but some are available to non-
#     developers as well.
#
#  'buildpkg'    causes binary packages to be created of all packages that
#                are being merged.
#  'collision-protect'
#                prevents packages from overwriting files that are owned by
#                another package or by no package at all.
#  'distcc'      enables distcc support via CC.
#  'distlocks'   enables distfiles locking using fcntl or hardlinks. This
#                is enabled by default. Tools exist to help clean the locks
#                after crashes: /usr/lib/portage/bin/clean_locks.
#FEATURES="sandbox buildpkg ccache distcc userpriv usersandbox notitles noclean noauto cvs keeptemp keepwork autoaddcvs"
#FEATURES="sandbox ccache distcc distlocks autoaddcvs"
FEATURES="distcc"

INPUT_DEVICES="evdev keyboard mouse"
VIDEO_CARDS="ati vga vesa fbdev"


* Installing the Gentoo Base System

### mirrorselect -a -D -s4 -o >> /mnt/gentoo/etc/make.conf
### mirrorselect -i -o >> /mnt/gentoo/etc/make.conf
# cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
# mount -o bind /dev /mnt/gentoo/dev
# chroot /mnt/gentoo /bin/bash
# env-update
# source /etc/profile
# export PS1="(chroot) $PS1"
# emerge --sync
# ls -FGg /etc/make.profile

-  setup distcc for bootstrap (cf. http://www.gentoo.org/doc/en/distcc.xml#bootstrapping)

# vi /etc/make.conf
FEATURES="distcc"
# export PATH="/usr/lib/ccache/bin:/usr/lib/distcc/bin:${PATH}"
# echo "distcc:x:240:2:distccd:/dev/null:/bin/false" >>/etc/passwd
# USE='-*' emerge --nodeps sys-devel/distcc
# /usr/bin/distcc-config --set-hosts "localhost 194.57.221.51 194.57.221.52 194.57.221.19 194.57.221.11 194.57.221.12 194.57.221.14 194.57.221.18"
# distccmon-text 1
# DISTCC_DIR="/var/tmp/portage/.distcc/" distccmon-text 1

# vi /etc/conf.d/distccd
DISTCCD_OPTS="${DISTCCD_OPTS} --listen 10.0.1.0/24"
# rc-update add distccd default
# /etc/init.d/distccd start


* Configuring the Kernel

# cp /usr/share/zoneinfo/Europe/Paris /etc/localtime
### emerge gentoo-dev-sources
# USE="-doc symlink" emerge -va gentoo-sources
# cd /usr/src/linux

-  copy .config from recent install. ATTENTION: if the kernel version is different, do # make oldconfig
-  [NOT USEFUL ANYMORE !!] patch kernel (open descriptors limit): recompile with the following changes to files /usr/src/linux/include/linux/fs.h and /usr/include/linux/fs.h:

#define INR_OPEN (1024*1024)
#define NR_FILE  32768

# make menuconfig

Code maturity level options --->
 [*] Prompt for development and/or incomplete code/drivers

File systems --->
 [*] Virtual memory file system support (former shm fs)
 [*] /proc file system support
 [*] /dev file system support (EXPERIMENTAL)
 [*]   Automatically mount at boot

 [*] /dev/pts file system for Unix98 PTYs

(Select one or more of the following options as needed by your system)
 <*> Reiserfs support
 <*> Ext3 journalling file system support
 <*> JFS filesystem support
 <*> Second extended fs support
 <*> XFS filesystem support

Processor type and features --->
 [*] Symmetric multi-processing support

# make -j5 && make modules_install
# KERNEL_VERSION="2.6.9-gentoo-r14"
# cp arch/x86_64/boot/bzImage /boot/kernel-$KERNEL_VERSION
# [x86] cp arch/i386/boot/bzImage /boot/kernel-$KERNEL_VERSION
# cp .config /boot/config-$KERNEL_VERSION
# cp System.map /boot/System.map-$KERNEL_VERSION

-  fill /etc/modules.autoload.d/kernel-2.6 with the needed modules
-  add the following line in /etc/modules.d/aliases:

# for autofs4, recommended by comment in kernel configuration
alias autofs autofs4

# lsmod | sort : checks which modules are loaded by the livecd

# vi /etc/modules.autoload.d/kernel-2.6 : list them here

# USB
uhci-hcd
ohci-hcd
# USB2
ehci-hcd

# network card
# e1000
tg3
#parport_pc
#parport
ieee1394
usb-storage
#usbcore
#mptbase
3w-9xxx
#3w-xxxx

#qla2200
autofs4

# modules-update


* Configuring your System

# vi /etc/fstab
/dev/sda1           /boot       ext2     noauto,noatime  1 1
/dev/sda2           none        swap     sw              0 0
/dev/sda5           /           ext3     noatime         0 0
/dev/sda6           /var        ext3     noatime         0 0
/dev/sda7           /home       ext3     noatime         0 0
/dev/cdroms/cdrom0  /mnt/cdrom  iso9660  noauto,ro       0 0
/dev/fd0            /mnt/floppy auto     noauto,user     0 0

#/dev/sdb            /data/mix1/raid1  xfs  noatime       0 0
#/dev/sdc            /data/mix1/raid2  xfs  noatime       0 0

# end of /etc/fstab

mix3/mix4:

/dev/sda1          /boot       ext3      noauto,noatime 1 2
/dev/sda2          none        swap      sw             0 0
/dev/sda3          /var        reiserfs  noatime        0 2
/dev/sda5          /           reiserfs  noatime        0 1
#/dev/sda6          /home       xfs       noatime        0 2
/dev/sda6          /home       reiserfs       noatime        0 2
/dev/cdroms/cdrom0 /mnt/cdrom  iso9660   noauto,ro      0 0
/dev/fd0          /mnt/floppy auto      noauto         0 0

# NOTE: The next line is critical for boot!
none               /proc           proc  defaults       0 0

#none               /dev/shm        tmpfs defaults       0 0
shm                     /dev/shm        tmpfs           nodev,nosuid,noexec     0 0

#/dev/sdb          /data/mix4/raid1  xfs noatime        0 2
#/dev/sdc          /data/mix4/raid2  xfs noatime        0 2

efigix, etc...

# <fs>                  <mountpoint>    <type>          <opts>          <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/sda1          /boot       ext3      noauto,noatime 1 2
/dev/sda2          none        swap      sw             0 0
/dev/sda3          /var        reiserfs  noatime        0 2
/dev/sda5          /           reiserfs  noatime        0 1
/dev/sda6          /home       reiserfs       noatime        0 2
/dev/cdroms/cdrom0      /mnt/cdrom      iso9660         noauto,ro       0 0
/dev/fd0                /mnt/floppy     auto            noauto          0 0

# NOTE: The next line is critical for boot!
proc                    /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)
shm                     /dev/shm        tmpfs           nodev,nosuid,noexec     0 0

#/dev/sdb          /data/mix8/raid  xfs noatime        0 2

# vi /etc/conf.d/hostname
HOSTNAME="efigix.iap.fr"

# vi /etc/conf.d/domainname   #### OBSOLETE #### now in /etc/conf.d/net
OVERRIDE=0
DNSDOMAIN="iap.fr"
NISDOMAIN="clic.iap.fr"
# rc-update add domainname default   #### OBSOLETE #### now in /etc/conf.d/net

# vi /etc/conf.d/net

dns_domain="iap.fr"
nis_domain="clic.iap.fr"
nis_servers="clix.clic.iap.fr"

config_eth0=( "194.57.221.48 netmask 255.255.255.192 broadcast 194.57.221.63" )

# the -N option to prevent dhcpcd from overwriting your /etc/ntp.conf file
# the -Y option Prevents dhcpcd from replacing existing /etc/yp.conf file
# -R     Prevents dhcpcd from replacing existing /etc/resolv.conf file.
# -G Prevents dhcpcd from installing default routes provided by DHCP server.
config_eth1=( "dhcp" )
dhcpcd_eth1="-N -Y -R -G"

# for ganglia packets: do command `route add -host 239.2.11.71 dev eth1`
routes_eth1=( " -host 239.2.11.71" )
#                 e=$( ip route append dev ${iface} ${x} 2>&1 )

# Here's how todo routing if you need it - the below sets the default gateway
routes_eth0=( "default via 194.57.221.1" )


# rc-update add net.eth0 default
# cd /etc/init.d
# ln -s net.eth0 net.eth1
# vi /etc/hosts
127.0.0.1       localhost efigix
# gives problem with local rcp, as only mix.clic.iap.fr is authorized
#194.57.221.50 mix2.iap.fr mix2

# passwd
# echo "tts/0" >> /etc/securetty

# vi /etc/rc.conf
EDITOR="/usr/bin/vim"
DISPLAYMANAGER="gdm"
XSESSION="Gnome"
# vi /etc/conf.d/keymaps
SET_WINDOWKEYS="yes"
# vi /etc/conf.d/clock
CLOCK="local"
CLOCK_SYSTOHC="yes"
# vi /etc/conf.d/bootmisc
WIPE_TMP="yes"
# rc-update add bootmisc default

LOST CODE: no stage1 anymore !!!

# cd /usr/portage
# scripts/bootstrap.sh
# source /etc/profile
# emerge -eva system
# emerge -va vim pciutils tcsh


* Installing Necessary System Tools

# emerge -va syslog-ng vixie-cron slocate
# rc-update add syslog-ng default
# rc-update add vixie-cron default

Mandatory for boot time fsck:

# emerge -va reiserfsprogs xfsprogs

emerge -va dhcpcd


* Configuring the Bootloader

# emerge -va grub

-  edit grub.conf:
# vi /boot/grub/grub.conf
# Boot automatically after 30 secs.
timeout 30

# By default, boot the first entry.
default 0

# Fallback to the second entry.
fallback 1

# Nice, fat splash-image to spice things up :)
splashimage=(hd0,0)/grub/splash.xpm.gz

title Gentoo Linux 2.6.16-gentoo-r9
# Partition where the kernel image (or operating system) is located
root (hd0,0)
kernel /kernel-2.6.16-gentoo-r9/ root=/dev/sda5
# grep -v rootfs /proc/mounts > /etc/mtab
# grub-install /dev/sda
# (why do that ??) nano -w /boot/boot/grub/device.map  : get rid of fd0
# (not necessary ?) grub-install --root-directory=/boot /dev/sda
Or, if grub-install does not work:
# grub
 grub> root (hd0,0)
 grub> setup (hd0)
 grub> quit

(remove this ?) Might be needed for udev:

kernel /kernel-2.6.3-gentoo-r2 root=/dev/sda5 udev devfs=nomount gentoo=nodevfs


* Finalizing your Gentoo Installation

# rc-update add sshd default
# exit
# cd /
# umount /mnt/gentoo/boot /mnt/gentoo/proc /mnt/gentoo/dev /mnt/gentoo/var /mnt/gentoo/home /mnt/gentoo
# reboot

-  remove the cdrom

-  complete and update packages

package only for clix: net-dns/bind net-misc/dhcp sys-cluster/lspbs sys-cluster/maui

remove postfix at first

mod_php ???

packages to emerge first: mysql apache2 phpmyadmin proftpd ntpd gpm logrotate cupsd postfix lm_sensors mcelog vim

# scp root@cosmix2:/etc/portage/package.keywords /etc/portage/package.keywords
# scp root@mix4:~/world.edited .               or
# scp root@cosmix2:/var/lib/portage/world .
# cat /var/lib/portage/world ~/world.edited | sort | uniq > /var/lib/portage/world
# cd /usr/portage/profiles/default-linux/amd64/
# ln -s ../../*.desc .
# emerge -uva `cat /var/lib/portage/world` gnome

-  go take a coffee... (compiles XFree, kde, etc...)

-  complete services

# vi /etc/X11/gdm/gdm.conf
DefaultWelcome=false
Welcome=Welcome to %n
# vi /usr/X11R6/bin/startx         (remove -nolisten tcp)


-  Copy from existing system:

  • copy static version of rsync on the new system (Boot-CD gentoo):
    # wget -O rsync ftp://clix/pub/cluster/bin/rsync.opteron
    # chmod 755 rsync
  • partionning of the disk
  • mount them
  • make sure /boot is mounted on the remote machine

# cd /mnt/gentoo
# cat > excluded.txt
/data/efigix/raid
/home/nis
/mnt
/proc
/sys
/tmp
/dbdisk
# ~/rsync -av -e ssh --exclude-from=excluded.txt root@efigix:/ ./
# cd var/log
# rm -f Xorg.0.log Xorg.0.log.old apache2/* dmesg gdm/* faillog lastlog mcelog messages* mysql/* scrollkeeper.log*  tdm_aen_* wtmp* xferlog cups/error_log

# cd /mnt/gentoo
# mkdir data mnt sys tmp
# chmod 1777 tmp
# cd mnt/
# touch .keep
# mkdir cdrom data floppy
# chmod 700 cdrom floppy

# cd /mnt/gentoo/etc
# vi ./exports ./profile.env ./env.d/01hostname ./fstab ./csh.env hosts ./conf.d/net ./postfix/main.cf conf.d/hostname ./conf.d/local.start ./apache2/httpd.conf
# rm -f raidtab

cosmix3:

# vim ./yp.conf ./hosts.equiv ./conf.d/domainname ./resolv.conf

# cd ssh
# rm -f ssh_host_*

# mount -o bind /dev /mnt/gentoo/dev
# chroot /mnt/gentoo/ bash
# env-update
# source /etc/profile
# rc-update delete mdadm
# grub
 root (hd0,0)
 setup (hd0)
 quit
Si échec, cf. this article for direct grub commands:
embed /boot/grub/efs2_stage1_5 (hd0)
 install --stage2=/boot/grub/stage2 /boot/grub/stage1 d (hd0) (hd0)1+16 p (hd0,0)/boot/grub/stage2 /boot/grub/menu.lst
# newaliases
# cd /etc/
# perl -i -p -e 's/efigix/mix9/g' ./config-archive/etc/conf.d/hostname ./config-archive/etc/apache2/httpd.conf ./config-archive/etc/apache2/modules.d/41_mod_ssl.default-vhost.conf ./profile.csh ./printcap ./apache2/httpd.conf ./apache2/modules.d/41_mod_ssl.default-vhost.conf
# cd /data
# change symlinks & rep
# exit
# cd /
# umount /mnt/gentoo/boot /mnt/gentoo/proc /mnt/gentoo/var /mnt/gentoo/home /mnt/gentoo
# reboot

-  mise à jour arborescence /data sur tous les noeuds
-  update /etc/hosts.equiv
-  update autofs, nfs
-  update /etc/sensors.conf


pix* replication

# echo -e "o\nn\np\n1\n1\n+2048M\nn\np\n2\n\n\nt\n1\n82\na\n2\nw\n" | fdisk /dev/hda
# mkreiserfs /dev/hda2 -l "/"
# mkswap /dev/hda1
# swapon /dev/hda1
# mount /dev/hda2 /mnt/gentoo/
# mkdir /mnt/gentoo/proc
# mount -t proc none /mnt/gentoo/proc
# wget -O rsync ftp://clix/pub/cluster/bin/rsync.x86
# chmod 755 rsync

# cd /mnt/gentoo
# cat > excluded.txt
/data/pix8/raid
/data/pix8/raid2
/home/nis
/mnt
/proc
/sys
# ~/rsync -av -e ssh --exclude-from=excluded.txt root@pix8:/ ./
# cd var/log
# rm -f Xorg.0.log Xorg.0.log.old apache2/* bttrack.log dmesg gdm/* lastlog  messages* mysql/* scrollkeeper.log* tdm_aen_* wtmp* xferlog ntp.log cups/* 3w-aenlog.txt
# cd -
# mkdir mnt sys
# cd mnt/
# touch .keep
# mkdir cdrom data floppy
# chmod 700 cdrom floppy
# cd ../data
########### correct according to the host
# cd etc
# rm -f printcap mtab ssh/ssh_host_*
# for file in ./hostname ./exports ./profile.env ./env.d/01hostname ./fstab ./csh.env ./hosts ./postfix/main.cf; do sed -e 's/pix8/pix9/' $file > /tmp/toto; mv -v /tmp/toto $file; done
#### check fstab

# mount -o bind /dev /mnt/gentoo/dev
# chroot /mnt/gentoo/ bash
# env-update
# source /etc/profile
# grub
 root (hd0,1)     #### 1 if /boot is on hda1 !!
 setup (hd0)
 quit

# vi /etc/conf.d/local.start

# exit
# cd /
# umount /mnt/gentoo/proc /mnt/gentoo
# reboot


Site Map  -   -  Contact
© Terapix 2003-2011