GNU/Linux >> Tutoriales Linux >  >> Cent OS

Cómo mostrar un nombre de kernel personalizado en el menú de GRUB CentOS/RHEL 6

Pregunta :Ejecutamos CentOS/RHEL 6 de arranque dual y usamos 2 núcleos para 2 aplicaciones diferentes. ¿Cómo podemos mostrar un nombre de kernel personalizado para cada aplicación como se muestra a continuación:

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

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

Esto se puede hacer fácilmente usando el "título opción ” en GRUB. Modifique /boot/grub/grub.conf para tener un título personalizado como se muestra a continuación:

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

Por ejemplo, en nuestro caso, podemos tener el archivo /boot/grub/grub.conf como se muestra a continuación:

# 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

Cómo pausar el proceso de arranque en el menú de GRUB para seleccionar un kernel

También puede querer tener tiempo para seleccionar el kernel en el menú de GRUB. En ciertas condiciones, la gente prefiere seleccionar manualmente el núcleo. Para hacer eso, comente el “tiempo de espera opción ” en /boot/grub/grub.conf archivo para pausar el proceso de arranque en el menú de GRUB.

Por ejemplo:

# 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. CentOS/RHEL 7:Cómo agregar un parámetro de kernel solo a un kernel específico

  2. Cómo cambiar el nombre del dispositivo NIC en CentOS/RHEL 6

  3. CentOS/RHEL 7:Cómo modificar la línea de comandos del kernel

  4. Cómo configurar nombres de dispositivos personalizados usando udev en CentOS/RHEL 7

  5. Cómo agregar un script personalizado a systemd en CentOS/RHEL 7

Cómo iniciar en modo de usuario único en CentOS 8 / RHEL 8

Cómo cambiar el nombre de la interfaz de red a eth0 en CentOS 8/RHEL 8

CentOS / RHEL 7:Cómo proteger con contraseña las entradas del menú GRUB2

CentOS / RHEL 7:Cómo instalar el kernel desde el modo de rescate

CentOS / RHEL 7:Cómo configurar kdump usando GUI

Cómo recuperar GRUB (partición de arranque dañada) en CentOS/RHEL 5,6