返回列表 發帖
Grub Legacy 与 Grub 2的commands比较

http://grub.enbug.org/CommandList

角色

TOP

备用帖子

TOP

备用帖子

TOP

备用帖子

TOP

备用帖子

TOP

备用帖子

TOP

备用帖子

TOP

备用帖子

TOP

备用帖子

TOP

备用帖子

TOP

备用帖子

TOP

备用帖子

TOP

本帖最後由 角色 於 2012-11-28 11:34 編輯

用USB Multi-boot作multi boot要主要的地方:

1. 在用USB手指boot机是:
      hd0 是 USB手机的drive
      hd1 是 internal harddrive
      hd2 是 SSD drive

Boot SSD

title Boot SSD
map (hd0) (hd2)
map (hd2) (hd0)
map --hook
rootnoverify (hd0)
chainloader +1

TOP

本帖最後由 角色 於 2010-8-10 21:55 編輯

用USB手指去boot Windows要注意的地方:

Boot First Parition of the Hard Drive (HDD)

因为Windows Xp boot up时,Windows Xp的image一定要first partition of the first hard drive. 而USB开始boot的时候,hd0是USB flash drive, hd1是hard drive, 所以要利用map的指令,把它们对调。

title Boot First Parition of the Hard Drive (HDD)
map (hd0) (hd1)
map (hd1) (hd0)
map --hook
rootnoverify (hd0,0)
chainloader +1


Boot First Hard Drive (HDD)

title Boot First Hard Drive (HDD)
map (hd0) (hd1)
map (hd1) (hd0)
map --hook
rootnoverify (hd0)
chainloader +1




角色

TOP

本帖最後由 角色 於 2010-8-8 19:50 編輯

如果你的MBR出现问题,那么你可以用某一个系统的GRUB,然后执行下面的命令:

假如我想MBR指向/dev/sda8, 那么在GRUB里就是(hd0,7), hd0是指第一hard drive

#grub
grub > device (hd0) /dev/sda
grub > root (hd0,7)
grub > setup (hd0)
grub > quit

上面的方法只适合GRUB Legacy的boot loader,而GRUB 2.0的就不可以,例子有最新的Ubuntu 10.04。

怎样才能重新启动Ubuntu 10.04的partition呢?

我们可以用GRUB4DOS,加入下面菜单:

title grub2
find --set-root /boot/grub/core.img
kernel /boot/grub/core.img

然后重新启动USB flash drive,然后选grub2,那么你就可以进入有GRUB 2的program里,如Ubuntu。
当系统boot up完后,我们可以用下面指令来改变MBR

sudo  grub-install /dev/sda

有或者我们在GRUB4DOS commandline mode
grub > find --set-root /boot/grub/core.img
grub > kernel /boot/grub/core.img
grub > boot

然后就进入那个GRUB2的partition里,然后我们用

sudo  grub-install /dev/sda

把/dev/sda的MBR指向有GRUB2的partition。

TOP

返回列表