LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-19-2015, 04:47 AM   #1
jaydul
Member
 
Registered: Sep 2012
Posts: 48

Rep: Reputation: Disabled
Question After upgrade CentOS 7 Here is 6 option to login boot


Hello
yesterday I upgrade centos 7 now Here is
CentOS 7 core
Linux 3 core

6 options Here every upgrade adding new line.

How can I fix it I want CentOS 7 core and CentOS 7 Debug only
 
Old 08-19-2015, 07:00 AM   #2
ericson007
Member
 
Registered: Sep 2004
Location: Japan
Distribution: CentOS 7.1
Posts: 656

Rep: Reputation: 121Reputation: 121
Hi there.

Are you talking about the grub screen? The one showing after you push the power button andbeforecentos boot?

If so, just take the top one. Debugging if you find problems.

After an update of a kernel a new line will show up. That is done so if there is a problem with the new kernel, you can go back and use an older one.

So it is normal. If you really want to get rid of them you can edit grub.cnf in the boot directory.

For more information see

https://access.redhat.com/documentat...ot_Loader.html
 
Old 08-19-2015, 07:24 AM   #3
jaydul
Member
 
Registered: Sep 2012
Posts: 48

Original Poster
Rep: Reputation: Disabled
My all grub screen works fine.But I want here only one not too many after upgrade.
 
Old 08-19-2015, 06:19 PM   #4
ericson007
Member
 
Registered: Sep 2004
Location: Japan
Distribution: CentOS 7.1
Posts: 656

Rep: Reputation: 121Reputation: 121
Righto. Then just edit the grub config file and export it as shown with the link.

Soleave the first menu entry and delete others then recompile the config.

Hope it helps.

Last edited by ericson007; 08-19-2015 at 06:22 PM.
 
Old 08-19-2015, 06:33 PM   #5
jaydul
Member
 
Registered: Sep 2012
Posts: 48

Original Poster
Rep: Reputation: Disabled
Here is my grub2 file.

[root@localhost tmp]# cat /boot/grub2/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub2-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
set pager=1

if [ -s $prefix/grubenv ]; then
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="${saved_entry}"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi

function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}

function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}

terminal_output console
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=0
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/00_tuned ###
set tuned_params=""
### END /etc/grub.d/00_tuned ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'CentOS Linux (3.10.0-229.11.1.el7.x86_64) 7 (Core)' --class rhel fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-229.el7.x86_64-advanced-dbf175ff-3547-420a-87bc-25b3f5205e61' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod xfs
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1' 4db8cbd9-fa27-40f8-af81-ac27256a5cb0
else
search --no-floppy --fs-uuid --set=root 4db8cbd9-fa27-40f8-af81-ac27256a5cb0
fi
linux16 /vmlinuz-3.10.0-229.11.1.el7.x86_64 root=/dev/mapper/centos-root ro rd.lvm.lv=centos/root rd.lvm.lv=centos/swap crashkernel=auto rhgb quiet LANG=en_US.UTF-8 systemd.debug
initrd16 /initramfs-3.10.0-229.11.1.el7.x86_64.img
}
menuentry 'CentOS Linux (3.10.0-229.11.1.el7.x86_64) 7 (Core) with debugging' --class rhel fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-229.el7.x86_64-advanced-dbf175ff-3547-420a-87bc-25b3f5205e61' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod xfs
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1' 4db8cbd9-fa27-40f8-af81-ac27256a5cb0
else
search --no-floppy --fs-uuid --set=root 4db8cbd9-fa27-40f8-af81-ac27256a5cb0
fi
linux16 /vmlinuz-3.10.0-229.11.1.el7.x86_64 root=/dev/mapper/centos-root ro rd.lvm.lv=centos/root rd.lvm.lv=centos/swap crashkernel=auto rhgb quiet LANG=en_US.UTF-8 systemd.debug
initrd16 /initramfs-3.10.0-229.11.1.el7.x86_64.img
}
menuentry 'CentOS Linux (3.10.0-229.7.2.el7.x86_64) 7 (Core)' --class rhel fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-229.el7.x86_64-advanced-dbf175ff-3547-420a-87bc-25b3f5205e61' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod xfs
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1' 4db8cbd9-fa27-40f8-af81-ac27256a5cb0
else
search --no-floppy --fs-uuid --set=root 4db8cbd9-fa27-40f8-af81-ac27256a5cb0
fi
linux16 /vmlinuz-3.10.0-229.7.2.el7.x86_64 root=/dev/mapper/centos-root ro rd.lvm.lv=centos/root rd.lvm.lv=centos/swap crashkernel=auto rhgb quiet LANG=en_US.UTF-8 systemd.debug
initrd16 /initramfs-3.10.0-229.7.2.el7.x86_64.img
}
menuentry 'CentOS Linux (3.10.0-229.7.2.el7.x86_64) 7 (Core) with debugging' --class rhel fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-229.el7.x86_64-advanced-dbf175ff-3547-420a-87bc-25b3f5205e61' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod xfs
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1' 4db8cbd9-fa27-40f8-af81-ac27256a5cb0
else
search --no-floppy --fs-uuid --set=root 4db8cbd9-fa27-40f8-af81-ac27256a5cb0
fi
linux16 /vmlinuz-3.10.0-229.7.2.el7.x86_64 root=/dev/mapper/centos-root ro rd.lvm.lv=centos/root rd.lvm.lv=centos/swap crashkernel=auto rhgb quiet LANG=en_US.UTF-8 systemd.debug
initrd16 /initramfs-3.10.0-229.7.2.el7.x86_64.img
}
menuentry 'CentOS Linux (3.10.0-229.4.2.el7.x86_64) 7 (Core)' --class rhel fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-229.el7.x86_64-advanced-dbf175ff-3547-420a-87bc-25b3f5205e61' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod xfs
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1' 4db8cbd9-fa27-40f8-af81-ac27256a5cb0
else
search --no-floppy --fs-uuid --set=root 4db8cbd9-fa27-40f8-af81-ac27256a5cb0
fi
linux16 /vmlinuz-3.10.0-229.4.2.el7.x86_64 root=/dev/mapper/centos-root ro rd.lvm.lv=centos/root rd.lvm.lv=centos/swap crashkernel=auto rhgb quiet LANG=en_US.UTF-8 systemd.debug
initrd16 /initramfs-3.10.0-229.4.2.el7.x86_64.img
}
menuentry 'CentOS Linux (3.10.0-229.4.2.el7.x86_64) 7 (Core) with debugging' --class rhel fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-229.el7.x86_64-advanced-dbf175ff-3547-420a-87bc-25b3f5205e61' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod xfs
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1' 4db8cbd9-fa27-40f8-af81-ac27256a5cb0
else
search --no-floppy --fs-uuid --set=root 4db8cbd9-fa27-40f8-af81-ac27256a5cb0
fi
linux16 /vmlinuz-3.10.0-229.4.2.el7.x86_64 root=/dev/mapper/centos-root ro rd.lvm.lv=centos/root rd.lvm.lv=centos/swap crashkernel=auto rhgb quiet LANG=en_US.UTF-8 systemd.debug
initrd16 /initramfs-3.10.0-229.4.2.el7.x86_64.img
}
menuentry 'CentOS Linux (3.10.0-229.1.2.el7.x86_64) 7 (Core)' --class rhel fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-229.el7.x86_64-advanced-dbf175ff-3547-420a-87bc-25b3f5205e61' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod xfs
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1' 4db8cbd9-fa27-40f8-af81-ac27256a5cb0
else
search --no-floppy --fs-uuid --set=root 4db8cbd9-fa27-40f8-af81-ac27256a5cb0
fi
linux16 /vmlinuz-3.10.0-229.1.2.el7.x86_64 root=/dev/mapper/centos-root ro rd.lvm.lv=centos/root rd.lvm.lv=centos/swap crashkernel=auto rhgb quiet LANG=en_US.UTF-8 systemd.debug
initrd16 /initramfs-3.10.0-229.1.2.el7.x86_64.img
}
menuentry 'CentOS Linux (3.10.0-229.1.2.el7.x86_64) 7 (Core) with debugging' --class rhel fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-229.el7.x86_64-advanced-dbf175ff-3547-420a-87bc-25b3f5205e61' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod xfs
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1' 4db8cbd9-fa27-40f8-af81-ac27256a5cb0
else
search --no-floppy --fs-uuid --set=root 4db8cbd9-fa27-40f8-af81-ac27256a5cb0
fi
linux16 /vmlinuz-3.10.0-229.1.2.el7.x86_64 root=/dev/mapper/centos-root ro rd.lvm.lv=centos/root rd.lvm.lv=centos/swap crashkernel=auto rhgb quiet LANG=en_US.UTF-8 systemd.debug
initrd16 /initramfs-3.10.0-229.1.2.el7.x86_64.img
}
menuentry 'CentOS Linux 7 (Core), with Linux 3.10.0-229.el7.x86_64' --class rhel fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-229.el7.x86_64-advanced-dbf175ff-3547-420a-87bc-25b3f5205e61' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod xfs
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1' 4db8cbd9-fa27-40f8-af81-ac27256a5cb0
else
search --no-floppy --fs-uuid --set=root 4db8cbd9-fa27-40f8-af81-ac27256a5cb0
fi
linux16 /vmlinuz-3.10.0-229.el7.x86_64 root=/dev/mapper/centos-root ro rd.lvm.lv=centos/root rd.lvm.lv=centos/swap crashkernel=auto rhgb quiet LANG=en_US.UTF-8
initrd16 /initramfs-3.10.0-229.el7.x86_64.img
}
menuentry 'CentOS Linux 7 (Core), with Linux 0-rescue-d36f252deb084a688f1f7507a52d7b42' --class rhel fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-0-rescue-d36f252deb084a688f1f7507a52d7b42-advanced-dbf175ff-3547-420a-87bc-25b3f5205e61' {
load_video
insmod gzio
insmod part_msdos
insmod xfs
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1' 4db8cbd9-fa27-40f8-af81-ac27256a5cb0
else
search --no-floppy --fs-uuid --set=root 4db8cbd9-fa27-40f8-af81-ac27256a5cb0
fi
linux16 /vmlinuz-0-rescue-d36f252deb084a688f1f7507a52d7b42 root=/dev/mapper/centos-root ro rd.lvm.lv=centos/root rd.lvm.lv=centos/swap crashkernel=auto rhgb quiet
initrd16 /initramfs-0-rescue-d36f252deb084a688f1f7507a52d7b42.img
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_ppc_terminfo ###
### END /etc/grub.d/20_ppc_terminfo ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
 
Old 08-19-2015, 07:29 PM   #6
ericson007
Member
 
Registered: Sep 2004
Location: Japan
Distribution: CentOS 7.1
Posts: 656

Rep: Reputation: 121Reputation: 121
As I have stated, remove all non required menu entries.

So you want:
Code:
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub2-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
set pager=1

if [ -s $prefix/grubenv ]; then
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="${saved_entry}"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi

function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}

function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}

terminal_output console
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=0
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/00_tuned ###
set tuned_params=""
### END /etc/grub.d/00_tuned ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'CentOS Linux (3.10.0-229.11.1.el7.x86_64) 7 (Core)' --class rhel fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-229.el7.x86_64-advanced-dbf175ff-3547-420a-87bc-25b3f5205e61' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod xfs
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1' 4db8cbd9-fa27-40f8-af81-ac27256a5cb0
else
search --no-floppy --fs-uuid --set=root 4db8cbd9-fa27-40f8-af81-ac27256a5cb0
fi
linux16 /vmlinuz-3.10.0-229.11.1.el7.x86_64 root=/dev/mapper/centos-root ro rd.lvm.lv=centos/root rd.lvm.lv=centos/swap crashkernel=auto rhgb quiet LANG=en_US.UTF-8 systemd.debug
initrd16 /initramfs-3.10.0-229.11.1.el7.x86_64.img
}


### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_ppc_terminfo ###
### END /etc/grub.d/20_ppc_terminfo ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
The files in question are /etc/default/grub and the scripts in /etc/grub.d/ as is shown on the first page of the manual in the link I posted.

Then run
Code:
grub2-mkconfig --output=/boot/grub2/grub.cfg
as stated on the same reference page.
 
Old 08-19-2015, 07:50 PM   #7
ericson007
Member
 
Registered: Sep 2004
Location: Japan
Distribution: CentOS 7.1
Posts: 656

Rep: Reputation: 121Reputation: 121
This is not related directly to cntos but very nice to explain those bottom entries about the files found in /etc/grub.d/

https://linuxnorth.wordpress.com/201...ub2-revisited/

The official version is in section

https://access.redhat.com/documentat...UB_2_Menu.html

Remember that when there is a new kernel update, it will be automaticallyadded and you will have to edit the files again.

Last edited by ericson007; 08-19-2015 at 08:02 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Upgrade CentOS release 5.9 (Final) to CentOS 6.x yogesh_attarde Linux - Server 3 06-07-2013 02:42 AM
RHEL 4 smp to EL5.7 upgrade ( couldnt find upgrade option after boot from el5.7 CD) salimep Linux - Server 2 11-23-2011 07:04 AM
LXer: CentOS 5.6 is released! Upgrade now from CentOS 5.5 to 5.6 LXer Syndicated Linux News 0 04-10-2011 09:10 PM
Cant Upgrade Centos 4.6 to Centos 5.3 with I2O subsystem crackyblue Linux - Software 2 11-25-2009 06:02 PM


All times are GMT -5. The time now is 05:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration