由grub1回到grub2

来源:互联网 发布:人工智能服务机器人 编辑:程序博客网 时间:2024/04/29 11:08

 

root@zhangbin-desktop-ubuntu:/boot/grub# update-grub

Searching for GRUB installation directory ... found: /boot/grub

Searching for default file ... found: /boot/grub/default

Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst

Searching for splash image ... none found, skipping ...

Found kernel: /vmlinuz-2.6.32-26-generic

Found kernel: /vmlinuz-2.6.32-25-generic

Found kernel: /vmlinuz-2.6.32-24-generic

Found kernel: /vmlinuz-2.6.32-21-generic

Found GRUB 2: /boot/grub/core.img

Found kernel: /memtest86+.bin

Updating /boot/grub/menu.lst ... done

 

root@zhangbin-desktop-ubuntu:/boot/grub# update-grub2

程序“update-grub2”已包含在下列软件包中:

 * grub-pc

 * grub-coreboot

 * grub-efi-amd64

 * grub-efi-ia32

 * grub-ieee1275

请尝试:apt-get install <选定的软件包>

 

 

 

 

 

root@zhangbin-desktop-ubuntu:/home/zhangbin# apt-get install update-grub2

正在读取软件包列表... 完成

正在分析软件包的依赖关系树       

正在读取状态信息... 完成       

E: 无法找到软件包 update-grub2

root@zhangbin-desktop-ubuntu:/home/zhangbin# grub

Probing devices to guess BIOS drives. This may take a long time.

root@zhangbin-desktop-ubuntu:/home/zhangbin# grub-install -v

grub-install (GNU GRUB 0.97)


root@zhangbin-desktop-ubuntu:/home/zhangbin# apt-get install grub-pc

正在读取软件包列表... 完成

正在分析软件包的依赖关系树       

正在读取状态信息... 完成       

建议安装的软件包:

  desktop-base

下列软件包将被【卸载】:

  grub

下列【新】软件包将被安装:

  grub-pc

升级了 0 个软件包,新安装了 1 个软件包,要卸载 1 个软件包,有 1 个软件包未被升级。

需要下载 638kB 的软件包。

解压缩后会消耗掉 1,335kB 的额外空间。

您希望继续执行吗?[Y/n]y

获取:1 http://Ubuntu.cn99.com/ubuntu/ lucid-updates/main grub-pc 1.98-1ubuntu9 [638kB]

下载 638kB,耗时 25秒 (24.7kB/s)                                               

正在预设定软件包 ...

(正在读取数据库 ... 系统当前总共安装有 298241 个文件和目录。)

正在删除 grub ...

正在处理用于 man-db 的触发器...

选中了曾被取消选择的软件包 grub-pc。

(正在读取数据库 ... 系统当前总共安装有 298195 个文件和目录。)

正在解压缩 grub-pc (从 .../grub-pc_1.98-1ubuntu9_i386.deb) ...

正在处理用于 man-db 的触发器...

正在设置 grub-pc (1.98-1ubuntu9) ...

Installation finished. No error reported.

Generating grub.cfg ...

Found linux image: /boot/vmlinuz-2.6.32-26-generic

Found initrd image: /boot/initrd.img-2.6.32-26-generic

Found linux image: /boot/vmlinuz-2.6.32-25-generic

Found initrd image: /boot/initrd.img-2.6.32-25-generic

Found linux image: /boot/vmlinuz-2.6.32-24-generic

Found initrd image: /boot/initrd.img-2.6.32-24-generic

Found linux image: /boot/vmlinuz-2.6.32-21-generic

Found initrd image: /boot/initrd.img-2.6.32-21-generic

Found memtest86+ image: /memtest86+.bin

Found Microsoft Windows XP Professional on /dev/sdb1

Found Mandriva Linux 2010.0 (2010.0) on /dev/sdb11

done

 

这就是grub的版本号,是grub2

root@zhangbin-desktop-ubuntu:/home/zhangbin# grub-install -v

grub-install (GNU GRUB 1.98-1ubuntu9)

 

 

 

==================================

下面是ubuntu论坛上,关于10.04继续使用grub1的方法的说明,我是上一次更新的时候,被更新为grub1的。

 

可以用这样的方法,使用1代的引导:

我是用一代的引导     

 

 

引用:

smallapple

 

在新立德下卸载grub2,再安装grub,

sudo grub-install /dev/sda

把grub装在mbr

#或

#sudo grub-install /dev/sdax

#把grub装在 sdax分区上,x根据 /boot 或 / 分区修改

最后再

sudo update-grub

重建 menu.lst

 

 

+++++++++

billbear

 

不习惯或不放心 grub2 的,可以这样滚回 grub 0.97

进入安装好的系统,查看 grub 版本:

grub-install -v

1.9x 就是 grub2 了

删除 grub2 软件包:

sudo apt-get purge grub-pc

删除遗留的 grub2 文件

sudo rm /etc/default/grub

sudo rm -rf /etc/grub.d

sudo rm -rf /boot/grub

安装软件包 grub 0.97:

sudo apt-get install grub

可以再看一下现在的 grub 版本:

grub-install -v

安装 grub 0.97 到 mbr 或分区:

sudo grub-install /dev/sdX 或 sudo grub-install /dev/sdXn

(注意如果 grub2 安装到了 mbr,这里务必将 grub 也安装到 mbr,否则 mbr 里的 grub2 不会被清除,并且无法引导)

生成 menu.lst:

sudo update-grub -y

====================================

 

原创粉丝点击