?? readme_grub4dos.txt
字號:
OPTIONS:
--read-only do everything except the actual write to the
specified DEVICE_OR_FILE.
--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.
--mbr-enable-floppy enable the search for GRLDR on floppy.
--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).
--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.
Normally one can unconditionally get the
command-line console by a keypress of `C',
bypassing all config-files(including the
preset-menu). This is a security hole. So we
need this option to disable the feature.
DUCE is for Disable Unconditional Command-line
Entrance.
--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.
--preferred-drive=D preferred boot drive number, 0 <= D < 255.
--preferred-partition=P preferred partition number, 0 <= P < 255.
--time-out=T wait T seconds before booting PREVIOUS MBR. if
T is 0xff, wait forever. The default is 5.
--hot-key=K if the desired key K is pressed, start GRUB
before booting PREVIOUS MBR. K is a word
value, just as the value in AX register
returned from int16/AH=1. The high byte is the
scan code and the low byte is ASCII code. The
default is 0x3920 for space bar. See "int 16
keyboard scan codes" below.
--floppy if DEVICE_OR_FILE is floppy, use this option.
--floppy=N if DEVICE_OR_FILE is a partition on a hard
drive, use this option. N is used to specify
the partition number: 0,1,2 and 3 for the
primary partitions, and 4,5,6,... for the
logical partitions.
--sectors-per-track=S specifies sectors per track for --floppy.
1 <= S <= 63, default is 63.
--heads=H specifies number of heads for --floppy.
1 <= H <= 256, default is 255.
--start-sector=B specifies hidden sectors for --floppy=N.
--total-sectors=C specifies total sectors for --floppy.
default is 0.
--lba use lba mode for --floppy. If the floppy BIOS
has LBA support, you can specify --lba here.
It is assumed that all floppy BIOSes have CHS
support. So you would rather specify --chs.
If neither --chs nor --lba is specified, then
the LBA indicator(i.e., the third byte of the
boot sector) will not be touched.
--chs use chs mode for --floppy. You should specify
--chs if the floppy BIOS does not support LBA.
We assume all floppy BIOSes have CHS support.
So it is likely you want to specify --chs.
If neither --chs nor --lba is specified, then
the LBA indicator(i.e., the third byte of the
boot sector) will not be touched.
--fat12 FAT12 is allowed to be installed for --floppy.
--fat16 FAT16 is allowed to be installed for --floppy.
--fat32 FAT32 is allowed to be installed for --floppy.
--vfat FAT12/16/32 are allowed to be installed for
--floppy.
--ntfs NTFS is allowed to be installed for --floppy.
--ext2 EXT2 is allowed to be installed for --floppy.
--install-partition=I Install the boot record onto the boot area of
partition number I of the specified hard drive
or harddrive image DEVICE_OR_FILE.
DEVICE_OR_FILE: Filename of the device or the image file. For DOS, a BIOS drive
number(hex 0xHH or decimal DDD) can be used to access the drive. BIOS drive
number 0 is for the first floppy, 1 is for the second floppy; 0x80 is for the
first hard drive, 0x81 is for the second hard drive, etc.
Note: BOOTLACE.COM writes only the boot code to MBR. The boot code needs to
load GRLDR as the second(and last) stage of the GRUB boot process. Therefore
GRLDR should be copied to the root directory of one of the supported
partitions, either before or after a successful execution of BOOTLACE.COM.
Currently only partitions with filesystem type of FAT12, FAT16, FAT32, NTFS,
EXT2 or EXT3 are supported.
Note 2: If DEVICE_OR_FILE is a harddisk device or a harddisk image file, it
must contain a valid partition table, otherwise, BOOTLACE.COM will fail. If
DEVICE_OR_FILE is a floppy device or a floppy image file, then it must contain
a supported filesystem(i.e., either of FAT12/FAT16/FAT32/NTFS/EXT2/EXT3).
Note 3: If DEVICE_OR_FILE is a floppy device or a floppy image file, and it
was formated EXT2/EXT3, then you should specify --sectors-per-track and
--heads explicitly.
Important!! If you install GRLDR Boot Record to a floppy or a partition, the
floppy or partition will boot solely grldr, and your original
IO.SYS(DOS/Win9x/Me) and NTLDR(WinNT/2K/XP) will become unbootable. This is
because the original boot record of the floppy or partition was overwritten.
There is no such problem when installing GRLDR Boot Record onto the MBR.
Update: Some NTLDR/IO.SYS/KERNEL.SYS files can be directly chainloaded in the
latest GRUB4DOS.
Tip: If the filename begins in a dash(-) or a digit, you may prefix a dirname
(./) or (.\) to it.
Examples:
Installing GRLDR boot code to MBR under Linux:
bootlace.com /dev/hda
Installing GRLDR boot code to MBR under DOS:
bootlace.com 0x80
Installing GRLDR boot code to a harddisk image under DOS or Linux:
bootlace.com hd.img
Installing GRLDR boot code to floppy under Linux:
bootlace.com --floppy --chs /dev/fd0
Installing GRLDR boot code to floppy under DOS:
bootlace.com --floppy --chs 0x00
Installing GRLDR boot code to a floppy image under DOS or Linux:
bootlace.com --floppy --chs floppy.img
BOOTLACE.COM cannot function well under Windows NT/2000/XP/2003. It is expected
(and designed) to run under DOS/Win9x and Linux. Update: For image FILES,
bootlace.com function well under Windows NT/2000/XP/2003. For devices,
bootlace.com will not work under Windows NT/2000/XP/2003 because bootlace.com
is a DOS utility and Windows NT/2000/XP/2003 does not allow bootlace.com to
access devices.
******************************************************************************
*** kexec-tools should be patched for the 1.101 release ***
******************************************************************************
The file kexec-tools-1.101-patch is a patch to the kexec-tools-1.101 release.
Kexec might fail to load grub.exe without this patch.
The home page of kexec-tools is:
http://www.xmission.com/~ebiederm/files/kexec/
Note: The Linux kernel should be KEXEC enabled before kexec can be run.
!! Important Update !!
The patch `kexec-tools-1.101-patch' is not needed now and has been deleted.
Even worse, it fails in `kexec -l grub.exe --initrd=imgfile'. So please
do not use it any more.
******************************************************************************
*** Direct transition to DOS/Win9x from within Linux ***
******************************************************************************
By using kexec, we can easily boot into DOS/Win9x from a running Linux system.
If WIN98.IMG is a bootable hard-disk image, do as follows:
kexec -l grub.exe --initrd=WIN98.IMG --command-line="--config-file=map (rd) (hd0); map --hook; chainloader (hd0)+1; rootnoverify (hd0)"
kexec -e
If DOS.IMG is a bootable floppy image, do this way:
kexec -l grub.exe --initrd=DOS.IMG --command-line="--config-file=map (rd) (fd0); map --hook; chainloader (fd0)+1; rootnoverify (fd0)"
kexec -e
Note that in this manner, we can boot DOS/Win9x without using a real DOS/Win9x
disk. We need no FAT partition but an image file.
We have noticed that Linux itself can act as a big boot manager by using kexec
and grub.exe. This may be convenient to developers who write installation or
bootstrap or initialization programs.
Certainly, grub.exe and the bootable disk image can also be loaded by a running
GRUB or LILO or syslinux. Examples:
1. Loaded by GRUB:
kernel (hd0,0)/grub.exe --config-file="map (rd) (fd0); map --hook; chainloader (fd0)+1; rootnoverify (fd0)"
initrd (hd0,0)/DOS.IMG
boot
2. Loaded by LILO:
image=/boot/grub.exe
label=grub.exe
initrd=/boot/DOS.IMG
append="--config-file=map (rd) (fd0); map --hook; chainloader (fd0)+1; rootnoverify (fd0)"
3. Loaded by SYSLINUX:
label grub.exe
kernel grub.exe
append initrd=DOS.IMG --config-file="map (rd) (fd0); map --hook; chainloader (fd0)+1; rootnoverify (fd0)"
Note: If the above `map (rd) (...)' failed, you may use `map (rd)+1 (...)'
instead and try again.
******************************************************************************
*** Keyboard BIOS Scan Code/ASCII code tables ***
******************************************************************************
Keyboard bios scan code and ascii character code tables can be obtained from
the web by, for example, googling for "3920 372A 4A2D 4E2B 352F". Here are 2
main results:
1. From "http://heim.ifi.uio.no/~stanisls/helppc/scan_codes.html":
INT 16 - Keyboard Scan Codes
Key Normal Shifted w/Ctrl w/Alt
A 1E61 1E41 1E01 1E00
B 3062 3042 3002 3000
C 2E63 2E43 2E03 2E00
D 2064 2044 2004 2000
E 1265 1245 1205 1200
F 2166 2146 2106 2100
G 2267 2247 2207 2200
H 2368 2348 2308 2300
I 1769 1749 1709 1700
J 246A 244A 240A 2400
K 256B 254B 250B 2500
L 266C 264C 260C 2600
M 326D 324D 320D 3200
N 316E 314E 310E 3100
O 186F 184F 180F 1800
P 1970 1950 1910 1900
Q 1071 1051 1011 1000
R 1372 1352 1312 1300
S 1F73 1F53 1F13 1F00
T 1474 1454 1414 1400
U 1675 1655 1615 1600
V 2F76 2F56 2F16 2F00
W 1177 1157 1117 1100
X 2D78 2D58 2D18 2D00
Y 1579 1559 1519 1500
Z 2C7A 2C5A 2C1A 2C00
Key Normal Shifted w/Ctrl w/Alt
1 0231 0221 7800
2 0332 0340 0300 7900
3 0433 0423 7A00
4 0534 0524 7B00
5 0635 0625 7C00
6 0736 075E 071E 7D00
7 0837 0826 7E00
8 0938 092A 7F00
9 0A39 0A28 8000
0 0B30 0B29 8100
Key Normal Shifted w/Ctrl w/Alt
- 0C2D 0C5F 0C1F 8200
= 0D3D 0D2B 8300
[ 1A5B 1A7B 1A1B 1A00
] 1B5D 1B7D 1B1D 1B00
; 273B 273A 2700
' 2827 2822
` 2960 297E
\ 2B5C 2B7C 2B1C 2600 (same as Alt L)
, 332C 333C
. 342E 343E
/ 352F 353F
Key Normal Shifted w/Ctrl w/Alt
F1 3B00 5400 5E00 6800
F2 3C00 5500 5F00 6900
F3 3D00 5600 6000 6A00
F4 3E00 5700 6100 6B00
F5 3F00 5800 6200 6C00
F6 4000 5900 6300 6D00
F7 4100 5A00 6400 6E00
F8 4200 5B00 6500 6F00
F9 4300 5C00 6600 7000
F10 4400 5D00 6700 7100
F11 8500 8700 8900 8B00
F12 8600 8800 8A00 8C00
Key Normal Shifted w/Ctrl w/Alt
BackSpace 0E08 0E08 0E7F 0E00
Del 5300 532E 9300 A300
Down Arrow 5000 5032 9100 A000
End 4F00 4F31 7500 9F00
Enter 1C0D 1C0D 1C0A A600
Esc 011B 011B 011B 0100
Home 4700 4737 7700 9700
Ins 5200 5230 9200 A200
Keypad 5 4C35 8F00
Keypad * 372A 9600 3700
Keypad - 4A2D 4A2D 8E00 4A00
Keypad + 4E2B 4E2B 4E00
Keypad / 352F 352F 9500 A400
Left Arrow 4B00 4B34 7300 9B00
PgDn 5100 5133 7600 A100
PgUp 4900 4939 8400 9900
PrtSc 7200
Right Arrow 4D00 4D36 7400 9D00
SpaceBar 3920 3920 3920 3920
Tab 0F09 0F00 9400 A500
Up Arrow 4800 4838 8D00 9800
- Some key combinations are not available on all systems. The PS/2
includes many that aren't available on the PC, XT and AT.
- To retrieve the character from a scan code logical AND the word
with 0x00FF.
- see INT 16 MAKE CODES
2. From "http://www.hoppie.nl/ivan/keycodes.txt":
Keystroke Keypress code
--------------------------------------------------
Esc 011B
1 0231
2 0332
3 0433
4 0534
5 0635
6 0736
7 0837
8 0938
9 0A39
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -