Problem with Start up manager or GRUB (Resolved)

On my old laptop IBM ThinkPad T22 I am running peppermint 2 no problems with the system.

However, it suddenly always boots into recover mode. I have checked Start up manager and the normal operating system is listed as the default.

The GRUB selection screen is not displayed at start up so no option to select the correct option.

I have run sudo gedit /etc/default/grub and it all looks OK to me any thoughts.

If you change this file, run ‘update-grub’ afterwards to update

/boot/grub/grub.cfg.

For full documentation of the options in this file, see:

info -f grub -n ‘Simple configuration’

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=15
GRUB_HIDDEN_TIMEOUT_QUIET=false
GRUB_TIMEOUT=30
GRUB_DISTRIBUTOR=lsb_release -i -s 2> /dev/null || echo Debian
GRUB_CMDLINE_LINUX_DEFAULT=“quiet splash”
GRUB_CMDLINE_LINUX=" splash quiet vga=758"

Uncomment to enable BadRAM filtering, modify to suit your needs

This works with Linux (no patch required) and with any kernel that obtains

the memory map information from GRUB (GNU Mach, kernel of FreeBSD …)

#GRUB_BADRAM=“0x01234567,0xfefefefe,0x89abcdef,0xefefefef”

Uncomment to disable graphical terminal (grub-pc only)

#GRUB_TERMINAL=console

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=640x480

Uncomment if you don’t want GRUB to pass “root=UUID=xxx” parameter to Linux

#GRUB_DISABLE_LINUX_UUID=true

Uncomment to disable generation of recovery mode menu entries

#GRUB_DISABLE_RECOVERY=“true”

Uncomment to get a beep at grub start

#GRUB_INIT_TUNE=“480 440 1”

Can you download the boot_info_script, and run it… so I can see your GRUB and hard drive configuration…

cd ~

then

wget http://dl.dropbox.com/u/11876059/boot_info_script060.zip

then

unzip boot_info_script060.zip

then

chmod +x boot_info_script.sh

then

sudo ./boot_info_script.sh

You’ll now find a file called RESULTS.txt in your home folder… can you post the contents of that file back here.

When you post the contents, can you surround them with [b]

[/b] tags to keep the formatting.
[code                  Boot Info Script 0.60    from 17 May 2011


============================= Boot Info Summary: ===============================

 => Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1 of 
    the same hard drive for core.img. core.img is at this location and looks 
    for (,msdos1)/boot/grub on this drive.

sda1: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info:  
    Operating System:  Peppermint
    Boot files:        /boot/grub/menu.lst /boot/grub/grub.cfg /etc/fstab 
                       /boot/grub/core.img

sda2: __________________________________________________________________________

    File system:       Extended Partition
    Boot sector type:  -
    Boot sector info:  

sda5: __________________________________________________________________________

    File system:       swap
    Boot sector type:  -
    Boot sector info:  

============================ Drive/Partition Info: =============================

Drive: sda _____________________________________________________________________

Disk /dev/sda: 20.0 GB, 20003880960 bytes
255 heads, 63 sectors/track, 2432 cylinders, total 39070080 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sda1    *          2,048    38,021,119    38,019,072  83 Linux
/dev/sda2          38,023,166    39,069,695     1,046,530   5 Extended
/dev/sda5          38,023,168    39,069,695     1,046,528  82 Linux swap / Solaris


"blkid" output: ________________________________________________________________

Device           UUID                                   TYPE       LABEL

/dev/sda1        a47d0f4b-fb86-4143-a047-98241b5186c7   ext4       
/dev/sda5        77fc397d-6a1f-46f1-9d74-71d7bee82472   swap       

================================ Mount points: =================================

Device           Mount_Point              Type       Options

/dev/sda1        /                        ext4       (rw,errors=remount-ro,commit=0)


=========================== sda1/boot/grub/menu.lst: ===========================

--------------------------------------------------------------------------------
# menu.lst - See: grub(8), info grub, update-grub(8)
#            grub-install(8), grub-floppy(8),
#            grub-md5-crypt, /usr/share/doc/grub
#            and /usr/share/doc/grub-legacy-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default		0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout		3

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line)  and entries protected by the
# command 'lock'
# e.g. password topsecret
#      password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title		Windows 95/98/NT/2000
# root		(hd0,0)
# makeactive
# chainloader	+1
#
# title		Linux
# root		(hd0,1)
# kernel	/vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
##      kopt_2_6_8=root=/dev/hdc1 ro
##      kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=a47d0f4b-fb86-4143-a047-98241b5186c7 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=a47d0f4b-fb86-4143-a047-98241b5186c7

## should update-grub create alternative automagic boot options
## e.g. alternative=true
##      alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
##      lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
##      lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
##      altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
##      howmany=7
# howmany=all

## specify if running in Xen domU or have grub detect automatically
## update-grub will ignore non-xen kernels when running in domU and vice versa
## e.g. indomU=detect
##      indomU=true
##      indomU=false
# indomU=detect

## should update-grub create memtest86 boot option
## e.g. memtest86=true
##      memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title		Peppermint Two, kernel 2.6.38-11-generic
uuid		a47d0f4b-fb86-4143-a047-98241b5186c7
kernel		/boot/vmlinuz-2.6.38-11-generic root=UUID=a47d0f4b-fb86-4143-a047-98241b5186c7 ro quiet splash 
initrd		/boot/initrd.img-2.6.38-11-generic

title		Peppermint Two, kernel 2.6.38-11-generic (recovery mode)
uuid		a47d0f4b-fb86-4143-a047-98241b5186c7
kernel		/boot/vmlinuz-2.6.38-11-generic root=UUID=a47d0f4b-fb86-4143-a047-98241b5186c7 ro  single
initrd		/boot/initrd.img-2.6.38-11-generic

title		Peppermint Two, kernel 2.6.38-8-generic
uuid		a47d0f4b-fb86-4143-a047-98241b5186c7
kernel		/boot/vmlinuz-2.6.38-8-generic root=UUID=a47d0f4b-fb86-4143-a047-98241b5186c7 ro quiet splash 
initrd		/boot/initrd.img-2.6.38-8-generic

title		Peppermint Two, kernel 2.6.38-8-generic (recovery mode)
uuid		a47d0f4b-fb86-4143-a047-98241b5186c7
kernel		/boot/vmlinuz-2.6.38-8-generic root=UUID=a47d0f4b-fb86-4143-a047-98241b5186c7 ro  single
initrd		/boot/initrd.img-2.6.38-8-generic

title		Chainload into GRUB 2
root		a47d0f4b-fb86-4143-a047-98241b5186c7
kernel		/boot/grub/core.img

title		Peppermint Two, memtest86+
uuid		a47d0f4b-fb86-4143-a047-98241b5186c7
kernel		/boot/memtest86+.bin

### END DEBIAN AUTOMAGIC KERNELS LIST
--------------------------------------------------------------------------------

=========================== sda1/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
  set have_grubenv=true
  load_env
fi
set default="1"
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
}

function load_video {
  insmod vbe
  insmod vga
  insmod video_bochs
  insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos1)'
search --no-floppy --fs-uuid --set=root a47d0f4b-fb86-4143-a047-98241b5186c7
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=800x600
  load_video
  insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos1)'
search --no-floppy --fs-uuid --set=root a47d0f4b-fb86-4143-a047-98241b5186c7
set locale_dir=($root)/boot/grub/locale
set lang=en_US
insmod gettext
if [ "${recordfail}" = 1 ]; then
  set timeout=-1
else
  set timeout=10
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 ###
if [ ${recordfail} != 1 ]; then
  if [ -e ${prefix}/gfxblacklist.txt ]; then
    if hwmatch ${prefix}/gfxblacklist.txt 3; then
      if [ ${match} = 0 ]; then
        set linux_gfx_mode=keep
      else
        set linux_gfx_mode=text
      fi
    else
      set linux_gfx_mode=text
    fi
  else
    set linux_gfx_mode=keep
  fi
else
  set linux_gfx_mode=text
fi
export linux_gfx_mode
if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
menuentry 'Peppermint, with Linux 2.6.38-11-generic' --class peppermint --class gnu-linux --class gnu --class os {
	recordfail
	set gfxpayload=$linux_gfx_mode
	insmod part_msdos
	insmod ext2
	set root='(/dev/sda,msdos1)'
	search --no-floppy --fs-uuid --set=root a47d0f4b-fb86-4143-a047-98241b5186c7
	linux	/boot/vmlinuz-2.6.38-11-generic root=UUID=a47d0f4b-fb86-4143-a047-98241b5186c7 ro   quiet splash vt.handoff=7
	initrd	/boot/initrd.img-2.6.38-11-generic
}
menuentry 'Peppermint, with Linux 2.6.38-11-generic (recovery mode)' --class peppermint --class gnu-linux --class gnu --class os {
	recordfail
	set gfxpayload=$linux_gfx_mode
	insmod part_msdos
	insmod ext2
	set root='(/dev/sda,msdos1)'
	search --no-floppy --fs-uuid --set=root a47d0f4b-fb86-4143-a047-98241b5186c7
	echo	'Loading Linux 2.6.38-11-generic ...'
	linux	/boot/vmlinuz-2.6.38-11-generic root=UUID=a47d0f4b-fb86-4143-a047-98241b5186c7 ro single 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-2.6.38-11-generic
}
submenu "Previous Linux versions" {
menuentry 'Peppermint, with Linux 2.6.38-8-generic' --class peppermint --class gnu-linux --class gnu --class os {
	recordfail
	set gfxpayload=$linux_gfx_mode
	insmod part_msdos
	insmod ext2
	set root='(/dev/sda,msdos1)'
	search --no-floppy --fs-uuid --set=root a47d0f4b-fb86-4143-a047-98241b5186c7
	linux	/boot/vmlinuz-2.6.38-8-generic root=UUID=a47d0f4b-fb86-4143-a047-98241b5186c7 ro   quiet splash vt.handoff=7
	initrd	/boot/initrd.img-2.6.38-8-generic
}
menuentry 'Peppermint, with Linux 2.6.38-8-generic (recovery mode)' --class peppermint --class gnu-linux --class gnu --class os {
	recordfail
	set gfxpayload=$linux_gfx_mode
	insmod part_msdos
	insmod ext2
	set root='(/dev/sda,msdos1)'
	search --no-floppy --fs-uuid --set=root a47d0f4b-fb86-4143-a047-98241b5186c7
	echo	'Loading Linux 2.6.38-8-generic ...'
	linux	/boot/vmlinuz-2.6.38-8-generic root=UUID=a47d0f4b-fb86-4143-a047-98241b5186c7 ro single 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-2.6.38-8-generic
}
}
### 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_memtest86+ ###
menuentry "Memory test (memtest86+)" {
	insmod part_msdos
	insmod ext2
	set root='(/dev/sda,msdos1)'
	search --no-floppy --fs-uuid --set=root a47d0f4b-fb86-4143-a047-98241b5186c7
	linux16	/boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
	insmod part_msdos
	insmod ext2
	set root='(/dev/sda,msdos1)'
	search --no-floppy --fs-uuid --set=root a47d0f4b-fb86-4143-a047-98241b5186c7
	linux16	/boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
if [ "x${timeout}" != "x-1" ]; then
  if keystatus; then
    if keystatus --shift; then
      set timeout=-1
    else
      set timeout=0
    fi
  else
    if sleep --interruptible 3 ; then
      set timeout=0
    fi
  fi
fi
### 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 ###
--------------------------------------------------------------------------------

=============================== sda1/etc/fstab: ================================

--------------------------------------------------------------------------------
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda1 during installation
UUID=a47d0f4b-fb86-4143-a047-98241b5186c7 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=77fc397d-6a1f-46f1-9d74-71d7bee82472 none            swap    sw              0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0
--------------------------------------------------------------------------------

=================== sda1: Location of files loaded by Grub: ====================

           GiB - GB             File                                 Fragment(s)

   8.260013580 = 8.869122048    boot/grub/core.img                             1
  12.278491974 = 13.183930368   boot/grub/grub.cfg                             1
  12.497253418 = 13.418823680   boot/grub/menu.lst                             1
   2.045509338 = 2.196348928    boot/initrd.img-2.6.38-11-generic              3
   4.336914062 = 4.656726016    boot/initrd.img-2.6.38-8-generic               2
   1.930664062 = 2.073034752    boot/vmlinuz-2.6.38-11-generic                 2
   8.258285522 = 8.867266560    boot/vmlinuz-2.6.38-8-generic                  1
   2.045509338 = 2.196348928    initrd.img                                     3
   4.336914062 = 4.656726016    initrd.img.old                                 2
   1.930664062 = 2.073034752    vmlinuz                                        2
   8.258285522 = 8.867266560    vmlinuz.old                                    1

=============================== StdErr Messages: ===============================

unlzma: Decoder error
]

IGNORE THIS POSTING - See my next entry.

At first glance I can’t see anything wrong in there. ← Oops, I should have looked harder (see next post) :wink:

Can you try holding SHIFT just after turning on the PC… when you get to the GRUB menu, let me know if the 2.6.38-8 kernel boots properly.

It will be in a submenu called “Previous Linux versions”

What I’m trying to find out is… Is this a “menu entry” issue, or is it a problem with the 2.6.38-11 kernel image itself.

So if 2.6.38-8 works… can you test if BOTH 2.6.38-11 entries take you to recovery mode.

Also, when you do a “normal” boot and it unexpectedly goes into recovery mode, can you send the output from:

uname -a

OK, found the problem

[b]set default="1"[/b]
(should read [b]set default="0"[/b])

Try running:

sudo update-grub

This should apply the changes from your /etc/default/grub file to /boot/grub/grub.cfg
including -
GRUB_DEFAULT=0

Running sudo update-grub has no effect. The system automatically starts in recovery mode on reboot.

I used the shift key as you suggested to get the GRUB menu. This highlights the recovery mode as default.

Both the present and previous versions of Linux boot fine from this menu.

The GRUB menu should be displayed by default and if this was the case it would not be such an issue as I could select the correct OS.

OK, the simple solution would be to edit /boot/grub/grub.cfg manually.

Lets take a backup first

sudo cp -v /boot/grub/grub.cfg /boot/grub/grub.cfg.bak

As long as that command works…

sudo gedit /boot/grub/grub.cfg

Find the line -

set default=“1”

and change it to

set default=“0”

SAVE the file, and reboot to test.

You should still be able to use SHIFT to select a different line if anything goes wrong.

:slight_smile: Problem solved. Thanks for your help.