GNU/Linux >> Tutoriels Linux >  >> Cent OS

Comment afficher un nom de noyau personnalisé dans le menu GRUB CentOS/RHEL 6

Question :Nous exécutons CentOS/RHEL 6 à double démarrage et utilisons 2 noyaux pour 2 applications différentes. Comment pouvons-nous afficher un nom de noyau personnalisé pour chaque application comme indiqué ci-dessous :

CentOS 6.x
   Choose this boot option to run APP01.

CentOS 6.y
   Choose this boot option to run APP02.

Cela peut être facilement fait en utilisant le "titre ” dans GRUB. Modifiez le fichier /boot/grub/grub.conf pour avoir un titre personnalisé comme indiqué ci-dessous :

title Place your custom tile here
        root (hd0,0)
       kernel /vmlinuz-2.6.32-220.7.1.el6.x86_64 ro root=/dev/mapper/vg_vm27-lv_root rd_LVM_LV=vg_vm27/lv_root rd_LVM_LV=vg_vm27/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=auto rhgb quiet
        initrd /initramfs-2.6.32-220.7.1.el6.x86_64.img

Par exemple, dans notre cas, nous pouvons avoir le fichier /boot/grub/grub.conf comme indiqué ci-dessous :

# cat /boot/grub/grub.conf

default=0
timeout=5                                 
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu

title Choose this boot option to run APP01.
        root (hd0,0)
       kernel /vmlinuz-2.6.32-220.7.1.el6.x86_64 ro root=/dev/mapper/vg_vm27-lv_root rd_LVM_LV=vg_vm27/lv_root rd_LVM_LV=vg_vm27/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=auto rhgb quiet
        initrd /initramfs-2.6.32-220.7.1.el6.x86_64.img

title Choose this boot option to run APP02.
        root (hd0,0)
        kernel /vmlinuz-2.6.32-220.4.2.el6.x86_64 ro root=/dev/mapper/vg_vm27-lv_root rd_LVM_LV=vg_vm27/lv_root rd_LVM_LV=vg_vm27/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=auto rhgb quiet
        initrd /initramfs-2.6.32-220.4.2.el6.x86_64.img

Comment mettre en pause le processus de démarrage dans le menu GRUB pour sélectionner un noyau

Vous voudrez peut-être aussi avoir le temps de sélectionner le noyau dans le menu GRUB. Dans certaines conditions, les utilisateurs préfèrent sélectionner manuellement le noyau. Pour ce faire, commentez le "timeout ” dans /boot/grub/grub.conf fichier pour mettre en pause le processus de démarrage dans le menu GRUB.

Par exemple :

# vim /boot/grub/grub.conf file.

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/mapper/vg_vm27-lv_root
#          initrd /initrd-[generic-]version.img
#boot=/dev/vda
default=0
#timeout=5
....


Cent OS
  1. Comment changer le nom du périphérique NIC dans CentOS / RHEL 6

  2. Comment utiliser l'outil Magic SysRq dans CentOS / RHEL

  3. CentOS / RHEL 7 :Comment modifier la ligne de commande du noyau

  4. Comment définir des noms de périphériques personnalisés à l'aide d'udev dans CentOS/RHEL 7

  5. Comment ajouter un script personnalisé à systemd dans CentOS/RHEL 7

Comment démarrer en mode mono-utilisateur dans CentOS 8 / RHEL 8

Comment changer le nom de l'interface réseau en eth0 sur CentOS 8 / RHEL 8

CentOS / RHEL 7 :Comment protéger par mot de passe les entrées du menu GRUB2

CentOS / RHEL 7 :Comment installer le noyau à partir du mode de secours

CentOS / RHEL 7 :Comment configurer kdump à l'aide de l'interface graphique

Comment récupérer GRUB (partition de démarrage corrompue) dans CentOS/RHEL 5,6