- 论坛徽章:
- 0
|
本帖为楼主已赚得 0 金币
Grubinst使用介绍Grubinst使用介绍
1. Introdution
This utility is used to install GRUB4DOS to the MBR of hard disk or image file.
grubinst.exe is a console mode program. It mimics the behavior of the DOS/Linux utility bootlace.com from TinyBit’s GRUB4DOS package. But unlike bootlace.com, grubinst is writen completely in C and can be compiled to run in OSs like Windows NT/2K/XP, Linux and FreeBSD.
grubinst_gui.exe is a GUI frontend to grubinst.exe. It provides a friendly interface to users who are not familiar whith the command line environment. Currently, grubinst_gui.exe only runs in Windows OSs.
Please note that these utilities only install MBR, it DOES NOT copy GRLDR to your partition or configure menu.lst, neither does it modify boot.ini to enable booting from the NT boot manager. To know more about such things, please refers to README_GRUB4DOS.txt which contains information about the GRUB4DOS package.
Also note that the current version of grubinst doesn’t support modify the MBR of hard disk in Windows 95/98/ME. For those OSs, bootlace.com should be used instead.
1. 介绍
grubinst是一个用来将GRUB4DOS安装到硬盘的MBR(或者分区的引导扇区)以及映像文件中的工具。
grubinst.exe是一个命令行方式的程序,它的功能基本上与不点的GRUB4DOS发行包中的bootlace.com(可以运行在纯DOS或者Linux环境)相同,但是跟bootlace.com不同,grubinst完全是用C语言开发的,能够在Windows NT/2K/XP、Linux和FreeBSD等操作系统下编译并运行。
grubinst_gui.exe是grubinst.exe的图形界面shell程序,对于那些不熟悉命令行操作的用户来说,它提供了更友好的图形操作界面,目前,grubinst_gui.exe只能运行在Windows操作系统(事实上是只能运行在NT/2K/XP环境)下。
另外请注意,当前版本的grubinst不支持在Windows 95/98/ME下修改硬盘的MBR,对于这些操作系统,请使用bootlace.com。
2. Difference between grubinst and bootlace.com
In bootlace.com, hard disk device is represented by numbers, 0x80 is the first hard disk, 0x81 is the second, etc. In grubinst, hard disk device is represented using special filename, (hd0), (hd1), etc. Floppy device is not supported yet.
grubinst doesn’t support install GRUB4DOS to a partition, this would be fixed in furture releases.
grubinst has a few new options which are used mainly to restore the old MBR.
--save-mbr=FILENAME
This option is used to save the original MBR to FILENAME
--restore-mbr=FILENAME
This option is used to restore MBR from previous saved FILENAME
--restore-prevmbr
This option is used to restore the old MBR saved in the second sector of the hard disk or image file.
Normally, the original MBR is only one sector long, it’s stored in the second sector of the new GRLDR MBR. You can restore it using --restore-prevmbr option. However, if the original MBR is longer than one sector, for instance, you have other boot manager installed, then GRLDR MBR dones’t have room to hold it. In this case, you should use --save-mbr=FILENAME to save the original MBR to an external file, and use --restore-mbr=FILENAME to restore it.
2. grubinst跟bootlace.com的区别
在bootlace.com里,硬盘盘等设备只能用设备的BIOS识别号来表示,如0x80表示第一块硬盘,0x81表示第二块硬盘等等。而在grubinst中,硬盘则可以用特定的设备文件名来表示(跟grub的传统类似),如(hd0), (hd1)...。软驱暂时还不支持这种表示方式。
grubinst支持几个新的选项,主要用于恢复原来的MBR。
--save-mbr=FILENAME
This option is used to save the original MBR to FILENAME 这个选项用于保存原来的MBR到文件中。
--restore-mbr=FILENAME
这个选项用来从前面保存的文件中恢复原来的MBR。
--restore-prevmbr
这个选项用来恢复保存在硬盘或者映像文件中第二个扇区的原来的MBR。
正常情况下,原来的MBR只有一个扇区,它被保存在新的GRLDR MBR中的第二个扇区中。你可以用--restore-prevmbr选项来恢复它。然而,如果原来的MBR的长度超过一个扇区,例如,你安装了别的引导管理软件,那么GRLDR MBR就没有足够的空间保存原来的MBR。在这种情况下,你应该使用--save-mbr=FILENAME将原来的MBR保存到一个外部文件中,需要时再使用--restore-mbr=FILENAME选项从保存的文件中恢复它。
3. Usage
from grubinst version: 1.1
grubinst [OPTIONS] DEVICE_OR_FILE
OPTIONS:
--help,-h Show usage information
--pause Pause before exiting
--version Show version information
--verbose,-v Verbose output
--list-part,-l List all logical partitions in DEVICE_OR_FILE
--save=FN,-s=FN Save the orginal MBR/BS to FN
--restore=FN,-r=FN Restore MBR/BS from previously saved FN
--restore-prevmbr,-r Restore previous MBR saved in the second sector
of DEVICE_OR_FILE
--read-only,-t do everything except the actual write to the
specified DEVICE_OR_FILE. (test mode)
--no-backup-mbr do not copy the old MBR to the second sector of
DEVICE_OR_FILE.
--force-backup-mbr force the copy of old MBR to the second sector
of DEVICE_OR_FILE.(default)
--mbr-enable-floppy enable the search for GRLDR on floppy.(default)
--mbr-disable-floppy disable the search for GRLDR on floppy.
--mbr-enable-osbr enable the boot of PREVIOUS MBR with invalid
partition table (usually an OS boot sector).
(default)
--mbr-disable-osbr disable the boot of PREVIOUS MBR with invalid
partition table (usually an OS boot sector).
--duce disable the feature of unconditional entrance
to the command-line.
--boot-prevmbr-first try to boot PREVIOUS MBR before the search for
GRLDR.
--boot-prevmbr-last try to boot PREVIOUS MBR after the search for
GRLDR.(default)
--preferred-drive=D preferred boot drive number, 0
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/103621/showart_2037176.html |
|