双启动安装--无 GRUB

双启动安装--无 GRUB

我的计算机最近进行了硬件升级,现在运行 Windows 7。我决定使用从 ubuntu.com 下载到我的 USB 记忆棒上的 ISO 安装 Ubuntu 11.04 作为双启动。

使用 USB 重新启动后,我能够选择以下选项安装 Ubuntu 11.04:

Install Ubuntu 11.04 side by side with Windows 7 (or something like that).

安装时没有遇到任何错误。但是重新启动时,没有 GRUB;系统直接进入 Windows 7。

为了寻找答案,我发现了这些:

按照他们的指示,我得到了:

自 2011 年 5 月 17 日起,启动信息脚本 0.60

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

=> Windows is installed in the MBR of /dev/sda.
=> Syslinux MBR (3.61-4.03) is installed in the MBR of /dev/sdb.
=> Grub2 (v1.99) is installed in the MBR of /dev/sdc and looks at sector 1 of
the same hard drive for core.img. core.img is at this location and looks
for (,msdos7)/boot/grub on this drive.

sda1: __________________________________________________ ________________________

File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files: /grldr /bootmgr /Boot/BCD /grldr

sda2: __________________________________________________ ________________________

File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows 7
Boot files: /Windows/System32/winload.exe

sdb1: __________________________________________________ ________________________

File system: vfat
Boot sector type: SYSLINUX 4.02 debian-20101016 ...........>...r>....... ......0...~.k...~...f...M.f.f....f..8~....>2}
Boot sector info: Syslinux looks at sector 1437504 of /dev/sdb1 for its
second stage. SYSLINUX is installed in the directory.
The integrity check of the ADV area failed. According
to the info in the boot sector, sdb1 starts at sector
0. But according to the info from fdisk, sdb1 starts
at sector 62.
Operating System:
Boot files: /boot/grub/grub.cfg /syslinux/syslinux.cfg /ldlinux.sys

sdc1: __________________________________________________ ________________________

File system: ntfs
Boot sector type: Windows XP
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files:

sdc2: __________________________________________________ ________________________

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

sdc5: __________________________________________________ ________________________

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

sdc6: __________________________________________________ ________________________

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

sdc7: __________________________________________________ ________________________

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

sdc8: __________________________________________________ ________________________

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

回到 Ubuntu 并运行sudo fdisk -l,我得到了这些:

ubuntu@ubuntu:~$ sudo fdisk -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0002f393

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      102400    7  HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2              13       19458   156185600    7  HPFS/NTFS

Disk /dev/sdb: 2011 MB, 2011168768 bytes
62 heads, 62 sectors/track, 1021 cylinders
Units = cylinders of 3844 * 512 = 1968128 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000f2ab9

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1        1021     1962331    c  W95 FAT32 (LBA)

Disk /dev/sdc: 1000.2 GB, 1000202043392 bytes
255 heads, 63 sectors/track, 121600 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00261ddd

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *           1       60657   487222656+   7  HPFS/NTFS
/dev/sdc2           60657      121600   489527681    5  Extended
/dev/sdc5          120563      121600     8337703+  82  Linux swap / Solaris
/dev/sdc6          120073      120562     3930112   82  Linux swap / Solaris
/dev/sdc7           60657      119584   473328640   83  Linux
/dev/sdc8          119584      120072     3923968   82  Linux swap / Solaris

我应该继续执行以下操作吗?

  • 假设 Ubuntu 11.04 安装在设备 sdb1 上,请执行以下操作:

    sudo mount /dev/sdb1 /mnt
    
  • 然后执行以下操作:

    sudo grub-install--root-directory=/mnt /dev/sdb
    

    注意根目录前面有两个破折号,并且我没有使用 sdb1 而是使用 sdb。

  • 由于步骤15中的命令已经重新安装了Grub 2,现在我们需要卸载/mnt(即sdb1)进行清理。

  • 做这个:

    sudo umount /mnt
    

    重启并从磁盘托盘中取出 Ubuntu 11.04 CD/DVD。登录 Ubuntu 11.04(此时你别无选择,但它会让你登录 Ubuntu 11.04)。

  • 在 Ubuntu 11.04 中打开一个终端(使用真实安装,而不是实时 CD/DVD)。执行此命令:

    sudo update-grub
    
  • 重新启动机器。

答案1

三天后,我决定重新格式化,重新安装 Windows 7(首先),然后按照以下步骤重新安装 Ubuntu指示

今天,我有一台双启动电脑,默认运行 ubuntu 11.04 和 Windows 7。

这次的不同之处在于,我在 ubuntu 试用模式下使用 gparted 对硬盘进行分区,然后从那里安装 ubuntu。重启后,我立即得到了 grub。

答案2

下次如果你想使用 Windows 引导程序,可以使用一些工具从 Windows 引导 Linux。否则,你可以加载恢复 Linux CD 并重新安装 Grub。

答案3

您还可以启动实时模式并使用 Ubuntu引导修复

答案4

请尝试通过以下方式修复您的启动 grub live-ubuntu (ubuntu cd

>Boot your computer on a Ubuntu live-CD or live-USB.
>Choose "Try Ubuntu" 
>Connect Internet 
>Open a new Terminal, then type:

sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update

 >Press Enter.
  Then type:

sudo apt-get 安装启动修复

After Installation Close the Terminal and Open Boot Repair ,
then Choose Recommended repair. It will repair automatically.

相关内容