Vous êtes : Accueil / Tutoriaux / Installation d'une distribution Gentoo Linux
Rédigé le 05/04/2005 par Greg
http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/releases/1.4_rc4/x86/x86/livecd/gentoo-basic-x86-1.4_rc4.iso
# ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:FC:95:8B:6F
inet addr:192.168.0.143 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::250:fcff:fe95:8b6f/10 Scope:Link
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:91 errors:0 dropped:0 overruns:0 frame:0
TX packets:33 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:9537 (9.3 Kb) TX bytes:4609 (4.5 Kb)
Interrupt:11 Base address:0x7000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
# ping -c 3 www.yahoo.fr
# passwd root (rentrer une première fois votre mot de passe puis confirmer le)
# /etc/ini.d/sshd start
# fdisk /dev/hda (note: HDA si le disk est IDE ou SDA si le disk est SCSI)
Disk /dev/hda: 30.0 GB, 30005821440 bytes
240 heads, 63 sectors/track, 3876 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes
Device BootStart EndBlocks IdSystem
Command (m for help):
Device Boot Start End Blocks Id System
/dev/hda1 * 1 9 72261 83 Linux
/dev/hda2 10 72 506047+ 82 Linux swap
/dev/hda3 73 7476 59472630 83 Linux
# mke2fs /dev/hda1
# mkswap /dev/hda2
# mke2fs -j /dev/hda3
# swapon /dev/hda2
# mount /dev/hda3 /mnt/gentoo
# mkdir /mnt/gentoo/boot
# mount /dev/hda1 /mnt/gentoo/boot
# cd /mnt/gentoo
# wget http://gentoo.oregonstate.edu/releases/x86/1.4/stages/x86/stage3-x86-20030910.tar.bz2
# tar -xvjpf /mnt/gentoo/stage3-x86-****** (vertion de votre stage)
# mount -t proc proc /mnt/gentoo/proc
# cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
# chroot /mnt/gentoo /bin/bash
# env-update
# source /etc/profile
# nano -w /etc/make.conf
# emerge sync
# ln -sf /usr/share/zoneinfo/Europe/Paris /etc/localtime
# nano /etc/fstab
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/BOOT /boot ext2 noauto,noatime 1 1
/dev/ROOT / xfs noatime 0 0
/dev/SWAP none swap sw 0 0
/dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro 0 0
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/hda1 /boot ext2 noauto,noatime 1 1
/dev/hda3 / ext3 noatime 0 0
/dev/hda2 none swap sw 0 0
/dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro 0 0
# NOTE: The next line is critical for boot!
none /proc proc defaults 0 0
# emerge -k sys-kernel/gentoo-sources (choisissez votre noyaux http://www.gentoo.org/doc/fr/gentoo-kernel.xml)
# cd /usr/src/linux
# make menuconfig
quité en sauvant puis:
# wget http://www.via.ecp.fr/~alexis/formation-linux/config/config-2.4.x
# mv config-2.4.x .config
# make menuconfig
# make dep && make clean bzImage modules modules_install
# cp /usr/src/linux/arch/i386/boot/bzImage /boot
# cp /usr/src/linux/System.map /boot
# nano -w /etc/conf.d/net
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# $Header: /home/cvsroot/gentoo-src/livecd-ng/profiles/lw/aux-files/net,v 1.2 2003/03/06 01:22:47 livewire Exp $
# Global config file for net.* rc-scripts
# This is basically the ifconfig argument without the ifconfig $iface
#
#iface_eth0="192.168.0.1 broadcast 192.168.0.255 netmask 255.255.255.0"
#iface_eth1="207.170.82.202 broadcast 207.0.255.255 netmask 255.255.0.0"
# For DHCP set iface_eth? to "dhcp"
# For passing options to dhcpcd use dhcpcd_eth? # iface_eth0="dhcp"
#dhcpcd_eth0="..."
# For adding aliases to a interface
#
#alias_eth0="192.168.0.3 192.168.0.4"
# NB: The next is only used for aliases.
#
# To add a custom netmask/broadcast address to created aliases,
# uncomment and change accordingly. Leave commented to assign
# defaults for that interface.
#
#broadcast_eth0="192.168.0.255 192.168.0.255"
#netmask_eth0="255.255.255.0 255.255.255.0"
# For setting the default gateway
#
#gateway="eth0/192.168.0.1"
# rc-update add net.eth0 default
# emerge -k app-admin/syslog-ng
# rc-update add syslog-ng default
# passwd (rentrer une première fois votre mot de passe puis confirmer le)
# useradd votre_utilisateur -m -G users,wheel,audio -s /bin/bash
# passwd votre_utilisateur
# echo mamachine.mondomaine.com > /etc/hostname
# echo mondomaine.com > /etc/dnsdomainname
# nano -w /etc/rc.conf
# /etc/rc.conf: Global startup script configuration settings
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/rc.conf,v 1.20 2003/04/27 18:39:59 azarah Exp $
# Use KEYMAP to specify the default console keymap. There is a complete tree
# of keymaps in /usr/share/keymaps to choose from. This setting is used by the
# /etc/init.d/keymaps script.
KEYMAP="fr" (pour que le clavier soit en AZERTY)
KEYMAP="fr-latin0"
KEYMAP="fr-latin1"
# The map to load for extended keyboards. Most users should leave this as is.
EXTENDED_KEYMAP="windowkeys"
# CONSOLEFONT specifies the default font that you'd like Linux to use on the
# console. You can find a good selection of fonts in /usr/share/consolefonts;
# you shouldn't specify the trailing ".psf.gz", just the font name below.
# To use the default console font, comment out the CONSOLEFONT setting below.
# This setting is used by the /etc/init.d/consolefont script (NOTE: if you do
# not want to use it, run "rc-update del consolefont" as root).
CONSOLEFONT="default8x16" (font de la console)
CONSOLEDONT="lat0-16"
# CONSOLETRANSALTION is the charset map file to use. Leave commented to use
# the default one. Have a look in /usr/share/consoletrans for a selection of
# map files you can use.
#CONSOLETRANSLATION="8859-1_to_uni"
# Set CLOCK to "UTC" if your system clock is set to UTC (also known as
# Greenwich Mean Time). If your clock is set to the local time, then set CLOCK
# to "local". This setting is used by the /etc/init.d/clock script.
CLOCK="local" (pour que l'heure utilisée soit la meme que l'heure locale)
# Set EDITOR to your preferred editor.
EDITOR="/bin/nano" (utilse nano en editeur de texte par défaut)
#EDITOR="/usr/bin/vim"
#EDITOR="/usr/bin/emacs"
# Set PROTOCOLS to the protocols that you plan to use. Gentoo Linux will only
# enable module auto-loading for these protocols, eliminating annoying module
# not found errors.
#
# NOTE: Do NOT uncomment the next lines, but add them to 'PROTOCOLS=...' line!!
#
# Num Protocol
# 1: Unix
# 2: IPv4
# 3: Amateur Radio AX.25
# 4: IPX
# 5: DDP / appletalk
# 6: Amateur Radio NET/ROM
# 9: X.25
# 10: IPv6
# 11: ROSE / Amateur Radio X.25 PLP
# 19: Acorn Econet
# Most users want this:
PROTOCOLS="1 2"
#For IPv6 support:
#PROTOCOLS="1 2 10"
# What display manager do you use ? [ xdm | gdm | kdm | elogin | entrance ]
DISPLAYMANAGER="kdm"
# XSESSION is a new variable to control what window manager to start
# default with X if run with xdm, startx or xinit. The default behavior
# is to look in /etc/X11/Sessions/ and run the script in matching the
# value that XSESSION is set to. The support scripts is smart enouth to
# look in all bin directories if it cant find a match in /etc/X11/Sessions/,
# so setting it to "enligtenment" can also work. This is basically used
# as a way for the system admin to configure a default system wide WM,
# allthough it will work if the user export XSESSION in his .bash_profile, etc.
#
# NOTE: 1) this behaviour is overridden when a ~/.xinitrc exists, and startx
# is called.
# 2) even if a ~/.xsession exist, if XSESSION can be resolved, it will
# be executed rather than ~/.xsession, else KDM breaks ...
#
# Defaults depending on what you install currently include:
#
# Gnome - will start gnome-session
# kde-
# Xsession - will start a terminal and a few other nice apps
#XSESSION="Gnome"
# emerge -k grub
# grub
grub> root (hd0,0)
grub> setup (hd0)
grub> quit
nano -w /boot/grub/grub.conf
default 0
timeout 30
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
title=Mon exemple de Gentoo Linux
root (hd0,0)
kernel (hd0,0)/boot/bzImage root=/dev/hda3
# emerge -k lilo
# nano /etc/lilo.conf
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
lba32
default=linux
image=/boot/bzImage
label=linux
read-only
root=/dev/hda3
# /sbin/lilo
# etc-update
# exit
# cd /
# umount /mnt/gentoo/boot
# umount /mnt/gentoo/proc
# umount /mnt/gentoo
# reboot