Votre navigateur est obsolète. Téléchargez un navigateur moderne, par exemple FireFox.
Léa-Linux : Forum
Le forum de Léa abrite des discussions autour des Logiciels libres.
Syndication
  • RSS ForumForum complet
  • RSS Forum - Gentoo, Sourcemage...Forum - Gentoo, Sourcemage...
  • RSS Forum - Gentoo, Sourcemage... - 161679Cette discussion

Forum dédié aux questions sur les distributions basées sur les sources

Important : quand vous posez une question, n'oubliez pas de nous donner les indications suffisantes pour que nous puissions répondre. En effet, la divination n'est pas le fort du Linuxien averti. Pour une meilleure compréhension, le bon usage de la grammaire et de l'orthographe est fortement encouragé. En particulier, le langage SMS est à éviter absolument. En cas d'abus, il pourra être censuré sans autre forme de procès.
Les messages dont le contenu est illégal (incitant à la haine - raciale ou autre, diffamant), ou dont le contenu est sans rapport avec le sujet du forum, ou qui sont parfaitement stupides ou hors sujet seront supprimés sans pitié. Il pourra même être fait appel au fournisseur d'accès du coupable pour faire cesser ses agissements.
» Index du forum » Gentoo, Sourcemage... » Installer Gentoo sans se fatiguer
Aller à la discussion: PrécédentSuivante
Action: Nouveau sujetChercherS'authentifier
Installer Gentoo sans se fatiguer
Auteur: Neuromancien (IP enregistrée)
Date: le 18 février 2004 à 15:10

J'ai écrit le script suivant, qui reprend toutes les étapes de l'installation de Gentoo (installation GRP à partir d'une autre distribution installée). Dites moi ce que vous en pensez. Je suis en train de le tester.

echo "Gentoo-Installer version 0.1"
echo "02/2004"
echo "Installation de Gentoo (GRP)"
mount /mnt/cdrom
echo -n "Partition racine [hda1] : "
read root_partition
if [ -z "$root_partition" ]
then
root_partition=hda1
fi
echo -n "Voulez vous formater /dev/$root_partition (o/n) ?"
read choice
if [ $choice = o ]
then
mke2fs -j /dev/$root_partition
fi
mkdir /mnt/gentoo
mount /dev/$root_partition /mnt/gentoo

echo -n "Partition /boot [Aucune] : "
read boot_partition
if [ -n "$boot_partition" ]
then
mke2fs -j /dev/$boot_partition
mkdir /mnt/gentoo/boot
mount /dev/$root_partition /mnt/gentoo/boot
fi

echo -n "Partition /usr [Aucune] : "
read usr_partition
if [ -n "$usr_partition" ]
then
mkreiserfs /dev/$usr_partition
mkdir /mnt/gentoo/usr
mount /dev/$usr_partition /mnt/gentoo/usr
fi

echo -n "Partition /var [Aucune] : "
read var_partition
if [ -n "$var_partition" ]
then
mkreiserfs /dev/$var_partition
mkdir /mnt/gentoo/var
mount /dev/$var_partition /mnt/gentoo/var
fi

echo -n "Partition /home [Aucune] : "
read home_partition
if [ -n "$home_partition" ]
then

echo -n "Voulez vous formater /dev/$home_partition (o/n) ?"
read choice
if [ $choice = o ]
then
mkreiserfs /dev/$home_partition
fi
mkdir /mnt/gentoo/home
mount /dev/$home_partition /mnt/gentoo/home
fi

echo -n "Partition SWAP : "
read swap_partition

cd /mnt/gentoo
tar -xvjpf /mnt/cdrom/stages/stage3-*.tar.bz2
tar -xvjf /mnt/cdrom/snapshots/portage-*.tar.bz2 -C /mnt/gentoo/usr

cp -R /mnt/cdrom/distfiles /mnt/gentoo/usr/portage/distfiles
cp -a /mnt/cdrom/packages /mnt/gentoo/usr/portage/packages

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

ln -sf /usr/share/zoneinfo/Europe/Paris /etc/localtime

echo "# /etc/fstab: information des systèmes de fichiers." > /etc/fstab
echo "#" >> /etc/fstab
echo "# noatime désactive atimes afin d'améliorer les performances (atimes n'est généralement" >> /etc/fstab
echo "# pas nécessaire ; notail améliore les performances de ReiserFS (avec une légère perte" >> /etc/fstab
echo "# d'efficacité de stockage). Vous pouvez supprimer l'option noatime si vous voulez et" >> /etc/fstab
echo "# utiliser notail ou tail sans contraintes." >> /etc/fstab
echo "" >> /etc/fstab
echo "# <fs> <mount point> <type> <opts> <dump/pass>" >> /etc/fstab
echo "" >> /etc/fstab
echo "# NOTE: Si votre partition BOOT est en ReiserFS, ajoutez l'option notail à opts." >> /etc/fstab
echo "" >> /etc/fstab

if [ -n "$boot_partition" ]
then
echo "/dev/$boot_partition /boot ext3 noauto,noatime 1 2" >> /etc/fstab
fi

echo "/dev/$root_partition / ext3 noauto,noatime 0 1" >> /etc/fstab

echo "/dev/$swap_partition none swap sw 0 0" >> /etc/fstab

if [ -n "$usr_partition" ]
then
echo "/dev/$usr_partition /usr reiserfs noauto,noatime 0 0" >> /etc/fstab
fi

if [ -n "$var_partition" ]
then
echo "/dev/$var_partition /var reiserfs noauto,noatime 0 0" >> /etc/fstab
fi

if [ -n "$home_partition" ]
then
echo "/dev/$home_partition /home reiserfs noauto,noatime 0 0" >> /etc/fstab
fi

echo "/dev/scd0 /mnt/cdrom iso9660 noauto,ro,user 0 0" >> /etc/fstab

echo "/dev/scd1 /mnt/cdwriter iso9660 noauto,ro,user 0 0" >> /etc/fstab

echo "none /proc proc defaults 0 0" >> /etc/fstab

cd /usr/portage/packages/All
echo "Installation et configuration du kernel"
emerge -k gentoo-sources*
emerge -k genkernel*
genkernel

emerge -k hotplug
rc-update add hotplug default

echo -n "Voulez vous installer les drivers NVIDIA (o/n) ?"
read choice
if [ $choice = o ]
then
cd /usr/portage/distfiles
emerge -k NVIDIA_kernel*
cd /usr/portage/packages/All
fi

emerge -k sysklogd
rc-update add sysklogd default

emerge -k vcron
rc-update add vcron default

echo -n "Voulez vous installer rp-pppoe (o/n) ?"
read choice
if [ $choice = o ]
then
emerge -k rp-pppoe*
fi

echo -n "Voulez vous installer le support pour les systèmes de fichier XFS (o/n) ?"
read choice
if [ $choice = o ]
then
emerge -k xfsprogs*
fi

echo -n "Voulez vous installer le support pour les systèmes de fichier ReiserFS (o/n) ?"
read choice
if [ $choice = o ]
then
emerge -k reiserfsprogs*
fi

echo -n "Voulez vous installer le support pour les systèmes de fichier JFS (o/n) ?"
read choice
if [ $choice = o ]
then
emerge -k jfsutils*
fi

echo -n "Voulez vous installer le support pour les systèmes de fichier LVM (o/n) ?"
read choice
if [ $choice = o ]
then
emerge -k lvm-user*
fi

echo -n "Voulez vous installer le support PCMCIA (o/n) ?"
read choice
if [ $choice = o ]
then
emerge -k pcmcia-cs*gz
rc-update add pcmcia boot
fi

echo "Choix du mot de passe root"
passwd
echo -n "Voulez vous ajouter un utilisateur (o/n) ?"
read choice
if [ $choice = o ]
then
echo -n "Nom d'utilisateur : "
read username
useradd $username -m -G users,wheel,audio -s /bin/bash
passwd $username
fi

echo gentoo > /etc/hostname
echo "127.0.0.1 localhost" > /etc/hosts

nano etc/modules.autoload.d/kernel-2.4

echo -n "Voulez vous configurer une carte réseau Ethernet (o/n) ?"
read choice
if [ $choice = o ]
then
nano -w /etc/conf.d/net
rc-update add net.eth0 default
fi

nano -w /etc/rc.conf

emerge -k xfree*

etc-update
exit
cd /
umount /mnt/gentoo/boot
umount /mnt/gentoo/proc
umount /mnt/gentoo

echo -n "Voulez vous redémarrer le système (o/n) ?"
read choice
if [ $choice = o ]
then
reboot
fi



--
[www.gentoo.fr]

Re: Installer Gentoo sans se fatiguer
Auteur: Neuromancien (IP enregistrée)
Date: le 18 février 2004 à 15:34

Le script reste bloqué dans le "chroot" et ce qui est écrit après ne s'exécute qui si je quitte le "chroot". Comment faire ?



--
[www.gentoo.fr]

Re: Installer Gentoo sans se fatiguer
Auteur: lebarjoe (IP enregistrée)
Date: le 23 février 2004 à 14:40

Hello,

Je pense avoir la solution mais je n'es pas testé.

A la place de : chroot /mnt/gentoo /bin/bash

Tu mets : chroot /mnt/gentoo /bin/bash <<EOF
.....toutes les commandes......
echo -n "Voulez vous redémarrer le système (o/n) ?"
read choice
if [ $choice = o ]
then
reboot
fi
EOF

Voilà, essaye et tiens moi au courant, ça m'interresse aussi.
En tout cas je n'ai pas encore réussi à installer ma gentoo sur mon Shuttle SN41G2. Problème de compilation du noyau 2.6.3 en partant de stage 1.

Bon courage.



Nom du forum : (antispam) - (en développement:saisir un texte pour le message, rempli cette zone automatiquement)
Votre nom: 
Votre email: 
Sujet: 

 
Ce forum est boosté par Phorum.