如何恢复 grub2?

如何恢复 grub2?

我安装了 Ubuntu 11.10,然后又将 Lubuntu 10.10 升级到 11.04。安装过程中启动的 grub2 覆盖了 Ubuntu 编写的 grub。之后,我在 grub 菜单中找不到任何指向 Ubuntu 或 Windows 7 的启动项。如何恢复包含所有菜单的 grub2?

以下是更新 grubfdisk -l

更新 grub

Found linux image: /boot/vmlinuz-2.6.38-11-generic
Found initrd image: /boot/initrd.img-2.6.38-11-generic
Found linux image: /boot/vmlinuz-2.6.35-22-generic
Found initrd image: /boot/initrd.img-2.6.35-22-generic
Found memtest86+ image: /boot/memtest86+.bin

fdisk -l

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 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: 0x65728979

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1          13      102400   de  Dell Utility
Partition 1 does not end on cylinder boundary.
/dev/sda2   *          13        1288    10240000    7  HPFS/NTFS
/dev/sda3            1288        8937    61440000    7  HPFS/NTFS
/dev/sda4            8937       38914   240786311    f  W95 Ext'd (LBA)
/dev/sda5            8937       33999   201311607+   7  HPFS/NTFS
/dev/sda6           36442       38805    18979840   83  Linux
/dev/sda7           38805       38914      872448   82  Linux swap / Solaris
/dev/sda8           33999       36334    18751488   83  Linux
/dev/sda9           36334       36442      863232   82  Linux swap / Solaris
Partition table entries are not in disk order

答案1

只需启动 Lubuntu 并从命令行:

update-grub2

检查命令的输出,确保所有发行版都在那里。
如果没有,请尝试:

grub-install /dev/sda
update-grub2

更多信息可以在这里找到双启动指南

相关内容