BBS水木清华站∶精华区

发信人: reden (鱼 ~ 看流星和她的故事), 信区: Linux 
标  题: Linux Remote-Boot mini-HOWTO(6/7) 
发信站: BBS 水木清华站 (Sun Oct 18 21:08:47 1998) WWW-POST 
 
Clean partitions (disk) ("label") 
     Fast-format the given partition(s) according to the type declared in the  
partition table. If a label is given and the filesystem 
     supports it, setup the partition label. For a paranoiac full format,  
call Blank on the partition first. 
 
     Clean is supported for (FAT16) BIGDOS, FAT32, EXT, LINUX-EXT2 and  
LINUX-SWAP partitions. To clean the 
     master boot record (MBR), use Clean 0. 
 
     Clean should be used on data partitions and on MBR/EXT partitions. It is  
totally useless to clean a partition before unzipping 
     a filesystem on it using FullUnzip. 
 
FullUnzip "full-archive" partition (disk) 
     Decompress a full disk archive to the given partition, overwriting any  
existing file (clean-up on the fly). 
 
     FullUnzip is supported for (FAT16) BIGDOS, FAT32 and LINUX-EXT2.  
Unfortunately, images restored from FAT32 do 
     not seem to be bootable, although all files are restored correctly. This  
should be fixed in a future release. 
 
     This commands turn on VESA graphics to display a progress banner, unless  
VESA has been turned OFF. 
 
IncrUnzip "incr-archive" "destpath" 
     Decompress an incremental disk archive to the given path. Files in the  
archive replace those with the same name on the 
     target path, but other files are not deleted. 
 
     IncrUnzip is supported for (FAT16) BIGDOS, FAT32 and LINUX-EXT2. This  
command is far less efficient than 
     FullUnzip since the existing filesystem structure must be preserved.  
However, it avoids multiplying the number of different 
     disk images by storing the differences only. 
 
FileUnzip "source-filename" "dest-filename" 
     Uncompress a file previously compressed with MrZip FileZip command. The  
file is validated by a 32-bits CRC. 
 
Copy "source-filename" "dest-filename" 
     Copy the source file to the destinaton file, byte-to-byte. Can be used  
after a FullUnzip for instance to update configuration 
     files from the server without rebuilding the image. Better to use  
FileUnzip for big and easy-to-compress files. 
 
Append "src-filename-1" "src-filename-2" "dest-filename" 
     Copy the first, then the second file to the destination file,  
byte-to-byte. Can be used on arbitrary large files. The destination 
     file cannot be one of the two source files. 
 
Patch "source-filename" "dest-filename" ("prefix" ("postfix")) 
     Read the source file and perform variable substitution before writing it  
to the destination file. The interpretation of 
     characters above ASCII 127 depends on the value of $IsoLatin. 
 
     By default, variables are recognized when prefixed by "${" and postfixed  
by "}". This can be changed to any other 
     non-empty string. remember that if you want to use a dollar sign within  
the prefix or suffix, you must escape it or it will get 
     macro-evaluated. For instance, if you want to explicitely use the  
default prefix and postfix, use:  
 
             Patch "source-file" "dest-file" "\${" "}" 
 
MkDir "path" 
     Recursively create directories from the root to the given full path. If  
the path already exists, this command has no effect. 
 
Delete "filename", Del "filaname" 
     Remove the given file. The file must exist. 
 
DelTree "path" 
     Recursively remove all files and directories under the given path, and  
remove the directory itself. 
 
Boot commands 
 
This section lists commands for continuing the boot process. Optional  
arguments are listed between parenthesis.  
 
HideBootProm 
     Restore the memory and the interrupt vectors allocated by the bootprom.  
All attempts to make TFTP transfers will fail 
     after calling this command. It is usually a good idea to call this  
command before HdBoot, or you might run short of memory 
     under DOS/Windows. This command is implicitely called by FloppyBoot. 
 
     Note that although this function restore all vectors "officially"  
rerouted by the BootProm, it does not seems to restore 
     everything. But it works well enough for DOS and Windows. 
 
LoadRamDisk "ramdisk-filename" 
     Load a floppy disk image into the extended memory and redirect the BIOS  
Disk Services to make floppy disk calls use this 
     image instead. This command implicitely calls HideBootProm. Call  
FloppyBoot to boot on the ramdisk you just 
     loaded. 
 
     This kind of ramdisk may not be as robust as what you get when you use  
the TFTPBoot command. The only advantage is 
     that it only steals a few hundred bytes of conventional memory instead  
of the >64 KB reserved by the TCP/IP 
     BootPROM. Warning, nothing secures the extended memory in which the  
ramdisk resides. There is no way to uninstall 
     such a ramdisk. 
 
LoadZRamDisk "ramdisk-filename" 
     Do the same as LoadRamDisk, but for an image that has been compressed  
using MrZip FileZip command. Compressed 
     ramdisks are protected against data corruption (and uncomplete download)  
by a byte count and a 32-bits CRC. 
 
TFTPBoot "remote-bootfile" 
     Chain to another boot file (for instance a floppy image made with  
InCom's BpShell program). See the file referencing 
     conventions for accessing a file on another TFTP server. 
 
FloppyBoot 
     Hide the Boot ROM, load the floppy disk boot sector and boot on it.  
Unfortunately, this command does not seems to work 
     well enough for LDLINUX.SYS (used on RedHat Linux setup disk) to work. 
 
HdBoot (disk)(:partition) 
     Load the given boot sector and boot from it. The disk default to zero,  
the first hard disk, and the partition defaults to zero, ie. 
     the master boot record. You can boot from any partition, but be warned  
that Windows 95 may not let you boot a partition 
     that has not been set as the boot partition (hint: use SetBootPart). 
 
     This command does not implicitely call HideBootProm, so you might want  
to call it before. 
 
LinuxBoot "kernelfile" ("command-line" ("ramdisk-file")) 
     Load the given kernel and ramdisk into the high memory, setup the  
command line and boot the kernel. It is a good idea to 
     put at least a minimal command line with the location of the root  
filesystem (like "root=dev/hda1"/). If you are using a 
     linux system that heavily relies on lilo (like RedHat Linux 5.1), it may  
be necessary to add to the command line 
     something like BOOT_IMAGE=linux. Note that the kernel can be loaded by  
TFTP (automatically cached on the hard 
     disk) or directly from the target root partition. 
 
     This command works for small and big kernels (zImage and bzImage). 
 
National language support 
 
This section lists commands related not national language support. Optional  
arguments are listed between parenthesis.  
 
RemapKeys "original-keys" "remapped-keys" 
     National keyboard support. Remap given keys to other characters. For  
instance, to swap the Y and Z keys, use  
 
             Remapkeys "yzYZ" "zyZY" 
 
     It is a good idea to use the quoted octal notation when using characters  
not included in the minimal ASCII character set, in 
     order to avoid a dependency to the iso-latin modal settings. 
 
     For international keyboards, there are two keys that produce a backslash  
in non-remapped (US) mode. Each of them can 
     be independantly remapped, thanks to the fact that BpBatch sees one of  
them as a key answering ASCII code 252 
     (octal) or ASCII code 335 (octal) when shifted. 
 
     If you send me a sample script that does keyboard mapping for your  
national keyboard, I will make it available under 
     http://cuiwww.unige.ch/info/pc/remote-boot/soft/sample-scripts To help  
you make your 
     own keyboard mapping, I suggest pressing all special keys without  
remapping the keyboard and writing down the character 
     they produce. These will be the original-keys. The remapped-keys simply  
are the key you would have liked to 
     see, in the same order. If some keys (either original or remapped)  
produce characters above ASCII dec 127, use the 
     quoted octal notation. You can easily get the octal code for any given  
character by looking in the ASCII table of HelpPC 
     for instance (HelpPC is a shareware hypertext on-line help program by  
David Jurgens). 
 
RemapAltkeys "original-keys" "remapped-keys" 
     National keyboard support. Remap the given keys when ALT is depressed  
For instance, to map Alt-2 to the ampersand 
     sign, use  
 
             RemapAltKeys "2" "@" 
 
     Note that dead keys are not supported. 
 
LoadCodePage "cpxxx.bin" 
     Load and activate the given binary Codepage file. Codepages are used for  
the translation of Unicode characters (present 
     on VFAT valumes for instance) into 8-bits characters. If you do not have  
the right Codepage loaded, you will get FAT 
     warnings while accessing the filesystem when special characters are  
encountred. 
 
     All binary codepage files are available at 
     http://cuiwww.unige.ch/info/pc/remote-boot/soft/codepage.zip 
 
     The default codepage is 850, a reordered superset of ISO-Latin-1. If you  
load a more exotic codepage, you should usually 
     turn the variable $IsoLatin to "off" or you might get meaningless  
implicit conversions. Moreover, if you want to 
     display exotic characters, you should also load the proper screen font  
(use "LoadFont"). 
 
LoadFont "fontfile" 
     Load and activate a VGA/VESA font, both in text and graphic mode. The  
font file must be a binary file of 16 
     bztes/characters (8x16 bitmap). This command can be used for National  
Language Support as well as for Fantasy support. 
 
     An archive with several fantasy fonts is available at 
     http://cuiwww.unige.ch/info/pc/remote-boot/soft/fonts.zip. This archive  
also contains a 
     program to extract fonts for your codepage from the DOS .CPI file. 
 
Commands specific to MrZip 
 
Source... 
       Source (i)archive "filename" 
       Source path "path" 
 
     Set the source for the archive manipulation to the given (incremental)  
archive file or disk path. 
 
Dest... 
       Dest (i)archive "filename" 
       Dest (i)dump 
       Dest path "path" 
 
     Set the destination for the archive manipulation to the given  
(incremental) archive file, dump or disk path. To control the 
     quantity of data displayed during dump, use the $DumpFormat special  
variable. 
 
FileZip "source-filename" "dest-filename" 
     Compress a file for further decompression with FileUnzip or for using as  
ZRamDisk. The file is validated by a 32-bits CRC. 
 
Filter... 
       Filter -"pattern" 
       Filter +"pattern" 
 
     Avoid/allow files and directories matching the given pattern (wildcards  
allowed) to be included in the archive. The pattern is 
     matched agains the full pathname. By default, all files are included in  
the image. You only need to explicitely allow files that 
     where cancelled by a filter. Each negative filter has its own positive  
filter (allowed) sublist. 
 
     For DOS/Windows images, you will typically use  
 
             Filter -"*.swp" 
             Filter -"temp/*" 
 
     and for Unix images, you will typically use  
 
             Filter -"var/log/*" 
             Filter -"tmp/*" 
 
CopyArchive 
     Start the archive manipulation operation, according to source,  
destination and filter settings. Except in a few circumstances, 
     you will probably use the shortcut below instead of explicitely calling  
CopyArchive. One circumstance in which you will 
     use CopyArchive explicitely is when you want to change the fragmentation  
of an image, as follow:  
 
             set FragmentSize="30 MB" 
             Source archive "original.imz" 
             Dest archive "refragmented.imz" 
             CopyArchive 
 
FullZip "path" "full-archive" 
     Shortcut for  
 
                     Source path "path" 
                     Dest archive "full-archive" 
                     CopyArchive 
 
     You should usually first setup filters. 
 
IncrZip "path" "incr-archive" 
     Shortcut for  
 
                     Source path "path" 
                     Dest iarchive "incr-archive" 
                     CopyArchive 
 
FullDump "full-archive" 
     Shortcut for  
 
                     Source archive "full-archive" 
                     Dest dump 
                     CopyArchive 
 
IncrDump "incr-archive" 
     Shortcut for  
 
                     Source iarchive "incr-archive" 
                     Dest dump 
                     CopyArchive 
 
XCopy "srcpath" "dstpath" 
     Shortcut for  
 
                     Source path "srcpath" 
                     Dest path "dstpath" 
                     CopyArchive 
 
5.2 NoBreak.sys 
 
Nobreak.sys is a very small (about 350 bytes only) driver that you include at  
the beginning of your config.sys. Its goal is 
to secure the boot process, until the user is logged in. DOS provides a  
setting for this (namely BREAK=OFF), but it is not drastic 
enough, and has almost no effect in the autoexec.bat. Our driver works by  
modifying the scan-code of the key pressed when 
a break is requested, directly at the BIOS level. This way, no program at all  
can receive a break until break is enabled again. 
 
The driver must be loaded from the config.sys (or using the devlod program  
from Undocumented DOS). Afterwards, 
break can be enabled by sending Yes to the NOBRK pseudo-device, and disabled  
again by sending No (in fact, only the first 
character, Y or N is significant). 
 
As this driver relies on the BIOS, it does only work for DOS and Windows 3.1.  
Windows 95 has its own low-level keyboard 
handling routines. 
 
Assembler source code is available. 
-- 
    白马带著她一步步的回到中原。白马已经老了,只能慢慢的走, 
但终是能回到中原的。江南有杨柳、桃花,有燕子、金鱼…… 
汉人中有的是英俊勇武的少年,倜傥潇洒的少年……但这个美 
丽的姑娘就像古高昌国人那样固执: 
 
    「那都是很好很好的,可是我偏不喜欢。」  
 
※ 来源:·BBS 水木清华站 bbs.net.tsinghua.edu.cn·[FROM: 202.99.18.67]  

BBS水木清华站∶精华区