[问题]重装xp毁了我的grub怎么办?

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
yoyoyo
帖子: 70
注册时间: 2007-11-22 9:07

[问题]重装xp毁了我的grub怎么办?

#1

帖子 yoyoyo » 2007-12-03 14:37

RT..........
我昨天重装了xp(玩游戏中毒了),结果xp清洗了我的引导,现在进不去Ubuntu了,求助。。。。
lb_bn
帖子: 1261
注册时间: 2007-02-25 16:56

#2

帖子 lb_bn » 2007-12-03 14:38

重装grub。。。
用livecd
方法论坛里有,搜一下。。
头像
hubert_star
论坛版主
帖子: 5373
注册时间: 2007-10-29 22:12
系统: OSX 10.9 + Ub 1304
来自: 江苏南京

#3

帖子 hubert_star » 2007-12-03 14:42

用光盘引导进入修复模式,挂载完系统运行grub-install,先看看帮助
yoyoyo
帖子: 70
注册时间: 2007-11-22 9:07

#4

帖子 yoyoyo » 2007-12-03 14:48

Live CD中没有找到修复模式,但是他倒让我分区……不敢点
头像
yaoms
帖子: 4952
注册时间: 2007-10-19 14:51
来自: 深圳

#5

帖子 yaoms » 2007-12-03 14:50

在liveCD的虚拟终端里也可以吧
Nothing 有事请发邮件到 yms541 AT gmail.com
alias 爱慕颇雷尔='mplayer'
yoyoyo
帖子: 70
注册时间: 2007-11-22 9:07

#6

帖子 yoyoyo » 2007-12-03 15:04

看不懂grub-install的选项........

ubuntu@ubuntu:~$ sudo grub-install
install_device not specified.
Usage: grub-install [OPTION] install_device
Install GRUB on your drive.

-h, --help print this message and exit
-v, --version print the version information and exit
--root-directory=DIR install GRUB images under the directory DIR
instead of the root directory
--grub-shell=FILE use FILE as the grub shell
--no-floppy do not probe any floppy drive
--force-lba force GRUB to use LBA mode even for a buggy
BIOS
--recheck probe a device map even if it already exists

INSTALL_DEVICE can be a GRUB device name or a system device filename.

grub-install copies GRUB images into the DIR/boot directory specfied by
--root-directory, and uses the grub shell to install grub into the boot
sector.

跟哪个参数。。。现在在Live CD下
头像
ciclo
帖子: 786
注册时间: 2007-01-25 16:43
来自: 塔尔塔洛斯

#7

帖子 ciclo » 2007-12-03 15:37

用livecd启动,打开终端,输入:
sudo grub
root (hdx,y) 此处x代表第几块硬盘,第一块就是0;y代表linux装在第几块分区,依次顺序为0,4,5,6。。。
例如,如果linux装在第一快硬盘的第五块分区,就是 root (hd0,7)
然后输入
setup (hd0)
看到成功信息后,
quit
重启,看到了什么?熟悉的grub启动画面。
恭喜你,你以后可以每天重装叉屁玩了
头像
mophist
帖子: 8
注册时间: 2007-06-26 13:29
联系:

#8

帖子 mophist » 2007-12-04 18:19

使用 ubuntu-desktop-cd 启动,进入 live 模式。开启一个 terminal,输入
ubuntu@ubuntu:~$ sudo su
root@ubuntu:~$ grub
grub> root (hd0, 1)
grub> setup (hd0)
grub> quit

对于 grub 而言,所有接口的硬盘都是被识别为 hd 的,无论用户的硬盘使用的是 IDE 还是 SATA 接口。和 Linux 对 dev 的标识不同,grub 的计数是从0开始的。因而 hd0 表示第一块硬盘,而 (hd0, 1) 即表示第一块硬盘的第二个分区(也就是说在 fdisk 看来,应该是标识为 sda2 的)。root 命令后面需要指定的是用户 Linux 的 /boot 所在的分区,如果没有为 /boot 单独分区,那么也就是指定 / 所在的分区。setup 命令需要指定 grub 安装在哪一块硬盘上。重启之后即可。

原文地址:http://patrickhe.javaeye.com/blog/37323
回复