help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting rid of 'recovery' entries when generating grub's menu


From: Chris Jones
Subject: Re: Getting rid of 'recovery' entries when generating grub's menu
Date: Mon, 09 Apr 2012 01:08:37 -0400
User-agent: Mutt/1.5.20 (2009-06-14)

On Mon, Apr 09, 2012 at 12:06:41AM EDT, Jordan Uggla wrote:
> On Sun, Apr 8, 2012 at 8:59 PM, Chris Jones <address@hidden> wrote:

> > With grub v 1.98 on stock debian squeeze I would like to disable the
> > generation of 'recovery' entries in grub.cfg.

[..]

> Please post your exact /etc/default/grub and the /boot/grub/grub.cfg
> which it produces.

Intestingly, this only appears to be a problem with Ubuntu and derivates
like Mint, not with debian.

Anyway, here goes:

$ cat /etc/default/grub

| # If you change this file, run 'update-grub' afterwards to update
| # /boot/grub/grub.cfg.
| 
| GRUB_DEFAULT=0
| GRUB_TIMEOUT=-1
| GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
| 
| # The resolution used on graphical terminal
| # note that you can use only modes which your graphic card supports via VBE
| # you can see them in real GRUB with the command `vbeinfo'
| GRUB_GFXMODE=1920x1200
| 
| # Uncomment to disable generation of recovery mode menu entries
| # 4/6/12 - cjns
| # Setting this variable has not effect - cf. debian bug #612777
| GRUB_DISABLE_LINUX_RECOVERY="true"
| GRUB_DISABLE_RECOVERY="true"
| 
| # set background
| GRUB_BACKGROUND="/usr/share/images/grub/Black_grub_background.1920x1200.png"

$ cat /boot/grub/grub.cfg

| #
| # DO NOT EDIT THIS FILE
| #
| # It is automatically generated by 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="0"
| 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 {
|   insmod vbe
|   insmod vga
|   insmod video_bochs
|   insmod video_cirrus
| }
| 
| insmod part_msdos
| insmod ext2
| set root='(hd0,msdos7)'
| search --no-floppy --fs-uuid --set f3d99329-42b6-4bb4-a0de-367fb1e8a631
| if loadfont /usr/share/grub/unicode.pf2 ; then
|   set gfxmode=1920x1200
|   set gfxpayload=keep                         # cjns 2/19/11
|   load_video
|   insmod gfxterm
| fi
| terminal_output gfxterm
| insmod part_msdos
| insmod ext2
| set root='(hd0,msdos7)'
| search --no-floppy --fs-uuid --set f3d99329-42b6-4bb4-a0de-367fb1e8a631
| insmod png
| background_image -m stretch 
/usr/share/images/grub/Black_grub_background.1920x1200.png
| insmod part_msdos
| insmod ext2
| set root='(hd0,msdos7)'
| search --no-floppy --fs-uuid --set f3d99329-42b6-4bb4-a0de-367fb1e8a631
| set locale_dir=($root)/boot/grub/locale
| set lang=en
| insmod gettext
| set timeout=-1
| ### END /etc/grub.d/00_header ###
| 
| ### BEGIN /etc/grub.d/05_debian_theme ###
| insmod part_msdos
| insmod ext2
| set root='(hd0,msdos7)'
| search --no-floppy --fs-uuid --set f3d99329-42b6-4bb4-a0de-367fb1e8a631
| insmod png
| if background_image 
/usr/share/images/grub/Black_grub_background.1920x1200.png; then
|   true
| else
|   set menu_color_normal=black/black
|   set menu_color_highlight=white/black
| fi
| ### END /etc/grub.d/05_debian_theme ###
| 
| ### BEGIN /etc/grub.d/10_linux ###
| menuentry 'Debian GNU/Linux, with Linux 2.6.32-bpo.5-686-bigmem' --class 
debian --class gnu-linux --class gnu --class os {
|       insmod part_msdos
|       insmod ext2
|       set root='(hd0,msdos7)'
|       search --no-floppy --fs-uuid --set f3d99329-42b6-4bb4-a0de-367fb1e8a631
|       echo    'Loading Linux 2.6.32-bpo.5-686-bigmem ...'
|       linux   /boot/vmlinuz-2.6.32-bpo.5-686-bigmem 
root=UUID=f3d99329-42b6-4bb4-a0de-367fb1e8a631 ro  
|       echo    'Loading initial ramdisk ...'
|       initrd  /boot/initrd.img-2.6.32-bpo.5-686-bigmem
| }
| menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-686-bigmem' --class debian 
--class gnu-linux --class gnu --class os {
|       insmod part_msdos
|       insmod ext2
|       set root='(hd0,msdos7)'
|       search --no-floppy --fs-uuid --set f3d99329-42b6-4bb4-a0de-367fb1e8a631
|       echo    'Loading Linux 2.6.32-5-686-bigmem ...'
|       linux   /boot/vmlinuz-2.6.32-5-686-bigmem 
root=UUID=f3d99329-42b6-4bb4-a0de-367fb1e8a631 ro  
|       echo    'Loading initial ramdisk ...'
|       initrd  /boot/initrd.img-2.6.32-5-686-bigmem
| }
| ### END /etc/grub.d/10_linux ###
| 
| ### BEGIN /etc/grub.d/20_linux_xen ###
| ### END /etc/grub.d/20_linux_xen ###
| 
| ### BEGIN /etc/grub.d/30_os-prober ###
| menuentry "Windows Vista (loader) (on /dev/sda1)" {
|       insmod part_msdos
|       insmod ntfs
|       set root='(hd0,msdos1)'
|       search --no-floppy --fs-uuid --set 1a5eb1285eb0fe17
|       chainloader +1
| }
| menuentry "Windows Vista (loader) (on /dev/sda2)" {
|       insmod part_msdos
|       insmod ntfs
|       set root='(hd0,msdos2)'
|       search --no-floppy --fs-uuid --set f6f6b3def6b39d75
|       chainloader +1
| }
| menuentry "Ubuntu, with Linux 2.6.38-12-generic-pae (on /dev/sda6)" {
|       insmod part_msdos
|       insmod ext2
|       set root='(hd0,msdos6)'
|       search --no-floppy --fs-uuid --set 75cc1563-e309-430b-8ea8-76d289758ff1
|       linux /boot/vmlinuz-2.6.38-12-generic-pae 
root=UUID=75cc1563-e309-430b-8ea8-76d289758ff1 ro nomodeset 
video=uvesafb:mode_option=1920x1200-24,mtrr=3,scroll=ywrap
|       initrd /boot/initrd.img-2.6.38-12-generic-pae
| }
| menuentry "Ubuntu, with Linux 2.6.38-12-generic-pae (recovery mode) (on 
/dev/sda6)" {
|       insmod part_msdos
|       insmod ext2
|       set root='(hd0,msdos6)'
|       search --no-floppy --fs-uuid --set 75cc1563-e309-430b-8ea8-76d289758ff1
|       linux /boot/vmlinuz-2.6.38-12-generic-pae 
root=UUID=75cc1563-e309-430b-8ea8-76d289758ff1 ro single
|       initrd /boot/initrd.img-2.6.38-12-generic-pae
| }
| menuentry "Ubuntu, with Linux 2.6.38-11-generic-pae (on /dev/sda6)" {
|       insmod part_msdos
|       insmod ext2
|       set root='(hd0,msdos6)'
|       search --no-floppy --fs-uuid --set 75cc1563-e309-430b-8ea8-76d289758ff1
|       linux /boot/vmlinuz-2.6.38-11-generic-pae 
root=UUID=75cc1563-e309-430b-8ea8-76d289758ff1 ro nomodeset 
video=uvesafb:mode_option=1920x1200-24,mtrr=3,scroll=ywrap
|       initrd /boot/initrd.img-2.6.38-11-generic-pae
| }
| menuentry "Ubuntu, with Linux 2.6.38-11-generic-pae (recovery mode) (on 
/dev/sda6)" {
|       insmod part_msdos
|       insmod ext2
|       set root='(hd0,msdos6)'
|       search --no-floppy --fs-uuid --set 75cc1563-e309-430b-8ea8-76d289758ff1
|       linux /boot/vmlinuz-2.6.38-11-generic-pae 
root=UUID=75cc1563-e309-430b-8ea8-76d289758ff1 ro single
|       initrd /boot/initrd.img-2.6.38-11-generic-pae
| }
| menuentry "Ubuntu, with Linux 2.6.38-8-generic-pae (on /dev/sda6)" {
|       insmod part_msdos
|       insmod ext2
|       set root='(hd0,msdos6)'
|       search --no-floppy --fs-uuid --set 75cc1563-e309-430b-8ea8-76d289758ff1
|       linux /boot/vmlinuz-2.6.38-8-generic-pae 
root=UUID=75cc1563-e309-430b-8ea8-76d289758ff1 ro nomodeset 
video=uvesafb:mode_option=1920x1200-24,mtrr=3,scroll=ywrap
|       initrd /boot/initrd.img-2.6.38-8-generic-pae
| }
| menuentry "Ubuntu, with Linux 2.6.38-8-generic-pae (recovery mode) (on 
/dev/sda6)" {
|       insmod part_msdos
|       insmod ext2
|       set root='(hd0,msdos6)'
|       search --no-floppy --fs-uuid --set 75cc1563-e309-430b-8ea8-76d289758ff1
|       linux /boot/vmlinuz-2.6.38-8-generic-pae 
root=UUID=75cc1563-e309-430b-8ea8-76d289758ff1 ro single
|       initrd /boot/initrd.img-2.6.38-8-generic-pae
| }
| menuentry "Debian GNU/Linux (5.0.10) (on /dev/sdb5)" {
|       insmod part_msdos
|       insmod ext2
|       set root='(hd1,msdos5)'
|       search --no-floppy --fs-uuid --set ac80646e-439c-4231-a89f-aad18c3c316a
|       linux /boot/vmlinuz-2.6.26-2-686 root=/dev/sdb5
|       initrd /boot/initrd.img-2.6.26-2-686
| }
| menuentry "Debian GNU/Linux (5.0.10) (on /dev/sdb5)" {
|       insmod part_msdos
|       insmod ext2
|       set root='(hd1,msdos5)'
|       search --no-floppy --fs-uuid --set ac80646e-439c-4231-a89f-aad18c3c316a
|       linux /boot/vmlinuz-2.6.26-2-686-bigmem root=/dev/sdb5
|       initrd /boot/initrd.img-2.6.26-2-686-bigmem
| }
| menuentry "Debian GNU/Linux (5.0.10) (on /dev/sdb5)" {
|       insmod part_msdos
|       insmod ext2
|       set root='(hd1,msdos5)'
|       search --no-floppy --fs-uuid --set ac80646e-439c-4231-a89f-aad18c3c316a
|       linux /boot/vmlinuz-2.6.32-bpo.5-686-bigmem root=/dev/sdb5
|       initrd /boot/initrd.img-2.6.32-bpo.5-686-bigmem
| }
| menuentry "Linux Mint 10 64-bit, 2.6.35-22-generic (/dev/sdb8) (on 
/dev/sdb8)" {
|       insmod part_msdos
|       insmod ext2
|       set root='(hd1,msdos8)'
|       search --no-floppy --fs-uuid --set b2f56c9c-c703-4147-a3d2-ebdb1bfedfe7
|       linux /boot/vmlinuz-2.6.35-22-generic 
root=UUID=b2f56c9c-c703-4147-a3d2-ebdb1bfedfe7 ro nomodeset 
video=uvesafb:mode_option=1920x1200-24,mtrr=3,scroll=ywrap text
|       initrd /boot/initrd.img-2.6.35-22-generic
| }
| menuentry "Linux Mint 10 64-bit, 2.6.35-22-generic (/dev/sdb8) -- recovery 
mode (on /dev/sdb8)" {
|       insmod part_msdos
|       insmod ext2
|       set root='(hd1,msdos8)'
|       search --no-floppy --fs-uuid --set b2f56c9c-c703-4147-a3d2-ebdb1bfedfe7
|       linux /boot/vmlinuz-2.6.35-22-generic 
root=UUID=b2f56c9c-c703-4147-a3d2-ebdb1bfedfe7 ro single
|       initrd /boot/initrd.img-2.6.35-22-generic
| }
| ### 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  $prefix/custom.cfg ]; then
|   source $prefix/custom.cfg;
| fi
| ### END /etc/grub.d/41_custom ###

-- 
Have a nice day!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]