Results 1 to 8 of 8

Thread: update-grub2 does not update grub.cfg

  1. #1
    Join Date
    May 2009
    Beans
    98

    update-grub2 does not update grub.cfg

    neither update-grub or update-grub2 are updating my /boot/grub/grub.cfg ? I just did a
    sudo apt-get --purge remove grub2 then
    sudo apt-get install grub2
    then
    update-grub2

    Code:
    michael@UsbDrive:~$ sudo update-grub2
    Updating /boot/grub/grub.cfg ...
    Found linux image: /boot/vmlinuz-2.6.28-18-generic
    Found initrd image: /boot/initrd.img-2.6.28-18-generic
    Found linux image: /boot/vmlinuz-2.6.28-11-generic
    Found initrd image: /boot/initrd.img-2.6.28-11-generic
    Found memtest86+ image: /boot/memtest86+.bin
    Found Microsoft Windows XP Professional on /dev/sda2
    michael@UsbDrive:~$ cat /boot/grub/grub.cfg
    cat: /boot/grub/grub.cfg: No such file or directory
    michael@UsbDrive:~$
    there is however a /boot/grub/grub.cfg.new file ... wth ?

  2. #2
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: update-grub2 does not update grub.cfg

    You can use "sudo update-grub" now for Grub2, which you said you also tried.

    However, try the direct command instead of the "stub" of update-grub:
    Code:
    sudo grub-mkconfig -o /boot/grub/grub.cfg
    Does that update the file?

    Have you checked the file permissions of /boot/grub/grub.cfg?
    New to Wayland.

    Retired.

  3. #3
    Join Date
    May 2009
    Beans
    98

    Re: update-grub2 does not update grub.cfg

    Code:
    michael@UsbDrive:~$ sudo grub-mkconfig -o /boot/grub/grub.cfg
    [sudo] password for michael: 
    sudo: grub-mkconfig: command not found
    /boot/grub/grub.cfg does not exist ... i have a copy of it though

    let me shed some more light. I'm using xubuntu 9.04 and i upgraded to grub2. It seemed to work for a while then i realized that when i edited the /etc/grub.d/40_custom and then did update-grub it would not update the /boot/grub/grub.cfg

    so i deleted the file /boot/grub/grub/.cfg just to see if maybe grub would make another ? but that didnt happen. I think it made a new grub.cfg.new idk who or why that is there ?

    if i type grub-install -v i still get v1.96 idk why ?


    Code:
    michael@UsbDrive:~$ sudo apt-get --purge remove grub2
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Package grub2 is not installed, so not removed
    The following packages were automatically installed and are no longer required:
      os-prober grub-common
    Use 'apt-get autoremove' to remove them.
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    michael@UsbDrive:~$ sudo apt-get install grub2
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following extra packages will be installed:
      grub-pc
    Suggested packages:
      desktop-base
    The following NEW packages will be installed:
      grub-pc grub2
    0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
    Need to get 1332kB/1341kB of archives.
    After this operation, 4006kB of additional disk space will be used.
    Do you want to continue [Y/n]? Y
    Get:1 http://us.archive.ubuntu.com jaunty/main grub-pc 1.96+20080724-12ubuntu2 [1332kB]
    Fetched 1332kB in 22s (58.5kB/s)                                                            
    Preconfiguring packages ...
    Selecting previously deselected package grub-pc.
    (Reading database ... 130860 files and directories currently installed.)
    Unpacking grub-pc (from .../grub-pc_1.96+20080724-12ubuntu2_i386.deb) ...
    Selecting previously deselected package grub2.
    Unpacking grub2 (from .../grub2_1.96+20080724-12ubuntu2_i386.deb) ...
    Processing triggers for man-db ...
    Setting up grub-pc (1.96+20080724-12ubuntu2) ...
    
    Setting up grub2 (1.96+20080724-12ubuntu2) ...
    
    michael@UsbDrive:~$ sudo cat /boot/grub/grub.cfg
    cat: /boot/grub/grub.cfg: No such file or directory
    Last edited by zonemikel; April 7th, 2010 at 06:08 PM.

  4. #4
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: update-grub2 does not update grub.cfg

    The package is not grub2 but grub-pc. But only if you need to totally reinstall. the sudo update-grub should update grub.cfg unless you have old grub still there and it gets confused on what to boot.

    purge old and reinstall new to sda
    sudo apt-get purge grub grub-pc grub-common
    sudo mv /boot/grub /boot/grub_backup
    sudo mkdir /boot/grub
    sudo apt-get install grub-pc grub-common

    sudo grub-install --recheck /dev/sda
    sudo update-grub
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  5. #5
    Join Date
    May 2009
    Beans
    98

    Re: update-grub2 does not update grub.cfg

    Quote Originally Posted by oldfred View Post
    The package is not grub2 but grub-pc. But only if you need to totally reinstall. the sudo update-grub should update grub.cfg unless you have old grub still there and it gets confused on what to boot.

    purge old and reinstall new to sda
    sudo apt-get purge grub grub-pc grub-common
    sudo mv /boot/grub /boot/grub_backup
    sudo mkdir /boot/grub
    sudo apt-get install grub-pc grub-common

    sudo grub-install --recheck /dev/sda
    sudo update-grub
    Thanks ! that worked ... guess i should try "purge" and not "remove" I did all you said except i installed grub2 "sudo apt-get install grub2" ... idk what was installed but what was booting my system was grub2 (the menu is different i can tell)

    thanks again

  6. #6
    Join Date
    Jul 2006
    Beans
    122

    Smile Re: update-grub2 does not update grub.cfg

    Quote Originally Posted by drs305 View Post
    You can use "sudo update-grub" now for Grub2, which you said you also tried.

    However, try the direct command instead of the "stub" of update-grub:
    Code:
    sudo grub-mkconfig -o /boot/grub/grub.cfg
    Does that update the file?

    Have you checked the file permissions of /boot/grub/grub.cfg?
    Thank you...I got a kernel update and it wouldn't show up int he grub.cfg. This fixed it.

    Thank you.

  7. #7
    Join Date
    Aug 2009
    Location
    Lake Tahoe Area
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Unhappy Re: update-grub2 does not update grub.cfg

    what can i do about:

    sudo: grub-install: command not found
    ???

  8. #8
    Join Date
    Feb 2008
    Beans
    5,055
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: update-grub2 does not update grub.cfg

    What did you actually type? You can copy/paste from Terminal into a message.

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
  •