Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
elearning:workbooks:lpic:11:500:l102 [2024/04/05 07:53] adminelearning:workbooks:lpic:11:500:l102 [2024/12/12 14:30] (Version actuelle) admin
Ligne 1053: Ligne 1053:
 ====Initramfs sous RHEL/CentOS 7==== ====Initramfs sous RHEL/CentOS 7====
  
-Le fichier Initramfs //%%INITial Ram File System%%// est une archive au format cpio compressé :+Copiez le fichier Initramfs //%%INITial Ram File System%%// vers /tmp/custom :
  
 <code> <code>
 [root@centos7 ~]# cp /boot/initramfs-3.10.0-514.16.1.el7.x86_64.img /tmp/custom [root@centos7 ~]# cp /boot/initramfs-3.10.0-514.16.1.el7.x86_64.img /tmp/custom
 [root@centos7 ~]# cd /tmp [root@centos7 ~]# cd /tmp
-[root@centos7 tmp]# ls 
-custom  systemd-private-be6ac69163a0437aa9a0b0cb2f8514e6-chronyd.service-rOpG2C  systemd-private-be6ac69163a0437aa9a0b0cb2f8514e6-cups.service-yzrHum 
-[root@centos7 tmp]# mv custom custom.gz 
-[root@centos7 tmp]# gunzip custom.gz  
-[root@centos7 tmp]# mkdir initramfs 
-[root@centos7 tmp]# cd initramfs 
-[root@centos7 initramfs]# cpio -cid -I ../custom 
-113591 blocks 
-[root@centos7 initramfs]# ls 
-bin  dev  etc  init  lib  lib64  proc  root  run  sbin  shutdown  sys  sysroot  tmp  usr  var 
-[root@centos7 initramfs]# ls -l 
-total 4 
-lrwxrwxrwx.  1 root root    7 Dec  4 11:00 bin -> usr/bin 
-drwxr-xr-x.  2 root root  100 Dec  4 11:00 dev 
-drwxr-xr-x. 11 root root  520 Dec  4 11:00 etc 
-lrwxrwxrwx.  1 root root   23 Dec  4 11:00 init -> usr/lib/systemd/systemd 
-lrwxrwxrwx.  1 root root    7 Dec  4 11:00 lib -> usr/lib 
-lrwxrwxrwx.  1 root root    9 Dec  4 11:00 lib64 -> usr/lib64 
-drwxr-xr-x.  2 root root   40 Dec  4 11:00 proc 
-drwxr-xr-x.  2 root root   40 Dec  4 11:00 root 
-drwxr-xr-x.  2 root root   40 Dec  4 11:00 run 
-lrwxrwxrwx.  1 root root    8 Dec  4 11:00 sbin -> usr/sbin 
--rwxr-xr-x.  1 root root 3117 Dec  4 11:00 shutdown 
-drwxr-xr-x.  2 root root   40 Dec  4 11:00 sys 
-drwxr-xr-x.  2 root root   40 Dec  4 11:00 sysroot 
-drwxr-xr-x.  2 root root   40 Dec  4 11:00 tmp 
-drwxr-xr-x.  7 root root  140 Dec  4 11:00 usr 
-drwxr-xr-x.  2 root root   80 Dec  4 11:00 var 
 </code> </code>
  
Ligne 1093: Ligne 1065:
  
 <code> <code>
-[root@centos7 initramfs]# cd .. 
 [root@centos7 tmp]# lsinitrd custom | more [root@centos7 tmp]# lsinitrd custom | more
 Image: custom: 56M Image: custom: 56M
Ligne 2778: Ligne 2749:
 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
 </code> </code>
 +
 +Depuis l'EOL de CentOS 7 , les dépôts ci-dessus ont été supprimés. Réparez donc les dépôts avec les commandes suivantes :
 +
 +<code>
 +[root@centos7 ~]# sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
 +[root@centos7 ~]# sed -i 's|#\s*baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
 +</code>
 +
  
 ====Utilisation==== ====Utilisation====
Menu