歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Ubuntu Linux, Windows XP 雙系統重裝Grub2

Ubuntu Linux, Windows XP 雙系統重裝Grub2

日期:2017/2/28 16:10:06   编辑:Linux教程

  一般安裝Linux, Windows雙系統都是先安裝Windows然後安裝Linux,這種情況下Grub會自動檢測到Windows並添加到啟動列表中。如果安裝順序顛倒則可以有以下解決方法:

  • 安裝Grub4Dos http://www.linuxidc.com/Linux/2009-01/18027.htm
  • 使用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 <[email protected]>.
Copyright © Linux教程網 All Rights Reserved