Page 1 of 4 123 ... LastLast
Results 1 to 10 of 37

Thread: update-grub doesn't boot new kernels

  1. #1
    Join Date
    Jan 2012
    Beans
    42

    update-grub doesn't boot new kernels

    When I run update-grub, I see kernels being found, but when I reboot I do not see the latest kernels in the boot menu.

    update-grub doesn't boot new kernels

    I'm running Ubuntu 13.10; 3.11.0-13-generic #20-Ubuntu SMP Wed Oct 23 07:38:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

    I see:
    /boot/vmlinuz-3.11.0-12-generic
    /boot/vmlinuz-3.11.0-13-generic
    /boot/vmlinuz-3.11.0-13-generic.efi.signed
    /boot/vmlinuz-3.11.0-14-generic
    /boot/vmlinuz-3.11.0-14-generic.efi.signed
    /boot/vmlinuz-3.11.0-15-generic
    /boot/vmlinuz-3.11.0-15-generic.efi.signed

    in /boot/grub/grub.cfg I see e.g.:
    menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menu
    entry_id_option 'gnulinux-simple-a7c2475c-8313-4a46-892f-6264b36232bc' {
    recordfail
    load_video
    gfxmode $linux_gfx_mode
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='hd1,msdos6'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos6 --hint-
    efi=hd1,msdos6 --hint-baremetal=ahci1,msdos6 a7c2475c-8313-4a46-892f-6264b36232
    bc
    else
    search --no-floppy --fs-uuid --set=root a7c2475c-8313-4a46-892f-6264b3
    6232bc
    fi
    linux /boot/vmlinuz-3.11.0-15-generic root=UUID=a7c2475c-8313-4a46-892f-6264b36232bc ro quiet splash $vt_handoff
    initrd /boot/initrd.img-3.11.0-15-generic


    The menu shows me 3.11.0-13 and 3.11.0-12 options as well as some older kernel options from another install and another disc. I got the newer (14 and -15) kernels from updates. I would like to be able to use them.

    is update-grub just broken? Shouldn't the menu options just autmatically update when I run update-grub?

  2. #2
    Join Date
    Jun 2010
    Location
    London, England
    Beans
    8,082
    Distro
    Ubuntu Development Release

    Re: update-grub doesn't boot new kernels

    I have often found it useful to run two commands

    Code:
    sudo update-grub
    sudo grub-install /dev/sda
    Assuming that you only have one hard disk (sda). If you have a second hard disk and want Grub in the MBR of the second hard disk (sdb). Then it would be /dev/sdb. The first command updates the Grub configuration file. The second command installs Grub. I have found that the second command is needed and solves this problem.

    Regards.
    It is a machine. It is more stupid than we are. It will not stop us from doing stupid things.
    Ubuntu user #33,200. Linux user #530,530


  3. #3
    Join Date
    Mar 2011
    Beans
    587

    Re: update-grub doesn't boot new kernels

    When you have multiple installations, the grub menu is typically pulled from the last one installed. Updating the other grub.cfg file does nothing, until you rerun the grub-install, which switches the files grub uses.

  4. #4
    Join Date
    Jan 2012
    Beans
    42

    Re: update-grub doesn't boot new kernels

    O.k., the whole "use grub-install also" thing looks like a fair point. Thank you very much for the replies. Sadly, I am not quite yet enlightened enough to get it all working quite right. I am in fact running on an external (usb connected) second drive -- so grahammechanical, where mount tells me I am on /dev/sdb ( "/dev/sdb6 on / type ext4 (rw,errors=remount-ro)" ), and I'm booting from said external drive and in particular external drive's grub, I expect to be able to run "sudo grub-install /dev/sdb" and get to where I want ... but no.
    I get this sequence:
    $ sudo update-grub
    Generating grub.cfg ...
    [everything I expect -- and looks correct here]
    done

    $ sudo grub-install /dev/sdb
    source_dir doesn't exist. Please specify --target or --directory

  5. #5
    Join Date
    Apr 2009
    Location
    UK Lake District
    Beans
    3,066
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: update-grub doesn't boot new kernels

    How about we see

    Code:
    sudo fdisk -l
    Ubuntu Member Always something different. Promoting Ubuntu and System 76 at TUXPC

  6. #6
    Join Date
    Jan 2012
    Beans
    42

    Re: update-grub doesn't boot new kernels

    carl4926, thank you for your interest and responsiveness.

    fdisk -l seems a bit more than the detail needed, but no harm so here it is all the same:
    $ sudo fdisk -l
    [sudo] password for [the guy writing this posed question]:

    Disk /dev/sda: 750.2 GB, 750156374016 bytes
    255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disk identifier: 0x0001478d

    Device Boot Start End Blocks Id System
    /dev/sda1 * 2048 651013822 325505887+ 83 Linux
    /dev/sda2 651014142 1465147391 407066625 5 Extended
    Partition 2 does not start on physical sector boundary.
    /dev/sda5 1431824384 1465147391 16661504 82 Linux swap / Solaris
    /dev/sda6 651014144 1431824383 390405120 83 Linux

    Partition table entries are not in disk order

    Disk /dev/sdb: 500.1 GB, 500074283008 bytes
    255 heads, 63 sectors/track, 60797 cylinders, total 976707584 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x000b1726

    Device Boot Start End Blocks Id System
    /dev/sdb1 * 2048 161263318 80630635+ 83 Linux
    /dev/sdb2 161263614 976705535 407720961 5 Extended
    /dev/sdb5 943382528 976705535 16661504 82 Linux swap / Solaris
    /dev/sdb6 161263616 935823359 387279872 83 Linux
    /dev/sdb7 935825408 943368191 3771392 82 Linux swap / Solaris

    Partition table entries are not in disk order

  7. #7
    Join Date
    Apr 2009
    Location
    UK Lake District
    Beans
    3,066
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: update-grub doesn't boot new kernels

    So you have 2 HDD's and I assume a couple of Linux installations

    The way to manage this is already described. From your running Ubuntu installation:

    Code:
    sudo update-grub
    Code:
    sudo grub-install /dev/sda
    What is the other Linux OS?
    Ubuntu Member Always something different. Promoting Ubuntu and System 76 at TUXPC

  8. #8
    Join Date
    Jan 2012
    Beans
    42

    Re: update-grub doesn't boot new kernels

    carl4926, thank you again for your advice.

    The thing I don't like about grub-install on /dev/sda is I want to be able to boot my external drive from other machines as well. I'm assuming here that grub-install /dev/sda will install on my internal drive and not affect the external drive. I am already booting off of the external drive and I intend to leave the internal drive alone.

    I don't see that what is on the internal drive matters given my use case, but again it doesn't hurt for me to mention either -- the internal drive has 12.04 32 bit and a botched 12.04 64-bit, or something like that. I have a whole different set of things going on there and I intend to leave that well alone.

    ... so the question remains, how to I update the grub on /dev/sdb?

  9. #9
    Join Date
    Apr 2009
    Location
    UK Lake District
    Beans
    3,066
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: update-grub doesn't boot new kernels

    Is sda 750 GB internal or external
    Is sdb 500 GB internal or external

    Are there any other HD's in play at all?

    So to be clear
    As I read: sda is Ub 12.04 and I think internal

    sdb could be 13.10 and possibly external (USB?)
    Ubuntu Member Always something different. Promoting Ubuntu and System 76 at TUXPC

  10. #10
    Join Date
    Jan 2012
    Beans
    42

    Re: update-grub doesn't boot new kernels

    Seems like you are clear. sda is internal, and I believe it is 750G. sdb is external and looks like it is about 500G by what I've already shown.
    To be more clear, I don't care about what is on sda for the purposes of this post.
    I'm looking to be able to boot into the newer kernels on sdb FROM sdb when booting through grub on sdb.
    On another system, sda may have something entirely different, and I would like to boot from this external drive there -- into the NEWER kernels.
    I'm already able to boot from sdb into the older kernels (on another system with a single internal hard drive as well).

    Something beyond the scope of this initial post is another question:
    If the system I have attached the external drive to has more than one internal drive, what do I have to do to boot into my external drive if I am using the external drive grub and I would like to be able to boot from the external drive on systems with one internal drive also? ... but I suppose I should just make a separate post for that.

Page 1 of 4 123 ... LastLast

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
  •