grub not showing different kernel options

5,154

Solution 1

Update/Repair/Install Linux Grub using command


"grub2-install /dev/sda" or "grub-install /dev/sda"

where sda is your hard disk drive. if it successfully completed the command then it's done else try to mount that OS directories by booting from external pen drive with same Linux OS. and then try following command from link http://howtoubuntu.org/how-to-repair-restore-reinstall-grub-2-with-a-ubuntu-live-cd.

Solution 2

Probably need to update the GRUB2 configuration:

sudo grub2-mkconfig -o /boot/grub2/grub.cfg

Note: The "make configuration" command and configuration file location may vary.

The settings files that control what configuration is made, are:

  • /etc/grub.d (individual, in-order)
  • /etc/default/grub (general)

From /etc/grub.d/README:

All executable files in this directory are processed in shell expansion order.

00_*: Reserved for 00_header.
10_*: Native boot entries.
20_*: Third party apps (e.g. memtest86+).

The number namespace in-between is configurable by system installer and/or administrator. For example, you can add an entry to boot another OS as 01_otheros, 11_otheros, etc, depending on the position you want it to occupy in the menu; and then adjust the default setting via /etc/default/grub.

Share:
5,154

Related videos on Youtube

user2851669
Author by

user2851669

Updated on September 18, 2022

Comments

  • user2851669
    user2851669 almost 2 years

    I have done a sudo update-grub and it gives the following output -

    Generating grub configuration file ...
    Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
    Found linux image: /boot/vmlinuz-4.0.0-rc1-xia
    Found initrd image: /boot/initrd.img-4.0.0-rc1-xia
    Found linux image: /boot/vmlinuz-3.13.0-24-generic
    Found initrd image: /boot/initrd.img-3.13.0-24-generic
    Found memtest86+ image: /boot/memtest86+.elf
    Found memtest86+ image: /boot/memtest86+.bin
    done
    

    On doing a dpkg --list | grep linux-image, following is the output -

    ii  linux-image-3.13.0-24-generic                         3.13.0-24.46                                        amd64        Linux kernel image for version 3.13.0 on 64 bit x86 SMP
    ii  linux-image-4.0.0-rc1-xia                             05                                                  amd64        Linux kernel binary image for version 4.0.0-rc1-xia
    ii  linux-image-extra-3.13.0-24-generic                   3.13.0-24.46                                        amd64        Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
    ii  linux-image-generic                                   3.13.0.24.28                                        amd64        Generic Linux kernel image
    

    Even though the kerenl image is present, it simply boots the old linux image and doesn't show the list of kernels present. How can I get the options menu at the boot of the system.

    EDIT Here is my grub file -

    # 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=0
    GRUB_HIDDEN_TIMEOUT_QUIET=true
    GRUB_TIMEOUT=10
    
    GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
    GRUB_CMDLINE_LINUX=""
    
    # 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"
    
    • Kevin
      Kevin over 8 years
      What distribution (and version) are you using? (I see from the configuration file, that it may be Debian or debian-based. I am less familiar with those.)
  • user2851669
    user2851669 over 8 years
    Tried it, still can't get an option during boot
  • styrofoam fly
    styrofoam fly about 7 years
    Is that sdb a spelling mistake?