Domanda :Eseguiamo CentOS/RHEL 6 dual boot e utilizziamo 2 kernel per 2 diverse applicazioni. Come possiamo visualizzare un nome del kernel personalizzato per ciascuna applicazione come mostrato di seguito:
CentOS 6.x Choose this boot option to run APP01. CentOS 6.y Choose this boot option to run APP02.
Questo può essere fatto facilmente usando il "titolo ” opzione in GRUB. Modifica /boot/grub/grub.conf per avere un titolo personalizzato come mostrato di seguito:
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 Ad esempio nel nostro caso possiamo avere il file /boot/grub/grub.conf come mostrato di seguito:
# 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 Come sospendere il processo di avvio nel menu di GRUB per selezionare un kernel
Potresti anche voler avere il tempo di selezionare il kernel nel menu di GRUB. In determinate condizioni le persone preferiscono selezionare manualmente il kernel. A tale scopo, commenta "timeout ” opzione in /boot/grub/grub.conf per mettere in pausa il processo di avvio nel menu di GRUB.
Ad esempio:
# 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 ....