Find the answer to your Linux question:
Results 1 to 6 of 6
Hi All, I'm having an issue where a system is locking up. I suspect it's the kernel so I installed an older kernel. when I do grub-update it lists the ...
  1. #1
    Linux Guru jmadero's Avatar
    Join Date
    Jul 2007
    Location
    California
    Posts
    1,958

    Grub Not Listing Old Kernels

    Hi All,

    I'm having an issue where a system is locking up. I suspect it's the kernel so I installed an older kernel. when I do grub-update it lists the old kernel, along with my new one, memtest and XP. When I reboot the old kernel doesn't show up in my list. Any ideas? Thanks in advance
    Bodhi 1.3 & Bodhi 1.4 using E17
    Dell Studio 17, Intel Graphics card, 4 gigs of RAM, E17

    "The beauty in life can only be found by moving past the materialism which defines human nature and into the higher realm of thought and knowledge"

  2. #2
    Linux Guru
    Join Date
    May 2011
    Posts
    1,838
    Have you had a look at the grub config file? Post the contents of it here so we can help, if you don't figure it out by looking at it.

  3. #3
    Linux Guru jmadero's Avatar
    Join Date
    Jul 2007
    Location
    California
    Posts
    1,958
    Everything looks like it's in there, just not listing during startup

    Code:
    #
    # 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="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 recordfail {
      set recordfail=1
      if [ -n ${have_grubenv} ]; then if [ -z ${boot_once} ]; then save_env recordfail; fi; fi
    }
    insmod ext2
    set root='(hd0,7)'
    search --no-floppy --fs-uuid --set 56b374d4-6250-4092-aa3f-d6ad6012182b
    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,7)'
    search --no-floppy --fs-uuid --set 56b374d4-6250-4092-aa3f-d6ad6012182b
    set locale_dir=($root)/boot/grub/locale
    set lang=en
    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 ###
    insmod ext2
    set root='(hd0,7)'
    search --no-floppy --fs-uuid --set 56b374d4-6250-4092-aa3f-d6ad6012182b
    insmod png
    if background_image /usr/share/backgrounds/grub.png ; then
      set color_normal=black/black
      set color_highlight=magenta/black
    else
      set menu_color_normal=white/black
      set menu_color_highlight=black/light-gray
    fi
    ### END /etc/grub.d/05_debian_theme ###
    
    ### BEGIN /etc/grub.d/10_linux ###
    menuentry 'Bodhi Linux, with Linux 3.0.0-12-generic' --class bodhi --class gnu-linux --class gnu --class os {
    	recordfail
    	insmod ext2
    	set root='(hd0,7)'
    	search --no-floppy --fs-uuid --set 56b374d4-6250-4092-aa3f-d6ad6012182b
    	linux	/boot/vmlinuz-3.0.0-12-generic root=UUID=56b374d4-6250-4092-aa3f-d6ad6012182b ro   splash quiet pcie_aspm=force
    	initrd	/boot/initrd.img-3.0.0-12-generic
    }
    menuentry 'Bodhi Linux, with Linux 3.0.0-12-generic (recovery mode)' --class bodhi --class gnu-linux --class gnu --class os {
    	recordfail
    	insmod ext2
    	set root='(hd0,7)'
    	search --no-floppy --fs-uuid --set 56b374d4-6250-4092-aa3f-d6ad6012182b
    	echo	'Loading Linux 3.0.0-12-generic ...'
    	linux	/boot/vmlinuz-3.0.0-12-generic root=UUID=56b374d4-6250-4092-aa3f-d6ad6012182b ro single 
    	echo	'Loading initial ramdisk ...'
    	initrd	/boot/initrd.img-3.0.0-12-generic
    }
    ### END /etc/grub.d/10_linux ###
    
    ### BEGIN /etc/grub.d/20_memtest86+ ###
    menuentry "Memory test (memtest86+)" {
    	insmod ext2
    	set root='(hd0,7)'
    	search --no-floppy --fs-uuid --set 56b374d4-6250-4092-aa3f-d6ad6012182b
    	linux16	/boot/memtest86+.bin
    }
    menuentry "Memory test (memtest86+, serial console 115200)" {
    	insmod ext2
    	set root='(hd0,7)'
    	search --no-floppy --fs-uuid --set 56b374d4-6250-4092-aa3f-d6ad6012182b
    	linux16	/boot/memtest86+.bin console=ttyS0,115200n8
    }
    ### END /etc/grub.d/20_memtest86+ ###
    
    ### BEGIN /etc/grub.d/30_os-prober ###
    menuentry "Ubuntu, with Linux 3.2.0-030200-generic (on /dev/sda1)" {
    	insmod ext2
    	set root='(hd0,1)'
    	search --no-floppy --fs-uuid --set 49e485fa-6ac4-4083-903e-b97d11aea1ab
    	linux /boot/vmlinuz-3.2.0-030200-generic root=UUID=49e485fa-6ac4-4083-903e-b97d11aea1ab ro quiet splash vt.handoff=7
    	initrd /boot/initrd.img-3.2.0-030200-generic
    }
    menuentry "Ubuntu, with Linux 3.2.0-030200-generic (recovery mode) (on /dev/sda1)" {
    	insmod ext2
    	set root='(hd0,1)'
    	search --no-floppy --fs-uuid --set 49e485fa-6ac4-4083-903e-b97d11aea1ab
    	linux /boot/vmlinuz-3.2.0-030200-generic root=UUID=49e485fa-6ac4-4083-903e-b97d11aea1ab ro recovery nomodeset
    	initrd /boot/initrd.img-3.2.0-030200-generic
    }
    menuentry "Ubuntu, with Linux 3.0.0-14-generic (on /dev/sda1)" {
    	insmod ext2
    	set root='(hd0,1)'
    	search --no-floppy --fs-uuid --set 49e485fa-6ac4-4083-903e-b97d11aea1ab
    	linux /boot/vmlinuz-3.0.0-14-generic root=UUID=49e485fa-6ac4-4083-903e-b97d11aea1ab ro quiet splash vt.handoff=7
    	initrd /boot/initrd.img-3.0.0-14-generic
    }
    menuentry "Ubuntu, with Linux 3.0.0-14-generic (recovery mode) (on /dev/sda1)" {
    	insmod ext2
    	set root='(hd0,1)'
    	search --no-floppy --fs-uuid --set 49e485fa-6ac4-4083-903e-b97d11aea1ab
    	linux /boot/vmlinuz-3.0.0-14-generic root=UUID=49e485fa-6ac4-4083-903e-b97d11aea1ab ro recovery nomodeset
    	initrd /boot/initrd.img-3.0.0-14-generic
    }
    menuentry "Ubuntu, with Linux 3.0.0-12-generic (on /dev/sda1)" {
    	insmod ext2
    	set root='(hd0,1)'
    	search --no-floppy --fs-uuid --set 49e485fa-6ac4-4083-903e-b97d11aea1ab
    	linux /boot/vmlinuz-3.0.0-12-generic root=UUID=49e485fa-6ac4-4083-903e-b97d11aea1ab ro quiet splash vt.handoff=7
    	initrd /boot/initrd.img-3.0.0-12-generic
    }
    menuentry "Ubuntu, with Linux 3.0.0-12-generic (recovery mode) (on /dev/sda1)" {
    	insmod ext2
    	set root='(hd0,1)'
    	search --no-floppy --fs-uuid --set 49e485fa-6ac4-4083-903e-b97d11aea1ab
    	linux /boot/vmlinuz-3.0.0-12-generic root=UUID=49e485fa-6ac4-4083-903e-b97d11aea1ab ro recovery nomodeset
    	initrd /boot/initrd.img-3.0.0-12-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 ###
    Bodhi 1.3 & Bodhi 1.4 using E17
    Dell Studio 17, Intel Graphics card, 4 gigs of RAM, E17

    "The beauty in life can only be found by moving past the materialism which defines human nature and into the higher realm of thought and knowledge"

  4. #4
    Linux Guru
    Join Date
    May 2011
    Posts
    1,838
    Do you mean update-grub (versus grub-update)? technically, sudo update-grub

  5. #5
    Linux Guru jmadero's Avatar
    Join Date
    Jul 2007
    Location
    California
    Posts
    1,958
    Yes you are correct. My issue is that from my understanding grub2 automatically hides old kernels (even if you upgrade through package manager), I'm not sure about this logic as it makes it hard to keep track of what kernels are installed. I remember on my system (which is actually the grub.cfg posted, I posted the wrong one, will fix that this evening) that I had a similar issue but I had to take an extra step for the listings to show. Now of course I forget that extra step
    Bodhi 1.3 & Bodhi 1.4 using E17
    Dell Studio 17, Intel Graphics card, 4 gigs of RAM, E17

    "The beauty in life can only be found by moving past the materialism which defines human nature and into the higher realm of thought and knowledge"

  6. #6
    Trusted Penguin elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    2,298
    Make sure that the script files in /etc/grub.d that relate to the missing kernels are marked as executable and then re-run
    Code:
    sudo update-grub
    If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)


    My new blog. It's probably not as good as I think it is.

Posting Permissions

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