SlideShare ist ein Scribd-Unternehmen logo
1 von 14
Linux LPIC2 noelmace.com
Noël Macé
Formateur et Consultant indépendant expert Unix et FOSS
http://www.noelmace.com
Personnalisation du démarrage
système
Démarrage du système
Licence Creative Commons
Ce(tte) œuvre est mise à disposition selon les termes de la
Licence Creative Commons Attribution - Pas d’Utilisation Commerciale - Partage dans les Mêmes Conditions 3.0 France.
Linux LPIC2 noelmace.com
Plan
• Rappels LPIC1
 procédure de démarrage
 runlevels
 chkconfig
 update-rc.d
 afficher et changer de runlevel
 inittab
• inittab : actions
 au démarrage
 à l'entrée dans un runlevel
 relatives à l'alimentation
 diverses
Linux LPIC2 noelmace.com
Rappel LPIC1 : procédure de démarrage
Linux LPIC2 noelmace.com
Rappel LPIC1 : Runlevels
Run Level Debian Suse RedHat
N amorçage
0 ARRET
S mono-utilisateur au démarrage
1 mono-utilisateur commuté mono-utilisateur
2 multi-utilisateur
Multi-utilisateur
déconnecté
…
3 …
mode connecté
(réseau)
multi-utilisateur
en mode
console
4 … … …
5 … mode-graphique (X11)
6 redémarrage
8 …
9 …
Linux LPIC2 noelmace.com
chkconfig
• Lister les associations services / runlevel
• modifier le comportement d'un service pour un ou plusieurs
runlevels
• ajouter un service
# chkconfig --list [service]# chkconfig --list [service]
# chkconfig --level [0123456] service [on/off/reset]# chkconfig --level [0123456] service [on/off/reset]
# chkconfig --add service# chkconfig --add service
Linux LPIC2 noelmace.com
update-rc.d
• désactiver un service
• modifier le comportement d'un service pour un ou plusieurs
runlevels
• ajouter un service
# update-rc.d NomService remove# update-rc.d NomService remove
# update-rc.d NomService start XX 2 3 4 5 . stop XX 0 1 6 .# update-rc.d NomService start XX 2 3 4 5 . stop XX 0 1 6 .
# update-rc.d NomService defaults# update-rc.d NomService defaults
Linux LPIC2 noelmace.com
Afficher et changer de runlevel
• afficher le runlevel actuel
• changer de runlevel
• Eteindre ou redémarrer
$ runlevel$ runlevel
# init [0123456Qq]# init [0123456Qq]
# shutdown [-rhc] time ["Warning Message"]# shutdown [-rhc] time ["Warning Message"]
# telinit [0123456Qq]# telinit [0123456Qq]
# halt / # reboot / # poweroff# halt / # reboot / # poweroff
Linux LPIC2 noelmace.com
Rappel : inittab
• /etc/inittab
• configuration de init
• id:runlevels:action:process
Linux LPIC2 noelmace.com
inittab : actions au démarrage
• sysinit
• boot
• bootwait
• initdefault
Linux LPIC2 noelmace.com
inittab : actions à l'entrée dans un runlevel
• once
• ondemand
Linux LPIC2 noelmace.com
inittab : actions relatives à l'alimentation
• powerwait
• powerfail
• powerokwait
• powerfailnow
Linux LPIC2 noelmace.com
inittab : actions diverses
• off
• ctrlaltdel
• kdbrequest
Linux LPIC2 noelmace.com
Ce qu’on a couvert
• Rappels : procédures de démarrage et runlevels
• Les actions de inittab.
Weight : 4
Description : Candidates should be able to query and modify the behaviour of system services at various run levels. A thorough understanding of the
init structure and boot process is required. This objective includes interacting with run levels.
Key Knowledge Areas:
• Linux Standard Base Specification (LSB)
The following is a partial list of the used files, terms and utilities:
 /etc/inittab
 /etc/init.d/
 /etc/rc.d/
 chkconfig
 update-rc.d
202.1 Customising system startup and boot processes
Linux LPIC2 noelmace.com
Licence
Ce(tte) œuvre (y compris ses illustrations, sauf mention explicite) est mise à disposition selon les termes de la
Licence Creative Commons Attribution - Pas d’Utilisation Commerciale - Partage dans les Mêmes Conditions 3.0 France.
Pour voir une copie de cette licence, visitez http://creativecommons.org/licenses/by-nc-sa/3.0/fr/ ou écrivez à :
Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
Vous êtes libre de :
 partager — reproduire, distribuer et communiquer cette œuvre
 remixer — adapter l’œuvre
Selon les conditions suivantes :
 Attribution — Vous devez clairement indiquer que ce document, ou tout document dérivé de celui, est (issu de) l’œuvre
originale de Noël Macé (noelmace.com) (sans suggérer qu'il vous approuve, vous ou votre utilisation de l’œuvre, à moins
d'en demander expressément la permission).
 Pas d’Utilisation Commerciale — Vous n’avez pas le droit d’utiliser cette œuvre à des fins commerciales (ie. l'intention
première ou l'objectif d'obtenir un avantage commercial ou une compensation financière privée). Pour obtenir ce droit, une
autorisation explicite de l'auteur est requise.
 Partage dans les Mêmes Conditions — Si vous modifiez, transformez ou adaptez cette œuvre, vous n’avez le droit de
distribuer votre création que sous une licence identique ou similaire à celle-ci.
Pour toute demande de collaboration, d'utilisation commerciale ou de publication de ce support ou d'un dérivé de celui-ci sous une
licence incompatible, contacter l'auteur via les contacts indiqués sur le site http://www.noelmace.com. Vous êtes par ailleurs
vivement encouragé (sans obligation légale) à communiquer avec celui-ci si vous réalisez une œuvre dérivée ou toute amélioration
de ce support.

Weitere ähnliche Inhalte

Mehr von Noël

LPIC1 10 02 temps
LPIC1 10 02 tempsLPIC1 10 02 temps
LPIC1 10 02 tempsNoël
 
LPIC1 10 01 logs
LPIC1 10 01 logsLPIC1 10 01 logs
LPIC1 10 01 logsNoël
 
LPIC1 09 06 kill
LPIC1 09 06 killLPIC1 09 06 kill
LPIC1 09 06 killNoël
 
LPIC1 09 05 priorités
LPIC1 09 05 prioritésLPIC1 09 05 priorités
LPIC1 09 05 prioritésNoël
 
LPIC1 09 04 bg fg
LPIC1 09 04 bg fgLPIC1 09 04 bg fg
LPIC1 09 04 bg fgNoël
 
LPIC1 09 03 top
LPIC1 09 03 topLPIC1 09 03 top
LPIC1 09 03 topNoël
 
LPIC1 09 02 ps
LPIC1 09 02 psLPIC1 09 02 ps
LPIC1 09 02 psNoël
 
LPIC1 09 01 intro
LPIC1 09 01 introLPIC1 09 01 intro
LPIC1 09 01 introNoël
 
LPIC1 08 05 runlevels
LPIC1 08 05 runlevelsLPIC1 08 05 runlevels
LPIC1 08 05 runlevelsNoël
 
LPIC1 08 03 grub2
LPIC1 08 03 grub2LPIC1 08 03 grub2
LPIC1 08 03 grub2Noël
 
LPIC1 08 02 grub legacy
LPIC1 08 02 grub legacyLPIC1 08 02 grub legacy
LPIC1 08 02 grub legacyNoël
 
LPIC1 08 01 démarrage
LPIC1 08 01 démarrageLPIC1 08 01 démarrage
LPIC1 08 01 démarrageNoël
 
LPIC1 07 14 mount
LPIC1 07 14 mountLPIC1 07 14 mount
LPIC1 07 14 mountNoël
 
LPIC1 07 13 fsck
LPIC1 07 13 fsckLPIC1 07 13 fsck
LPIC1 07 13 fsckNoël
 
LPIC1 07 18 debugfs
LPIC1 07 18 debugfsLPIC1 07 18 debugfs
LPIC1 07 18 debugfsNoël
 
LPIC1 07 17 tune2fs
LPIC1 07 17 tune2fsLPIC1 07 17 tune2fs
LPIC1 07 17 tune2fsNoël
 
LPIC1 07 16 dumpe2fs
LPIC1 07 16 dumpe2fsLPIC1 07 16 dumpe2fs
LPIC1 07 16 dumpe2fsNoël
 
LPIC1 07 12 formatage
LPIC1 07 12 formatageLPIC1 07 12 formatage
LPIC1 07 12 formatageNoël
 
LPIC1 07 11 introduction aux systèmes de fichiers
LPIC1 07 11 introduction aux systèmes de fichiersLPIC1 07 11 introduction aux systèmes de fichiers
LPIC1 07 11 introduction aux systèmes de fichiersNoël
 
LPIC1 07 10 GNU parted
LPIC1 07 10 GNU partedLPIC1 07 10 GNU parted
LPIC1 07 10 GNU partedNoël
 

Mehr von Noël (20)

LPIC1 10 02 temps
LPIC1 10 02 tempsLPIC1 10 02 temps
LPIC1 10 02 temps
 
LPIC1 10 01 logs
LPIC1 10 01 logsLPIC1 10 01 logs
LPIC1 10 01 logs
 
LPIC1 09 06 kill
LPIC1 09 06 killLPIC1 09 06 kill
LPIC1 09 06 kill
 
LPIC1 09 05 priorités
LPIC1 09 05 prioritésLPIC1 09 05 priorités
LPIC1 09 05 priorités
 
LPIC1 09 04 bg fg
LPIC1 09 04 bg fgLPIC1 09 04 bg fg
LPIC1 09 04 bg fg
 
LPIC1 09 03 top
LPIC1 09 03 topLPIC1 09 03 top
LPIC1 09 03 top
 
LPIC1 09 02 ps
LPIC1 09 02 psLPIC1 09 02 ps
LPIC1 09 02 ps
 
LPIC1 09 01 intro
LPIC1 09 01 introLPIC1 09 01 intro
LPIC1 09 01 intro
 
LPIC1 08 05 runlevels
LPIC1 08 05 runlevelsLPIC1 08 05 runlevels
LPIC1 08 05 runlevels
 
LPIC1 08 03 grub2
LPIC1 08 03 grub2LPIC1 08 03 grub2
LPIC1 08 03 grub2
 
LPIC1 08 02 grub legacy
LPIC1 08 02 grub legacyLPIC1 08 02 grub legacy
LPIC1 08 02 grub legacy
 
LPIC1 08 01 démarrage
LPIC1 08 01 démarrageLPIC1 08 01 démarrage
LPIC1 08 01 démarrage
 
LPIC1 07 14 mount
LPIC1 07 14 mountLPIC1 07 14 mount
LPIC1 07 14 mount
 
LPIC1 07 13 fsck
LPIC1 07 13 fsckLPIC1 07 13 fsck
LPIC1 07 13 fsck
 
LPIC1 07 18 debugfs
LPIC1 07 18 debugfsLPIC1 07 18 debugfs
LPIC1 07 18 debugfs
 
LPIC1 07 17 tune2fs
LPIC1 07 17 tune2fsLPIC1 07 17 tune2fs
LPIC1 07 17 tune2fs
 
LPIC1 07 16 dumpe2fs
LPIC1 07 16 dumpe2fsLPIC1 07 16 dumpe2fs
LPIC1 07 16 dumpe2fs
 
LPIC1 07 12 formatage
LPIC1 07 12 formatageLPIC1 07 12 formatage
LPIC1 07 12 formatage
 
LPIC1 07 11 introduction aux systèmes de fichiers
LPIC1 07 11 introduction aux systèmes de fichiersLPIC1 07 11 introduction aux systèmes de fichiers
LPIC1 07 11 introduction aux systèmes de fichiers
 
LPIC1 07 10 GNU parted
LPIC1 07 10 GNU partedLPIC1 07 10 GNU parted
LPIC1 07 10 GNU parted
 

02 01 personnalisation du démarrage système et séquence de démarrage

  • 1. Linux LPIC2 noelmace.com Noël Macé Formateur et Consultant indépendant expert Unix et FOSS http://www.noelmace.com Personnalisation du démarrage système Démarrage du système Licence Creative Commons Ce(tte) œuvre est mise à disposition selon les termes de la Licence Creative Commons Attribution - Pas d’Utilisation Commerciale - Partage dans les Mêmes Conditions 3.0 France.
  • 2. Linux LPIC2 noelmace.com Plan • Rappels LPIC1  procédure de démarrage  runlevels  chkconfig  update-rc.d  afficher et changer de runlevel  inittab • inittab : actions  au démarrage  à l'entrée dans un runlevel  relatives à l'alimentation  diverses
  • 3. Linux LPIC2 noelmace.com Rappel LPIC1 : procédure de démarrage
  • 4. Linux LPIC2 noelmace.com Rappel LPIC1 : Runlevels Run Level Debian Suse RedHat N amorçage 0 ARRET S mono-utilisateur au démarrage 1 mono-utilisateur commuté mono-utilisateur 2 multi-utilisateur Multi-utilisateur déconnecté … 3 … mode connecté (réseau) multi-utilisateur en mode console 4 … … … 5 … mode-graphique (X11) 6 redémarrage 8 … 9 …
  • 5. Linux LPIC2 noelmace.com chkconfig • Lister les associations services / runlevel • modifier le comportement d'un service pour un ou plusieurs runlevels • ajouter un service # chkconfig --list [service]# chkconfig --list [service] # chkconfig --level [0123456] service [on/off/reset]# chkconfig --level [0123456] service [on/off/reset] # chkconfig --add service# chkconfig --add service
  • 6. Linux LPIC2 noelmace.com update-rc.d • désactiver un service • modifier le comportement d'un service pour un ou plusieurs runlevels • ajouter un service # update-rc.d NomService remove# update-rc.d NomService remove # update-rc.d NomService start XX 2 3 4 5 . stop XX 0 1 6 .# update-rc.d NomService start XX 2 3 4 5 . stop XX 0 1 6 . # update-rc.d NomService defaults# update-rc.d NomService defaults
  • 7. Linux LPIC2 noelmace.com Afficher et changer de runlevel • afficher le runlevel actuel • changer de runlevel • Eteindre ou redémarrer $ runlevel$ runlevel # init [0123456Qq]# init [0123456Qq] # shutdown [-rhc] time ["Warning Message"]# shutdown [-rhc] time ["Warning Message"] # telinit [0123456Qq]# telinit [0123456Qq] # halt / # reboot / # poweroff# halt / # reboot / # poweroff
  • 8. Linux LPIC2 noelmace.com Rappel : inittab • /etc/inittab • configuration de init • id:runlevels:action:process
  • 9. Linux LPIC2 noelmace.com inittab : actions au démarrage • sysinit • boot • bootwait • initdefault
  • 10. Linux LPIC2 noelmace.com inittab : actions à l'entrée dans un runlevel • once • ondemand
  • 11. Linux LPIC2 noelmace.com inittab : actions relatives à l'alimentation • powerwait • powerfail • powerokwait • powerfailnow
  • 12. Linux LPIC2 noelmace.com inittab : actions diverses • off • ctrlaltdel • kdbrequest
  • 13. Linux LPIC2 noelmace.com Ce qu’on a couvert • Rappels : procédures de démarrage et runlevels • Les actions de inittab. Weight : 4 Description : Candidates should be able to query and modify the behaviour of system services at various run levels. A thorough understanding of the init structure and boot process is required. This objective includes interacting with run levels. Key Knowledge Areas: • Linux Standard Base Specification (LSB) The following is a partial list of the used files, terms and utilities:  /etc/inittab  /etc/init.d/  /etc/rc.d/  chkconfig  update-rc.d 202.1 Customising system startup and boot processes
  • 14. Linux LPIC2 noelmace.com Licence Ce(tte) œuvre (y compris ses illustrations, sauf mention explicite) est mise à disposition selon les termes de la Licence Creative Commons Attribution - Pas d’Utilisation Commerciale - Partage dans les Mêmes Conditions 3.0 France. Pour voir une copie de cette licence, visitez http://creativecommons.org/licenses/by-nc-sa/3.0/fr/ ou écrivez à : Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA. Vous êtes libre de :  partager — reproduire, distribuer et communiquer cette œuvre  remixer — adapter l’œuvre Selon les conditions suivantes :  Attribution — Vous devez clairement indiquer que ce document, ou tout document dérivé de celui, est (issu de) l’œuvre originale de Noël Macé (noelmace.com) (sans suggérer qu'il vous approuve, vous ou votre utilisation de l’œuvre, à moins d'en demander expressément la permission).  Pas d’Utilisation Commerciale — Vous n’avez pas le droit d’utiliser cette œuvre à des fins commerciales (ie. l'intention première ou l'objectif d'obtenir un avantage commercial ou une compensation financière privée). Pour obtenir ce droit, une autorisation explicite de l'auteur est requise.  Partage dans les Mêmes Conditions — Si vous modifiez, transformez ou adaptez cette œuvre, vous n’avez le droit de distribuer votre création que sous une licence identique ou similaire à celle-ci. Pour toute demande de collaboration, d'utilisation commerciale ou de publication de ce support ou d'un dérivé de celui-ci sous une licence incompatible, contacter l'auteur via les contacts indiqués sur le site http://www.noelmace.com. Vous êtes par ailleurs vivement encouragé (sans obligation légale) à communiquer avec celui-ci si vous réalisez une œuvre dérivée ou toute amélioration de ce support.