Results 1 to 7 of 7

Thread: new 12.04 install grub 2 boot problem

  1. #1
    Join Date
    Mar 2008
    Location
    USA, WA
    Beans
    79
    Distro
    Kubuntu

    Unhappy new 12.04 install grub 2 boot problem

    I just installed a fresh Ubuntu 12.04 and during install selected to have grub put on it's own partition for the boot device since I use the Windows 7 boot manager for my booting. I also boot Ubuntu version 10.04 with the 7 and 12.04. I use Easy BCD to configure the boot menu, and did add in my new 12.04, but when I select it to boot it re-directs to the 10.04 grub menu. So I added the 12.04 in the neo-grub option in Easy BCD which now does boot up 12.04. I did try to run; grub-install /dev/sda7 in a terminal which failed due to the use of blocklists. The 12.04 is on sda7, 10.04 on sda6, and windows 7 is on sda1. So how can I install a working grub 2 onto the root partition of 12.04 so it can be booted directly ?

  2. #2
    Join Date
    Mar 2011
    Location
    Germany
    Beans
    315
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: new 12.04 install grub 2 boot problem

    Hello, James2b.

    About forcing Grub to install into the boot sector of a partition:

    Code:
    sudo grub-install --verbose --force /dev/sda7
    This will force Grub to install into the boot sector of the partition /dev/sda7.


    About limits imposed by EasyBCD

    To the best of my knowledge (based on my own experience) EasyBCD will only see and add to the Windows bootmgr boot menu a single Linux installation.
    By default this will be the first Linux installation on the disk. But as you have found out, it can also be the second one.

    Your setup seems to be pretty similar to mine (except for the versions and the exact partition numbers):
    (1) Windows 7 on /dev/sda1
    (2) Ubuntu 12.04.1 on /dev/sda5
    (3) Linux Mint 13 on /dev/sda6

    By using EasyBCD booting Linux Mint - second Linux installation - would work like this:
    (1) Windows bootmgr chain boots the boot sector of /dev/sda5
    (2) This brings up the Ubuntu 12.04 Grub boot menu
    (3) From where Mint is selected and launched by the Ubuntu 12.04 Grub


    Workarounds:

    1. The easiest way out of this situation is by installing Grub2 into the MBR of /dev/sda and by making the Grub menu offer to launch all 3 OSes.
      A simple
      Code:
      sudo update-grub
      should be sufficient to achieve the goal.
    2. The more complicated way is by making the Windows bootmgr do this job.
      • It is more complicated, because Windows bootmgr cannot pass control to Linux Grub. Instead it has to chainload the boot sectors of /dev/sda5 or /dev/sda7.
      • bootmgr cannot address /dev/sda5 or /dev/sda7 because Windows does not understand ext4 filesystems. So we have to create copies of the 2 boot sectors of /dev/sda5 and /dev/sda7, put the copies as files on drive C:
      • Finally, we need to add the 2 boot options to the Windows boot menu manually telling bootmgr to chainload the 2 boot sectors. (EasyBCD cannot do so.)


    This reads much more complicated than it really is.
    Basically for each Linux distribution which you want to add to the Windows 7 boot menu you follow these steps carefully:
    Howto boot Linux from Windows 7 Boot Manager
    (Make sure you modify the given commands to match your environment or you may mess up your Windows boot menu.)

    Kind regards,
    Karl
    Last edited by Karlchen; December 2nd, 2012 at 04:06 PM.
    Enlightened by Lucid Lynx, enchanted by Maya Mint, trusting the Tahr.

  3. #3
    Join Date
    Jun 2009
    Location
    Chicago Suburbs
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: new 12.04 install grub 2 boot problem

    While a few report EasyBCD works, understand that with grub2 using blocklists you may have issues with grub.

    Grub normally has code to search for the rest of grub in the partition with /boot where the rest of grub is. But when using blocklists it has to hard code the address on the drive where the code is. Then if the code moves from an update or even a fsck then grub is broken and will need a reinstall.

    So it works, but be prepared to reinstall grub after major updates as you have a workaround to use EasyBCD.
    For info on UEFI boot install & repair:
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to close thread when/if answered completely.







  4. #4
    Join Date
    Mar 2008
    Location
    USA, WA
    Beans
    79
    Distro
    Kubuntu

    Smile Re: new 12.04 install grub 2 boot problem

    Okay thank you for that. I can now boot my new 12.04 with the neo-grub option in the Easy BCD, which brings up the Ubuntu 12.04 grub2 menu. I also added in a chainload boot from the 10.4 to the 12.04, which I will attempt, and then try that force install if needed.

  5. #5
    Join Date
    Mar 2008
    Location
    USA, WA
    Beans
    79
    Distro
    Kubuntu

    Smile Re: new 12.04 install grub 2 boot problem

    Yes I can now chainload to the 12.04 grub, from the 10.04 grub 2, and does show the 12.04 boot options and my others too.

  6. #6
    Join Date
    Mar 2008
    Location
    USA, WA
    Beans
    79
    Distro
    Kubuntu

    Smile Re: new 12.04 install grub 2 boot problem

    I ran that boot info script tool, and here it is;

    Code:
     Boot Info Script 0.61      [1 April 2012]
    
    
    ============================= Boot Info Summary: ===============================
    
     => Windows is installed in the MBR of /dev/sda.
     => Grub2 (v1.97-1.98) is installed in the MBR of /dev/sdb and looks at sector 
        1 of the same hard drive for core.img. core.img is at this location and 
        looks in partition 3 for /boot/grub.
    
    sda1: __________________________________________________________________________
    
        File system:       ntfs
        Boot sector type:  Windows Vista/7: NTFS
        Boot sector info:  No errors found in the Boot Parameter Block.
        Operating System:  Windows Vista
        Boot files:        /NST/menu.lst /boot.ini /bootmgr /Boot/BCD 
                           /Windows/System32/winload.exe /ntldr /NTDETECT.COM
    
    sda2: __________________________________________________________________________
    
        File system:       ntfs
        Boot sector type:  Windows XP: NTFS
        Boot sector info:  No errors found in the Boot Parameter Block.
        Operating System:  Windows XP
        Boot files:        /boot.ini /ntldr /NTDETECT.COM
    
    sda3: __________________________________________________________________________
    
        File system:       ntfs
        Boot sector type:  Windows Vista/7: NTFS
        Boot sector info:  No errors found in the Boot Parameter Block.
        Operating System:  Windows 7
        Boot files:        /Windows/System32/winload.exe
    
    sda4: __________________________________________________________________________
    
        File system:       Extended Partition
        Boot sector type:  -
        Boot sector info: 
    
    sda5: __________________________________________________________________________
    
        File system:       swap
        Boot sector type:  -
        Boot sector info: 
    
    sda6: __________________________________________________________________________
    
        File system:       ext4
        Boot sector type:  Grub2 (v1.97-1.98)
        Boot sector info:  Grub2 (v1.97-1.98) is installed in the boot sector of 
                           sda6 and looks at sector 367314739 of the same hard 
                           drive for core.img. core.img is at this location and 
                           looks in partition 6 for /boot/grub.
        Operating System:  Ubuntu 10.04.4 LTS
        Boot files:        /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img
    
    sda7: __________________________________________________________________________
    
        File system:       ext4
        Boot sector type:  Grub2 (v1.99)
        Boot sector info:  Grub2 (v1.99) is installed in the boot sector of sda7 
                           and looks at sector 416062001 of the same hard drive 
                           for core.img. core.img is at this location and looks 
                           for (,msdos7)/boot/grub on this drive.
        Operating System:  Ubuntu 12.04.1 LTS
        Boot files:        /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img
    
    sda8: __________________________________________________________________________
    
        File system:       ext2
        Boot sector type:  -
        Boot sector info: 
        Operating System:  
        Boot files:        
    
    sda9: __________________________________________________________________________
    
        File system:       ext2
        Boot sector type:  -
        Boot sector info: 
        Operating System:  
        Boot files:        
    
    sda10: _________________________________________________________________________
    
        File system:       ntfs
        Boot sector type:  Windows Vista/7: NTFS
        Boot sector info:  No errors found in the Boot Parameter Block.
        Operating System:  
        Boot files:        
    
    sda11: _________________________________________________________________________
    
        File system:       vfat
        Boot sector type:  FAT32
        Boot sector info:  No errors found in the Boot Parameter Block.
        Operating System:  
        Boot files:

  7. #7
    Join Date
    Jun 2009
    Location
    Chicago Suburbs
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: new 12.04 install grub 2 boot problem

    As you can see the grub2 installed to the PBR - partition boot sectors look for core.img by sector. If that gets moved for any reason then you have to reinstall grub to the PBR so grub can then find the new core.img.

    As long as you have a current working liveCD or flash drive of Ubuntu and a Windows repair CD or flash drive you should be ok.
    For info on UEFI boot install & repair:
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to close thread when/if answered completely.







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
  •