11.10双启动没有grub菜单

我已经在我的计算机上安装了Windows 7,然后安装了Ubuntu 11.10,但重新启动时没有出现grub菜单,而是直接进入Windows。

然后我删除了Ubuntu创建的分区并尝试了Fedora 16 – 它创建了稍微不同的分区 – 这有效(显示了grub菜单)。 不想保留Fedora,我格式化了它的分区并安装了Ubuntu。 Grub仍然加载但仍然使用Fedora选项(显然不起作用)。

当我尝试运行启动修复时,它警告我:

“您的PC启动处于EFI模式,但未检测到EFI分区。您可能需要在创建EFI分区后重试(FAT32,> 200Mo,启动磁盘,EFI标志)”

如果我继续,我不能运行建议的修复,因为它一直要求我添加grub2的软件源,即使它们在那里。

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 

我一直试图让这个工作几天没有运气! 我想最终得到一个Windows 7和Ubuntu双启动。 我不介意重新安装Ubuntu或重新创建分区,但我真的卡住了。

得到它的工作eventuall。 我确信下面涉及很多不必要的步骤,但它有效,也许有人可以指出不需要的东西?

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

此时,grub正在加载但显示救援提示(错误:没有这样的分区)

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

它的工作原理!!

在windows之后安装ubuntu。 如果未显示grub菜单,则使用ubuntu可启动笔式驱动器,从笔式驱动器启动

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

即使它没有启动也不要担心,你还没有丢失任何东西,如果你仍然遇到问题尝试

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

WIN_DIR是安装Windows 7的目录。