LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 01-31-2012, 09:14 AM   #1
steegs8319
LQ Newbie
 
Registered: Jan 2012
Posts: 2

Rep: Reputation: Disabled
Multiple GRUB entries


I run Windows & Ubuntu side by side.
There has been several updates to Ubuntu, & GRUB lists all of them.

I would only want there to be Windows, maybe the current & previous versions of Linux.

How do I customize the Grub list? Even just the list order?

Cheers!
 
Old 01-31-2012, 09:35 AM   #2
odiseo77
Senior Member
 
Registered: Dec 2004
Location: Caracas, Venezuela
Distribution: Debian Sid, OpenSUSE 42.2
Posts: 1,164

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
What I do is to uninstall the kernels I no longer need. For example, if kernel version 3.2.0 is installed, I delete the old 3.1.0 kernel, so it no longer appears on the menu. You can do it easily from synaptic, searching for "linux-image" and uninstalling the packages you want from the list (of course, be careful not to remove your current kernel).
 
Old 01-31-2012, 12:26 PM   #3
JESSEJJ89
Member
 
Registered: Dec 2011
Location: North America
Distribution: Gentoo
Posts: 50

Rep: Reputation: 5
Quote:
Originally Posted by steegs8319 View Post
I run Windows & Ubuntu side by side.
There has been several updates to Ubuntu, & GRUB lists all of them.

I would only want there to be Windows, maybe the current & previous versions of Linux.

How do I customize the Grub list? Even just the list order?

Cheers!
To customize your grub list, edit the grub configuration file in /boot/grub/grub.conf. You can also choose a default OS and change boot time. The location and the name of the file may vary depending on the version of grub.

Type "grub-install -v" in the terminal to check the version.

Last edited by JESSEJJ89; 01-31-2012 at 12:28 PM.
 
Old 02-01-2012, 07:17 AM   #4
steegs8319
LQ Newbie
 
Registered: Jan 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
Below is the text from my grub.conf file.
Can I edit it from here?
What will happen if I delete older version entries?

Also, odiseo77, where would I find the kernels I'm after? titles etc?

I really redefine the term Newbie on this forum I think...




#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
load_env
fi
set default="12"
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 recordfail {
set recordfail=1
if [ -n ${have_grubenv} ]; then if [ -z ${boot_once} ]; then save_env recordfail; fi; fi
}
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 4b40c55b-4392-4574-a0b7-426592852b17
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
fi
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 4b40c55b-4392-4574-a0b7-426592852b17
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=20
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.32-38-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 4b40c55b-4392-4574-a0b7-426592852b17
linux /boot/vmlinuz-2.6.32-38-generic root=UUID=4b40c55b-4392-4574-a0b7-426592852b17 ro vga=771 quiet splash
initrd /boot/initrd.img-2.6.32-38-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-38-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 4b40c55b-4392-4574-a0b7-426592852b17
echo 'Loading Linux 2.6.32-38-generic ...'
linux /boot/vmlinuz-2.6.32-38-generic root=UUID=4b40c55b-4392-4574-a0b7-426592852b17 ro single vga=771
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-38-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-37-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 4b40c55b-4392-4574-a0b7-426592852b17
linux /boot/vmlinuz-2.6.32-37-generic root=UUID=4b40c55b-4392-4574-a0b7-426592852b17 ro vga=771 quiet splash
initrd /boot/initrd.img-2.6.32-37-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-37-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 4b40c55b-4392-4574-a0b7-426592852b17
echo 'Loading Linux 2.6.32-37-generic ...'
linux /boot/vmlinuz-2.6.32-37-generic root=UUID=4b40c55b-4392-4574-a0b7-426592852b17 ro single vga=771
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-37-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-36-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 4b40c55b-4392-4574-a0b7-426592852b17
linux /boot/vmlinuz-2.6.32-36-generic root=UUID=4b40c55b-4392-4574-a0b7-426592852b17 ro vga=771 quiet splash
initrd /boot/initrd.img-2.6.32-36-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-36-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 4b40c55b-4392-4574-a0b7-426592852b17
echo 'Loading Linux 2.6.32-36-generic ...'
linux /boot/vmlinuz-2.6.32-36-generic root=UUID=4b40c55b-4392-4574-a0b7-426592852b17 ro single vga=771
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-36-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-35-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 4b40c55b-4392-4574-a0b7-426592852b17
linux /boot/vmlinuz-2.6.32-35-generic root=UUID=4b40c55b-4392-4574-a0b7-426592852b17 ro vga=771 quiet splash
initrd /boot/initrd.img-2.6.32-35-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-35-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 4b40c55b-4392-4574-a0b7-426592852b17
echo 'Loading Linux 2.6.32-35-generic ...'
linux /boot/vmlinuz-2.6.32-35-generic root=UUID=4b40c55b-4392-4574-a0b7-426592852b17 ro single vga=771
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-35-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-24-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 4b40c55b-4392-4574-a0b7-426592852b17
linux /boot/vmlinuz-2.6.32-24-generic root=UUID=4b40c55b-4392-4574-a0b7-426592852b17 ro vga=771 quiet splash
initrd /boot/initrd.img-2.6.32-24-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-24-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 4b40c55b-4392-4574-a0b7-426592852b17
echo 'Loading Linux 2.6.32-24-generic ...'
linux /boot/vmlinuz-2.6.32-24-generic root=UUID=4b40c55b-4392-4574-a0b7-426592852b17 ro single vga=771
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-24-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 4b40c55b-4392-4574-a0b7-426592852b17
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 4b40c55b-4392-4574-a0b7-426592852b17
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows 7 (loader) (on /dev/sda1)" {
insmod ntfs
set root='(hd0,1)'
search --no-floppy --fs-uuid --set D852DDD052DDB40A
chainloader +1
}
### 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 ###
 
Old 02-01-2012, 08:52 AM   #5
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida
Distribution: slackware64-current, puppy, ubuntu
Posts: 1,953

Rep: Reputation: 267Reputation: 267Reputation: 267
Create a /etc/grub.d/05_custom. Copy the entries from /boot/grub/grub.cfg to /etc/grub.d/05_custom that you want to appear first in your boot menu and run update-grub. What this does when update-grub is ran is the custom menu will appear first then the other menu entries afterwards. The upside is when system updates are ran you will still have the newest kernel availabe. The downside is you will have multiple entries for the same kernel and will have to reedit the /etc/grub.d/05_custom manually and rerun update-grub to change the first few grub entries.
 
Old 02-01-2012, 10:10 AM   #6
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
Here is a great tutorial on grub2 and easy to understand.

grub2
 
Old 02-01-2012, 03:09 PM   #7
SecretCode
Member
 
Registered: Apr 2011
Location: UK
Distribution: Kubuntu 11.10
Posts: 562

Rep: Reputation: 102Reputation: 102
Package grub-customizer is a good way to handle most of these issues.
 
  


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] MySQL: Multiple entries unihiekka Linux - Newbie 2 04-05-2011 06:14 AM
LXer: Grub Customizer Lets You Reorder, Add Or Remove GRUB 2 (Or BURG) Menu Entries LXer Syndicated Linux News 0 10-09-2010 06:20 PM
GRUB 2 - multiple entries dreamweaver547 Ubuntu 5 12-13-2009 12:32 PM
Multiple GRUB entries BrianPritchard Linux - Newbie 1 11-17-2008 09:40 AM
Multiple Kernel Entries in Grub ... Safe to Remove? SlowCoder Linux - Newbie 2 04-23-2007 10:31 PM


All times are GMT -5. The time now is 12:10 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