Ubuntu Linux, Windows XP 双系统重装Grub2

  一般安装Linux, Windows双系统都是先安装Windows然后安装Linux,这种情况下Grub会自动检测到Windows并添加到启动列表中。如果安装顺序颠倒则可以有以下解决方法:

  • 安装Grub4Dos
  • 使用Ubuntu LiveCD安装Grub到MBR

新版的Ubuntu使用的是Grub2,命令与Grub稍微有一些不同,大致操作如下

 
  
my-desktop:~$ sudo grub -setup -d /media/disk/boot/grub /dev/sda

其中disksda需要根据Linux所在硬盘进行调整。

以下是grub-setup的帮助信息

 
  
my- desktop :~ $ sudo grub -setup -- help
Usage
: grub - setup [OPTION] ... DEVICE

Set up images to boot from DEVICE
.
DEVICE must be a GRUB device (e
. g . `(hd0 , 1 ) ' ).

-b, --boot-image=FILE use FILE as the boot image [default=boot.img]
-c, --core-image=FILE use FILE as the core image [default=core.img]
-d, --directory=DIR use GRUB files in the directory DIR [default=/boot/grub]
-m, --device-map=FILE use FILE as the device map [default=/boot/grub/device.map]
-r, --root-device=DEV use DEV as the root device [default=guessed]
-f, --force install even if problems are detected
-s, --skip-fs-probe do not probe for filesystems in DEVICE
-h, --help display this message and exit
-V, --version print version information and exit
-v, --verbose print verbose messages

Report bugs to <bug-grub@gnu.org>.

参考链接

转载于:https://www.cnblogs.com/gnome/archive/2011/05/27/2060329.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值