Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 24/04/2016, à 21:16

volcky

[RESOLU] Kickstart Ubuntu 16.04 LTS

Hello,

Je tente en vain de créer un fichier kickstart pour la nouvelle version Ubuntu 16.04 LTS

Voici mon fichier :

###################################################################
##    .:: Script d'installation Poste Ubuntu 16.04 LTS::.                                            ##
###################################################################
#                                                                                                                                 #
##      .:: Script Kickstart crée par Florian PICARD ::.                                               ##
###################################################################
# Script Kickstart pour installation automatisée                                                          #
# de Ubuntu 16.04 LTS par le réseau (Net)                                                                #
#                                                                                                                                  #
# Options d'appel :                                                                                                      #
#  machine=nom_de_machine                                                                                   #
###################################################################

#System language
lang fr_FR

#Language modules to install
langsupport fr_FR

#System keyboard
keyboard fr_oss

#System mouse
mouse

#System timezone
timezone Europe/Paris

#Root password
rootpw --iscrypted monpasswdencrypted

#Initial user
user wsadmin --fullname "WS-Administrateur" --iscrypted --password monpasswdencrypted

#Reboot after installation
reboot --eject

#Use text mode install
text

#Install OS instead of upgrade
install

#Use Web installation
url --url [url]http://mirror.mondomain.fr/mirror/fr.archive.ubuntu.com/ubuntu/[/url]

#System bootloader configuration
bootloader --location=mbr 

#Clear the Master Boot Record
zerombr yes

#Partition clearing information
clearpart --all --initlabel 

#Disk partitioning information
#ignoredisk --only-use=sda
part / --fstype ext4 --size 50000 
part swap --size 2048 
part /home --fstype ext4 --size 1 --grow 

#System authorization infomation
auth  --useshadow  --enablemd5 

#Network information
network --bootproto=dhcp --device=eth0

#Firewall configuration
firewall --disabled 

#X Window System configuration information
xconfig --depth=32 --resolution=1024x768 --defaultdesktop=GNOME --startxonboot

#Package install information
%packages
ubuntu-desktop
ssh
#samba-client


%pre
# Lecture et mise en variables des paramètres d'installation 
# Demande le Hotname # 

# Switch TTY
exec < /dev/tty6 > /dev/tty6
chvt 6
clear

# Charge clavier FR (AZERTY) #
loadkeys fr

# Demande le Hotname #
echo "Veuillez saisir le Hostname ! "
read machine
echo "$machine" > /tmp/hostname_conf

# Affiche le résumé #

echo " "
echo " "
echo "-------------------------------------------------"
echo "              Résumé d'installation"
echo "-------------------------------------------------"
echo " "
echo " "
echo "-------------------------------------------------"
echo "    Nom de la machine     = $machine"
echo "    Nom de l'utilisateur  = WSAdministrateur "
echo "    Login                 = wsadmin"
echo "    Mot de passe          = ********"
echo "    Login Root            = root"
echo "    Mot de passe Root     = *********"
echo "    Distribution          = Ubuntu 16.04 LTS"
echo "-------------------------------------------------"
echo " "
echo " "
echo "-------------------------------------------------"
echo "    L'installation écrasera irrémédiablement"
echo "    toutes les données du disque !"
echo " "
echo "    Redémarrer la machine avant 30 secondes"
echo "    pour annuler l'installation !"
echo "--------------------------------------------------"
echo " "
echo " "

sleep 30
chvt 1

%post --nochroot

# Reprise de la définition des variables non renseignées car non conservées depuis /tmp/

machine=$(cat /tmp/hostname_conf)

# Modification des dépots

cat > /target/etc/apt/sources.list << eof

	########################################
	#                                                                            # 
	#      Dépots Ubuntu 16.04 LTS                             #
	#            (xenial )                                                   #
	#                                                                            #
	########################################


	### Dépôt Updates ###

	deb [url]http://mirror.mondomain.fr/mirror/fr.archive.ubuntu.com/ubuntu/[/url] xenial main
	deb [url]http://mirror.mondomain.fr/mirror/fr.archive.ubuntu.com/ubuntu/[/url] xenial restricted
	deb [url]http://mirror.mondomain.fr/mirror/fr.archive.ubuntu.com/ubuntu/[/url] xenial multiverse
	deb [url]http://mirror.mondomain.fr/mirror/fr.archive.ubuntu.com/ubuntu/[/url] xenial universe

	deb [url]http://mirror.mondomain.fr/mirror/fr.archive.ubuntu.com/ubuntu/[/url] xenial-updates main  
	deb [url]http://mirror.mondomain.fr/mirror/fr.archive.ubuntu.com/ubuntu/[/url] xenial-updates restricted
	deb [url]http://mirror.mondomain.fr/mirror/fr.archive.ubuntu.com/ubuntu/[/url] xenial-updates multiverse
	deb [url]http://mirror.mondomain.fr/mirror/fr.archive.ubuntu.com/ubuntu/[/url] xenial-updates universe

	### Dépôt Security ###
	deb [url]http://mirror.mondomain.fr/mirror/security.ubuntu.com/ubuntu[/url] xenial-security main 
	deb [url]http://mirror.mondomain.fr/mirror/security.ubuntu.com/ubuntu[/url] xenial-security restricted

	###  Dépôts Backports  ###
	deb [url]http://mirror.mondomain.fr/mirror/fr.archive.ubuntu.com/ubuntu/[/url] xenial-backports main  
	deb [url]http://mirror.mondomain.fr/mirror/fr.archive.ubuntu.com/ubuntu/[/url] xenial-backports restricted
	deb [url]http://mirror.mondomain.fr/mirror/fr.archive.ubuntu.com/ubuntu/[/url] xenial-backports universe
	deb [url]http://mirror.mondomain.fr/mirror/fr.archive.ubuntu.com/ubuntu/[/url] xenial-backports multiverse

	### Dépôt commercial  ###
	deb [url]http://mirror.mondomain.fr/mirror/archive.canonical.com/ubuntu[/url] xenial partner

eof

# Suppression des paquets non souhaités
chroot /target apt-get -y remove empathy-common
chroot /target apt-get -y remove gbrainy
chroot /target apt-get -y remove gnome-games-common
chroot /target apt-get -y remove gwibber-service
chroot /target apt-get -y remove pidgin
chroot /target apt-get -y remove pitivi
chroot /target apt-get -y remove transmission-common

# Renommage de la machine

sed -i "s/kickseed/$machine/g" /target/etc/hostname
sed -i "s/kickseed/$machine/g" /target/etc/hosts

# creation du script de fin de deploiement (OS)

cat > /target/usr/bin/home_deploy << eof
	#!/bin/bash
	wget -P /tmp [url]http://mirror.mondomain.fr/scripts/deploy.sh[/url]
	chmod +x /tmp/deploy.sh
	. /tmp/deploy.sh 2>&1 | tee /var/log/home_deploy.log
	sleep 5
	rm /tmp/deploy.sh
eof
chmod 777 /target/usr/bin/home_deploy

## END ##

Une fois l'installation terminée, l'OS est instable, je penses que j'ai omis certains packages ! quelqu'un aurais une idée ?
Ce meme fichier fonctionne parfaitement avec la version 14.04 LTS.

Je n'ai trouvée pour le moment aucune information à ce sujet.

Symptômes sur le nouvel OS :

- Polices manquantes.
- Ouverture impossible des applications locals (firefox, terminal, thunderbird etc..).
- Outils de recherche non fonctionnel.
- etc.

Merci pour votre aide.


Modération : merci à l'avenir d'utiliser les balises code (explications ici).

Dernière modification par volcky (Le 27/04/2016, à 09:22)

Hors ligne

#2 Le 24/04/2016, à 21:47

volcky

Re : [RESOLU] Kickstart Ubuntu 16.04 LTS

@Modération : Merci pour la correction et l'ajout de balises c'est effectivement plus claire ! wink

Hors ligne

#3 Le 25/04/2016, à 14:38

volcky

Re : [RESOLU] Kickstart Ubuntu 16.04 LTS

Hello,

J'ai fait de nouveaux tests, j'ai tenter de simplifier au maximum le fichier mais je rencontre les même symptômes.

mon fichier simplifié :

#System language
lang fr_FR
#Language modules to install
langsupport fr_FR
#System keyboard
keyboard fr
#System mouse
mouse
#System timezone
timezone Europe/Paris
#Root password
rootpw --iscrypted monpasswdencrypted
#Initial user
user csi --fullname "Centre de Service Informatique" --iscrypted --password monpasswdencrypted
#Reboot after installation
reboot
#Use text mode install
text
#Install OS instead of upgrade
install
#Use Web installation
url --url http://mirror.mondomain.fr/mirror/fr.archive.ubuntu.com/ubuntu/
#System bootloader configuration
bootloader --location=mbr 
#Clear the Master Boot Record
zerombr yes
#Partition clearing information
clearpart --all --initlabel 
#Disk partitioning information
part / --fstype ext4 --size 50000 
part swap --size 2048 
part /home --fstype ext4 --size 1 --grow 
#System authorization infomation
auth  --useshadow  --enablemd5 
#Firewall configuration
firewall --disabled 
#Do not configure the X Window System
skipx
#Package install information
%packages
@ ubuntu-desktop

PS : J'ai omis de préciser que lorsque je fait l'installation avec le disque officiel (mini.iso - http://archive.ubuntu.com/ubuntu/dists/ … s/netboot/), sans charger mon fichier kickstart (ks.cfg) : TOUT EST OK

Merci pour votre aide.

Hors ligne

#4 Le 25/04/2016, à 15:24

volcky

Re : [RESOLU] Kickstart Ubuntu 16.04 LTS

Hello,

cool big_smile big_smile   J'ai trouvé, le support du fr_FR est (me semble-t-il) incomplet, en attendant une autre solution, j'ai forcé en_US et tout fonctionne !!!     cool big_smile big_smile

Dernière modification par volcky (Le 25/04/2016, à 15:24)

Hors ligne

#5 Le 27/04/2016, à 09:20

volcky

Re : [RESOLU] Kickstart Ubuntu 16.04 LTS

[RESOLU]

il faut forcer :

#System language
lang fr_FR.UTF-8
#Language modules to install
langsupport fr_FR.UTF-8
#System keyboard
keyboard fr

Sinon la gestion de la langue FR est incomplète et toutes les applications et applets faisant appel à de l'UTF8 sont non-fonctionnelles.

Dernière modification par volcky (Le 27/04/2016, à 09:22)

Hors ligne

#6 Le 16/11/2016, à 19:29

volcky

Re : [RESOLU] Kickstart Ubuntu 16.04 LTS

voici deux petits tutos que j'ai réalisé sur la l'automatisation Kickstart Ubuntu :
14.04 LTS
16.04 LTS

Hors ligne