Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have installed Windows 7 and then Ubuntu 11.10 on my computer but no grub menu came up on reboot and it went straight into Windows.

I then removed the Ubuntu created partitions and tried Fedora 16 - it created slightly different partitions - which worked (grub menu was shown). Not wanting to keep Fedora, I formatted it's partition and installed Ubuntu onto it. Grub still loads but still with the Fedora options (which obviously don't work).

When I try to run boot-repair it warns me:

"The boot of your PC is in EFI mode, but no EFI partition was detected. You may want to retry after creating a EFI partition (FAT32, >200Mo, start of the disk, EFI flag)"

If I continue, I can't run the recommended fix as it keeps asking me to add software sources for grub2 even though they are there.

                     Boot Info Script 0.60-git      [2 Jan 2012]


============================= Boot Info Summary: ===============================

 => Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1 of 
    the same hard drive for core.img. core.img is at this location and looks 
    for (,msdos3)/grub2 on this drive.
 => Syslinux MBR (4.04 and higher) is installed in the MBR of /dev/sdb.

sda1: __________________________________________________________________________

    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:        /bootmgr /Boot/BCD

sda2: __________________________________________________________________________

    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

sda3: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  
    Boot files:        /grub2/grub.cfg /grub2/core.img

sda4: __________________________________________________________________________

    File system:       Extended Partition
    Boot sector type:  Unknown
    Boot sector info: 

sda5: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  Ubuntu 11.10
    Boot files:        /boot/grub/grub.cfg /etc/fstab

sda6: __________________________________________________________________________

    File system:       swap
    Boot sector type:  -
    Boot sector info: 

sdb1: __________________________________________________________________________

    File system:       vfat
    Boot sector type:  SYSLINUX 4.05 2011-12-09
    Boot sector info:  Syslinux looks at sector 2652248 of /dev/sdb1 for its 
                       second stage. SYSLINUX is installed in the  directory. 
                       No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        /boot/grub/grub.cfg /syslinux/syslinux.cfg 
                       /efi/boot/bootx64.efi /ldlinux.sys

============================ Drive/Partition Info: =============================

Drive: sda _____________________________________________________________________

Disk /dev/sda: 256.1 GB, 256060514304 bytes
255 heads, 63 sectors/track, 31130 cylinders, total 500118192 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sda1    *          2,048       206,847       204,800   7 NTFS / exFAT / HPFS
/dev/sda2             206,848   153,602,047   153,395,200   7 NTFS / exFAT / HPFS
/dev/sda3         153,602,048   154,626,047     1,024,000  83 Linux
/dev/sda4         154,628,094   500,117,503   345,489,410   5 Extended
/dev/sda5         154,628,096   492,013,567   337,385,472  83 Linux
/dev/sda6         492,015,616   500,117,503     8,101,888  82 Linux swap / Solaris

I've been trying to get this to work for a couple of days with no luck!! I want to end up with a Windows 7 & Ubuntu dual boot. I don't mind re-installing Ubuntu or recreating partitions but am really stuck.

share|improve this question
add comment

2 Answers 2

Got it working eventuall. I'm sure that the below involves a lot of unnecessary steps but it worked and maybe someone can point out what's not needed?

sudo mount /dev/sda5 /mnt
sudo mount --bind /dev /mnt/dev
sudo chroot /mnt
sudo grub-install /dev/sda
sudo update-grub

At this point, grub was loading but displaying the rescue prompt (error: no such partition)

sudo mkdir /media/sda5
sudo mount /dev/sda5 /media/sda5
sudo grub-install --root-directory=/media/sda5 /dev/sda

And it works!!

share|improve this answer
add comment

Install ubuntu after windows. If grub menu is not shown, then take a ubuntu bootable pen-drive, boot from pen-drive and

grub-install --root-directory=/dev/sda

don't worry even if it doesn't boot, You have not lost anything yet, if you still encounter problem try with

grub-install --root-directory=/media/WIN_DIR

WIN_DIR is the directory where your windows 7 is installed.

share|improve this answer
    
Thanks. When I run the command I get: install_device not specified. –  Oll Feb 11 '12 at 21:24
    
Which install device should I use? sda3 seems to have images on!?? –  Oll Feb 13 '12 at 7:03
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.