Results 1 to 10 of 10

Thread: recovery menu shows up with every boot

  1. #1
    Join Date
    Mar 2013
    Beans
    5

    recovery menu shows up with every boot

    Hi,

    I have Ubuntu 12.04, everytime I turn on the machine and choose to boot linux I get the following recovery menu
    2013-03-02 14.41.09.jpg

    When I choose to resume, I get the following message

    2013-03-02 14.41.18.jpg

    Then everything becomes normal and I can log in to my user account. But there's a problem with doing updates for example, probably due to limited permissions on the file system?

    I can't really figure out what's the problem ( or how to solve it ofcourse )

    Any help would be appreciated.

    Thanks
    Last edited by kidmanos; March 2nd, 2013 at 01:57 PM.

  2. #2
    Join Date
    May 2010
    Location
    Tewkesbury uk
    Beans
    7,882
    Distro
    Ubuntu Development Release

    Re: recovery menu shows up with every boot

    Hi

    You are not getting the option to boot into a non recovery kernel ?

    Boot as normally and when you get the menu in your first screen shot above, scroll down and select the "drop to a root shell" option (or something similar).

    When at the root shell type,

    Code:
    update-grub
    Wait for grub to chug away and when it has finished type

    Code:
    reboot
    Does it still take you directly to the recovery menu or allow you a normal boot ?

    Kind regards
    If you believe everything you read, you better not read. ~ Japanese Proverb

    If you don't read the newspaper, you're uninformed. If you read the newspaper, you're mis-informed. - Mark Twain

  3. #3
    Join Date
    Mar 2013
    Beans
    5

    Re: recovery menu shows up with every boot

    Quote Originally Posted by matt_symes View Post
    Hi

    You are not getting the option to boot into a non recovery kernel ?

    Boot as normally and when you get the menu in your first screen shot above, scroll down and select the "drop to a root shell" option (or something similar).

    When at the root shell type,

    Code:
    update-grub
    Wait for grub to chug away and when it has finished type

    Code:
    reboot
    Does it still take you directly to the recovery menu or allow you a normal boot ?

    Kind regards
    Hi matt,

    I tried "drop to a root sheel" but I got this error:
    /usr/sbin/grub-mkconfig: 258: /usr/sbin/grub-mkconfig: cannot create /boot/grub/grub.cfg.new: Read-only file system

    But it didn't work, still got the recovery menu.

    So I tried logging into linux, opening a terminal, su root and it seems that the command works:
    Generating grub.cfg ...
    Found linux image: /boot/vmlinuz-3.2.0-37-generic
    Found initrd image: /boot/initrd.img-3.2.0-37-generic
    Found linux image: /boot/vmlinuz-3.2.0-36-generic
    Found initrd image: /boot/initrd.img-3.2.0-36-generic
    Found linux image: /boot/vmlinuz-3.2.0-35-generic
    Found initrd image: /boot/initrd.img-3.2.0-35-generic
    Found linux image: /boot/vmlinuz-2.6.32-39-generic
    Found initrd image: /boot/initrd.img-2.6.32-39-generic
    Found Windows Recovery Environment (loader) on /dev/sda1
    Skipping Windows Recovery Environment (loader) on Wubi system
    Found Windows 7 (loader) on /dev/sda2
    Skipping Windows 7 (loader) on Wubi system
    done

    But still, the recovery menu is displayed when booting.

  4. #4
    Join Date
    May 2010
    Location
    Tewkesbury uk
    Beans
    7,882
    Distro
    Ubuntu Development Release

    Re: recovery menu shows up with every boot

    Hi

    Oh yeah. I forgot that a recovery root shell now mounts the root partition as read only.

    Unfortunately su will not have made any difference.

    Boot into the root shell as before and this time type

    Code:
    mount -o remount,rw /
    Code:
    update-grub
    Code:
    reboot
    EDIT: Discard above as i have just read this bit

    So I tried logging into linux, opening a terminal, su root and it seems that the command works:
    Kind regards
    Last edited by matt_symes; March 2nd, 2013 at 03:34 PM.
    If you believe everything you read, you better not read. ~ Japanese Proverb

    If you don't read the newspaper, you're uninformed. If you read the newspaper, you're mis-informed. - Mark Twain

  5. #5
    Join Date
    May 2010
    Location
    Tewkesbury uk
    Beans
    7,882
    Distro
    Ubuntu Development Release

    Re: recovery menu shows up with every boot

    HiL

    Let's have a look to see exactly what is being generated by update-grub.

    Press ALT + F2 and type

    Code:
    gedit /boot/grub/grub.cfg
    Post the output of that file back here.

    Kind regards
    If you believe everything you read, you better not read. ~ Japanese Proverb

    If you don't read the newspaper, you're uninformed. If you read the newspaper, you're mis-informed. - Mark Twain

  6. #6
    Join Date
    Mar 2013
    Beans
    5

    Re: recovery menu shows up with every boot

    Quote Originally Posted by matt_symes View Post
    HiL

    Let's have a look to see exactly what is being generated by update-grub.

    Press ALT + F2 and type

    Code:
    gedit /boot/grub/grub.cfg
    Post the output of that file back here.

    Kind regards
    Hi matt,

    thanks for following up

    #
    # 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 ntfs
    set root='(hd0,msdos6)'
    search --no-floppy --fs-uuid --set=root 9456C0A956C08E04
    loopback loop0 /ubuntu/disks/root.disk
    set root=(loop0)
    if loadfont /usr/share/grub/unicode.pf2 ; then
    set gfxmode=auto
    load_video
    insmod gfxterm
    insmod part_msdos
    insmod ntfs
    set root='(hd0,msdos6)'
    search --no-floppy --fs-uuid --set=root 9456C0A956C08E04
    loopback loop0 /ubuntu/disks/root.disk
    set root=(loop0)
    set locale_dir=($root)/boot/grub/locale
    set lang=en_US
    insmod gettext
    fi
    terminal_output gfxterm
    if [ "${recordfail}" = 1 ]; then
    set timeout=-1
    else
    set timeout=5
    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
    if background_color 44,0,30; then
    clear
    fi
    ### END /etc/grub.d/05_debian_theme ###


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


    ### BEGIN /etc/grub.d/10_lupin ###
    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 'Ubuntu, with Linux 3.2.0-37-generic' --class ubuntu --class gnu-linux --class gnu --class os {
    set gfxpayload=$linux_gfx_mode
    insmod part_msdos
    insmod ntfs
    set root='(hd0,msdos6)'
    search --no-floppy --fs-uuid --set=root 9456C0A956C08E04
    loopback loop0 /ubuntu/disks/root.disk
    set root=(loop0)
    linux /boot/vmlinuz-3.2.0-37-generic root=UUID=9456C0A956C08E04 loop=/ubuntu/disks/root.disk ro quiet splash vt.handoff=7
    initrd /boot/initrd.img-3.2.0-37-generic
    }
    menuentry 'Ubuntu, with Linux 3.2.0-37-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    insmod part_msdos
    insmod ntfs
    set root='(hd0,msdos6)'
    search --no-floppy --fs-uuid --set=root 9456C0A956C08E04
    loopback loop0 /ubuntu/disks/root.disk
    set root=(loop0)
    echo 'Loading Linux 3.2.0-37-generic ...'
    linux /boot/vmlinuz-3.2.0-37-generic root=UUID=9456C0A956C08E04 loop=/ubuntu/disks/root.disk ro recovery nomodeset
    echo 'Loading initial ramdisk ...'
    initrd /boot/initrd.img-3.2.0-37-generic
    }
    submenu "Previous Linux versions" {
    menuentry 'Ubuntu, with Linux 3.2.0-36-generic' --class ubuntu --class gnu-linux --class gnu --class os {
    set gfxpayload=$linux_gfx_mode
    insmod part_msdos
    insmod ntfs
    set root='(hd0,msdos6)'
    search --no-floppy --fs-uuid --set=root 9456C0A956C08E04
    loopback loop0 /ubuntu/disks/root.disk
    set root=(loop0)
    linux /boot/vmlinuz-3.2.0-36-generic root=UUID=9456C0A956C08E04 loop=/ubuntu/disks/root.disk ro quiet splash vt.handoff=7
    initrd /boot/initrd.img-3.2.0-36-generic
    }
    menuentry 'Ubuntu, with Linux 3.2.0-36-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    insmod part_msdos
    insmod ntfs
    set root='(hd0,msdos6)'
    search --no-floppy --fs-uuid --set=root 9456C0A956C08E04
    loopback loop0 /ubuntu/disks/root.disk
    set root=(loop0)
    echo 'Loading Linux 3.2.0-36-generic ...'
    linux /boot/vmlinuz-3.2.0-36-generic root=UUID=9456C0A956C08E04 loop=/ubuntu/disks/root.disk ro recovery nomodeset
    echo 'Loading initial ramdisk ...'
    initrd /boot/initrd.img-3.2.0-36-generic
    }
    menuentry 'Ubuntu, with Linux 3.2.0-35-generic' --class ubuntu --class gnu-linux --class gnu --class os {
    set gfxpayload=$linux_gfx_mode
    insmod part_msdos
    insmod ntfs
    set root='(hd0,msdos6)'
    search --no-floppy --fs-uuid --set=root 9456C0A956C08E04
    loopback loop0 /ubuntu/disks/root.disk
    set root=(loop0)
    linux /boot/vmlinuz-3.2.0-35-generic root=UUID=9456C0A956C08E04 loop=/ubuntu/disks/root.disk ro quiet splash vt.handoff=7
    initrd /boot/initrd.img-3.2.0-35-generic
    }
    menuentry 'Ubuntu, with Linux 3.2.0-35-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    insmod part_msdos
    insmod ntfs
    set root='(hd0,msdos6)'
    search --no-floppy --fs-uuid --set=root 9456C0A956C08E04
    loopback loop0 /ubuntu/disks/root.disk
    set root=(loop0)
    echo 'Loading Linux 3.2.0-35-generic ...'
    linux /boot/vmlinuz-3.2.0-35-generic root=UUID=9456C0A956C08E04 loop=/ubuntu/disks/root.disk ro recovery nomodeset
    echo 'Loading initial ramdisk ...'
    initrd /boot/initrd.img-3.2.0-35-generic
    }
    menuentry 'Ubuntu, with Linux 2.6.32-39-generic' --class ubuntu --class gnu-linux --class gnu --class os {
    set gfxpayload=$linux_gfx_mode
    insmod part_msdos
    insmod ntfs
    set root='(hd0,msdos6)'
    search --no-floppy --fs-uuid --set=root 9456C0A956C08E04
    loopback loop0 /ubuntu/disks/root.disk
    set root=(loop0)
    linux /boot/vmlinuz-2.6.32-39-generic root=UUID=9456C0A956C08E04 loop=/ubuntu/disks/root.disk ro quiet splash vt.handoff=7
    initrd /boot/initrd.img-2.6.32-39-generic
    }
    menuentry 'Ubuntu, with Linux 2.6.32-39-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    insmod part_msdos
    insmod ntfs
    set root='(hd0,msdos6)'
    search --no-floppy --fs-uuid --set=root 9456C0A956C08E04
    loopback loop0 /ubuntu/disks/root.disk
    set root=(loop0)
    echo 'Loading Linux 2.6.32-39-generic ...'
    linux /boot/vmlinuz-2.6.32-39-generic root=UUID=9456C0A956C08E04 loop=/ubuntu/disks/root.disk ro recovery nomodeset
    echo 'Loading initial ramdisk ...'
    initrd /boot/initrd.img-2.6.32-39-generic
    }
    }
    ### END /etc/grub.d/10_lupin ###


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


    ### BEGIN /etc/grub.d/20_memtest86+ ###
    ### 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/30_uefi-firmware ###
    ### END /etc/grub.d/30_uefi-firmware ###


    ### 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 ###

  7. #7
    Join Date
    Feb 2013
    Beans
    Hidden!

    Re: recovery menu shows up with every boot

    This:
    Code:
    set default="1"
    Please, look at the output of
    Code:
    grep ^GRUB_DEFAULT /etc/default/grub
    Grub should default to the 0th menu entry. If it doesn't then please run
    Code:
    sudo sed -i '/^GRUB_DEFAULT=/s/=.*/=0/'
    sudo update-grub
    Last edited by schragge; March 2nd, 2013 at 03:12 PM.

  8. #8
    Join Date
    Mar 2013
    Beans
    5

    Re: recovery menu shows up with every boot

    Quote Originally Posted by schragge View Post
    This:
    Code:
    set default="1"
    Please, look at the output of
    Code:
    grep ^GRUB_DEFAULT /etc/default/grub
    Grub should default to the 0th menu entry. If it doesn't then please run
    Code:
    sudo sed -i '/^GRUB_DEFAULT=/s/=.*/=0/'
    sudo update-grub
    Thanks schragge!

    This solved the problem. Will go look up what is the difference between /etc/default/grub and /boot/grub/grub.cfg and also what would change the default choice to 1 permanently

  9. #9
    Join Date
    Feb 2013
    Beans
    Hidden!

    Re: recovery menu shows up with every boot

    Well, sudo update-grub runs each time there's a new kernel or grub update. It gets default values from /etc/default/grub and generates new /boot/grub/grub.cfg using them. Any changes to /etc/default/grub are usually done either manually or through Grub Customizer. Have you been using Grub Customizer lately?

  10. #10
    Join Date
    Mar 2013
    Beans
    5

    Re: recovery menu shows up with every boot

    Quote Originally Posted by schragge View Post
    Well, sudo update-grub runs each time there's a new kernel or grub update. It gets default values from /etc/default/grub and generates new /boot/grub/grub.cfg using them. Any changes to /etc/default/grub are usually done either manually or through Grub Customizer. Have you been using Grub Customizer lately?
    nope never. I think this started after I powered off the machine while it is was shutting down...not sure really

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •