Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| elearning:workbooks:centos:6:junior:l116 [2019/12/04 09:56] – admin | elearning:workbooks:centos:6:junior:l116 [2023/02/14 09:43] (Version actuelle) – admin | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| ~~PDF: | ~~PDF: | ||
| + | |||
| + | Version : **2021.01** | ||
| Dernière mise-à-jour : ~~LASTMOD~~ | Dernière mise-à-jour : ~~LASTMOD~~ | ||
| - | ======LRF115 | + | ======LCF210 |
| + | |||
| + | =====Contenu du Module===== | ||
| + | |||
| + | * **LCF210 - Gestion du Démarrage et de l' | ||
| + | * Contenu du Module | ||
| + | * Présentation | ||
| + | * BIOS, EFI et OpenFirmware | ||
| + | * Systèmes à base du BIOS | ||
| + | * Charger de Démarrage | ||
| + | * Systèmes à base de l' | ||
| + | * Autres Systèmes | ||
| + | * Gestionnaire d' | ||
| + | * LILO | ||
| + | * La Commande LILO | ||
| + | * Codes Erreur de LILO | ||
| + | * Grub Legacy sous RHEL/CentOS 6 | ||
| + | * Configurer GRUB Legacy | ||
| + | * La Section Globale | ||
| + | * Une Section spécifique à un OS | ||
| + | * Configurer l' | ||
| + | * Modifier la Configuration de GRUB Legacy en Ligne de Commande | ||
| + | * GRUB 2 sous RHEL/CentOS 7 | ||
| + | * Le fichier / | ||
| + | * Le fichier / | ||
| + | * Les fichiers du répertoire / | ||
| + | * Configurer l' | ||
| + | * RHEL/CentOS < 7.2 | ||
| + | * RHEL/CentOS >= 7.2 | ||
| + | * Modifier la Configuration de GRUB 2 en Ligne de Commande | ||
| + | * Chargeurs de Démarrages Alternatifs | ||
| + | * Systemd-boot | ||
| + | * U-boot | ||
| + | * Le Projet Syslinux | ||
| + | * SYSLINUX | ||
| + | * EXTLINUX | ||
| + | * ISOLINUX | ||
| + | * PXELINUX | ||
| + | * Isodhpfx | ||
| + | * Initramfs sous RHEL/CentOS 6 | ||
| + | * Examiner l' | ||
| + | * Le script init | ||
| + | * La Commande dracut | ||
| + | * Initramfs sous RHEL/CentOS 7 | ||
| + | * Examiner l' | ||
| + | * Le script init | ||
| + | * Consulter le contenu d'un fichier dans initramfs | ||
| + | * La Commande dracut | ||
| + | * Processus de Démarrage du Noyau Linux | ||
| + | * Processus Init | ||
| + | * Démarrer RHEL/CentOS 5 avec SysVinit | ||
| + | * Niveaux d' | ||
| + | * Inittab | ||
| + | * Scripts de Démarrage | ||
| + | * rc.sysinit sous RHEL/CentOS 5 | ||
| + | * Répertoire init.d | ||
| + | * Linux Standard Base | ||
| + | * Codes Retour Standardisés | ||
| + | * Scripts | ||
| + | * Répertoires rcx.d | ||
| + | * rc.local | ||
| + | * La Commande chkconfig | ||
| + | * Démarrer RHEL/CentOS 6 avec Upstart | ||
| + | * Inittab | ||
| + | * Initialisation du Système | ||
| + | * Runlevels | ||
| + | * [CTL]-[ALT]-[DEL] | ||
| + | * mingetty | ||
| + | * Gestion des Services | ||
| + | * La Commande initctl | ||
| + | * Jobs | ||
| + | * Événements | ||
| + | * Etats | ||
| + | * Démarrer et Arrêter les Jobs | ||
| + | * La Commande status | ||
| + | * La Commande start | ||
| + | * La Commande stop | ||
| + | * La Commande restart | ||
| + | * Démarrer RHEL/CentOS 7 | ||
| + | * La Commande systemctl | ||
| + | * Fichiers de Configuration | ||
| + | * La Commande systemd-analyze | ||
| + | * Gestion des Services | ||
| + | * Arrêt Système du Système | ||
| + | * La Commande shutdown | ||
| + | * La Commande reboot | ||
| + | * La Commande halt | ||
| + | * La Commande poweroff | ||
| + | |||
| + | =====Présentation===== | ||
| Le processus de démarrage de Linux peut être résumé en trois étapes majeurs : | Le processus de démarrage de Linux peut être résumé en trois étapes majeurs : | ||
| Ligne 73: | Ligne 164: | ||
| LILO (//LInux LOader//) est configuré par le fichier **/ | LILO (//LInux LOader//) est configuré par le fichier **/ | ||
| - | ===La commande | + | ===La Commande |
| La commande **lilo** peut prendre une de plusieurs options. Les options les plus importantes sont : | La commande **lilo** peut prendre une de plusieurs options. Les options les plus importantes sont : | ||
| Ligne 637: | Ligne 728: | ||
| <WRAP center round todo> | <WRAP center round todo> | ||
| - | **A faire** : Redémarrez votre VM. Appuyez sur la touche **e** au début du processus de démarrage. Constatez que GRUB 2 demande un nom d' | + | **A faire** : Redémarrez votre VM. Appuyez sur la touche **e** au début du processus de démarrage. Constatez que GRUB 2 demande un nom d' |
| </ | </ | ||
| + | |||
| + | Pour pouvoir protéger le démarrage du système, il convient d' | ||
| + | |||
| + | < | ||
| + | [root@centos7 ~]# cat / | ||
| + | ... | ||
| + | ### BEGIN / | ||
| + | menuentry ' | ||
| + | load_video | ||
| + | set gfxpayload=keep | ||
| + | insmod gzio | ||
| + | insmod part_msdos | ||
| + | insmod xfs | ||
| + | set root=' | ||
| + | if [ x$feature_platform_search_hint = xy ]; then | ||
| + | search --no-floppy --fs-uuid --set=root --hint-bios=hd0, | ||
| + | else | ||
| + | search --no-floppy --fs-uuid --set=root 2d947276-66e8-41f4-8475-b64b67d7a249 | ||
| + | fi | ||
| + | linux16 / | ||
| + | initrd16 / | ||
| + | } | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | [root@centos7 ~]# vi / | ||
| + | ... | ||
| + | ### BEGIN / | ||
| + | menuentry ' | ||
| + | load_video | ||
| + | set gfxpayload=keep | ||
| + | insmod gzio | ||
| + | insmod part_msdos | ||
| + | insmod xfs | ||
| + | set root=' | ||
| + | if [ x$feature_platform_search_hint = xy ]; then | ||
| + | search --no-floppy --fs-uuid --set=root --hint-bios=hd0, | ||
| + | else | ||
| + | search --no-floppy --fs-uuid --set=root 2d947276-66e8-41f4-8475-b64b67d7a249 | ||
| + | fi | ||
| + | linux16 / | ||
| + | initrd16 / | ||
| + | } | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | <WRAP center round todo> | ||
| + | **A faire** : Redémarrez votre VM. Constatez que GRUB 2 demande un nom d' | ||
| + | </ | ||
| + | |||
| ===Modifier la Configuration de GRUB 2 en Ligne de Commande=== | ===Modifier la Configuration de GRUB 2 en Ligne de Commande=== | ||
| Ligne 818: | Ligne 960: | ||
| </ | </ | ||
| - | ===La commande | + | ===La Commande |
| La commande **dracut** permet de créer facilement une image initramfs. Les options de la commande sont : | La commande **dracut** permet de créer facilement une image initramfs. Les options de la commande sont : | ||
| Ligne 935: | Ligne 1077: | ||
| ====Initramfs sous RHEL/CentOS 7==== | ====Initramfs sous RHEL/CentOS 7==== | ||
| - | Le fichier Initramfs //%%INITial Ram File System%%// est une archive au format cpio : | + | Le fichier Initramfs //%%INITial Ram File System%%// est une archive au format cpio compressé |
| < | < | ||
| [root@centos7 ~]# cp / | [root@centos7 ~]# cp / | ||
| + | [root@centos7 ~]# cd /tmp | ||
| + | [root@centos7 tmp]# ls | ||
| + | custom | ||
| + | [root@centos7 tmp]# mv custom custom.gz | ||
| + | [root@centos7 tmp]# gunzip custom.gz | ||
| [root@centos7 tmp]# mkdir initramfs | [root@centos7 tmp]# mkdir initramfs | ||
| [root@centos7 tmp]# cd initramfs | [root@centos7 tmp]# cd initramfs | ||
| [root@centos7 initramfs]# cpio -cid -I ../custom | [root@centos7 initramfs]# cpio -cid -I ../custom | ||
| - | 42 blocks | + | 113591 |
| [root@centos7 initramfs]# ls | [root@centos7 initramfs]# ls | ||
| - | early_cpio | + | bin dev etc init lib lib64 proc root run sbin shutdown |
| - | [root@centos7 initramfs]# ls -lR . | + | [root@centos7 initramfs]# ls -l |
| - | .: | + | |
| total 4 | total 4 | ||
| - | -rw-r--r--. 1 root root | + | lrwxrwxrwx. |
| - | drwxr-xr-x. | + | drwxr-xr-x. |
| - | + | drwxr-xr-x. | |
| - | ./kernel: | + | lrwxrwxrwx. 1 root root 23 Dec 4 11:00 init -> usr/lib/ |
| - | total 0 | + | lrwxrwxrwx. |
| - | drwxr-xr-x. | + | lrwxrwxrwx. |
| - | + | drwxr-xr-x. | |
| - | ./kernel/x86: | + | drwxr-xr-x. 2 root root 40 Dec 4 11:00 root |
| - | total 0 | + | drwxr-xr-x. |
| - | drwxr-xr-x. 2 root root 60 Jun 22 11:51 microcode | + | lrwxrwxrwx. 1 root root 8 Dec 4 11:00 sbin -> usr/sbin |
| - | + | -rwxr-xr-x. | |
| - | ./kernel/ | + | drwxr-xr-x. |
| - | total 20 | + | drwxr-xr-x. 2 root root 40 Dec 4 11:00 sysroot |
| - | -rw-r--r--. 1 root root 20480 Jun 22 11:51 GenuineIntel.bin | + | drwxr-xr-x. 2 root root 40 Dec 4 11:00 tmp |
| + | drwxr-xr-x. | ||
| + | drwxr-xr-x. 2 root root 80 Dec 4 11:00 var | ||
| </ | </ | ||
| Ligne 970: | Ligne 1118: | ||
| < | < | ||
| [root@centos7 initramfs]# cd .. | [root@centos7 initramfs]# cd .. | ||
| - | [root@centos7 tmp]# ls | ||
| - | custom | ||
| [root@centos7 tmp]# lsinitrd custom | more | [root@centos7 tmp]# lsinitrd custom | more | ||
| - | Image: custom: | + | Image: custom: |
| - | ======================================================================== | + | |
| - | Early CPIO image | + | |
| - | ======================================================================== | + | |
| - | drwxr-xr-x | + | |
| - | -rw-r--r-- | + | |
| - | drwxr-xr-x | + | |
| - | drwxr-xr-x | + | |
| - | drwxr-xr-x | + | |
| - | -rw-r--r-- | + | |
| ======================================================================== | ======================================================================== | ||
| - | Version: dracut-033-463.el7 | + | Version: dracut-033-502.el7_4.1 |
| - | Arguments: | + | Arguments: -f |
| dracut modules: | dracut modules: | ||
| Ligne 1009: | Ligne 1146: | ||
| shutdown | shutdown | ||
| ======================================================================== | ======================================================================== | ||
| - | drwxr-xr-x | + | drwxr-xr-x |
| - | crw-r--r-- | + | crw-r--r-- |
| - | crw-r--r-- | + | crw-r--r-- |
| - | crw-r--r-- | + | crw-r--r-- |
| - | lrwxrwxrwx | + | lrwxrwxrwx |
| - | drwxr-xr-x | + | drwxr-xr-x |
| - | drwxr-xr-x | + | drwxr-xr-x |
| - | drwxr-xr-x | + | drwxr-xr-x |
| + | drwxr-xr-x | ||
| + | -rw-r--r-- | ||
| + | -rw-r--r-- | ||
| + | -rw-r--r-- | ||
| --More-- | --More-- | ||
| </ | </ | ||
| Ligne 1028: | Ligne 1169: | ||
| < | < | ||
| [root@centos7 tmp]# lsinitrd custom | grep init | [root@centos7 tmp]# lsinitrd custom | grep init | ||
| - | -rw-r--r-- | ||
| ... | ... | ||
| - | lrwxrwxrwx | + | lrwxrwxrwx. |
| ... | ... | ||
| </ | </ | ||
| - | ===Consultez | + | ===Consulter |
| Pour consulter le contenu d'un fichier inclus dans l' | Pour consulter le contenu d'un fichier inclus dans l' | ||
| Ligne 1043: | Ligne 1183: | ||
| </ | </ | ||
| - | ===La commande | + | ===La Commande |
| La commande **dracut** permet de créer facilement une image initramfs. Les options de la commande sont : | La commande **dracut** permet de créer facilement une image initramfs. Les options de la commande sont : | ||
| Ligne 1595: | Ligne 1735: | ||
| | x: | | x: | ||
| - | =====Scripts de Démarrage===== | + | ====Scripts de Démarrage==== |
| Naviguez à **/ | Naviguez à **/ | ||
| Ligne 1606: | Ligne 1746: | ||
| </ | </ | ||
| - | ====rc.sysinit sous RHEL/CentOS 5==== | + | ===rc.sysinit sous RHEL/CentOS 5=== |
| D' | D' | ||
| - | =====Répertoire init.d===== | + | ====Répertoire init.d==== |
| Le répertoire **/ | Le répertoire **/ | ||
| Ligne 1628: | Ligne 1768: | ||
| </ | </ | ||
| - | =====Linux Standard Base===== | + | ====Linux Standard Base==== |
| **[[http:// | **[[http:// | ||
| Ligne 1781: | Ligne 1921: | ||
| </ | </ | ||
| - | ====Codes Retour Standardisés==== | + | ===Codes Retour Standardisés=== |
| Les codes retour standardisés sont : | Les codes retour standardisés sont : | ||
| Ligne 1796: | Ligne 1936: | ||
| | 200-254 | Réservés | | | 200-254 | Réservés | | ||
| - | ====Scripts==== | + | ===Scripts=== |
| LSB stipule un format //rigide// de script qui commence par une section délimitée par deux clauses : | LSB stipule un format //rigide// de script qui commence par une section délimitée par deux clauses : | ||
| Ligne 1877: | Ligne 2017: | ||
| | $time | L' | | $time | L' | ||
| - | =====Répertoires rcx.d===== | + | ====Répertoires rcx.d==== |
| Les répertoires **rc0.d** à **rc6.d** contiennent des liens vers les scripts du répertoire **init.d**. | Les répertoires **rc0.d** à **rc6.d** contiennent des liens vers les scripts du répertoire **init.d**. | ||
| Ligne 1934: | Ligne 2074: | ||
| </ | </ | ||
| - | ====rc.local==== | + | ===rc.local=== |
| Le script rc.local est lancé dans les niveaux d' | Le script rc.local est lancé dans les niveaux d' | ||
| - | =====La | + | ====La |
| Pour avoir une vue globale des services lancés par niveau d' | Pour avoir une vue globale des services lancés par niveau d' | ||
| Ligne 2005: | Ligne 2145: | ||
| </ | </ | ||
| - | ====Options de la commande==== | + | ===Options de la commande=== |
| Les options de la commande **chkconfig** sont : | Les options de la commande **chkconfig** sont : | ||
| Ligne 3244: | Ligne 3384: | ||
| =====Arrêt du Système===== | =====Arrêt du Système===== | ||
| - | ====La | + | ====La |
| Lors de l' | Lors de l' | ||
| Ligne 3331: | Ligne 3471: | ||
| </ | </ | ||
| - | ==== La commande | + | ==== La Commande |
| Cette commande redémarre le système. Quand le système fonctionne normalement, | Cette commande redémarre le système. Quand le système fonctionne normalement, | ||
| Ligne 3363: | Ligne 3503: | ||
| </ | </ | ||
| - | ==== La commande | + | ==== La Commande |
| Cette commande arrête le système. Quand le système fonctionne normalement, | Cette commande arrête le système. Quand le système fonctionne normalement, | ||
| Ligne 3395: | Ligne 3535: | ||
| </ | </ | ||
| - | ==== La commande | + | ==== La Commande |
| Cette commande arrête le système et coupe l' | Cette commande arrête le système et coupe l' | ||
| Ligne 3428: | Ligne 3568: | ||
| ----- | ----- | ||
| - | < | + | |
| - | <div align=" | + | Copyright © 2023 Hugh Norris. |
| - | Copyright © 2019 Hugh Norris. | + | |
| - | </ | + | |