dosminix.8

来自「minix操作系统最新版本(3.1.1)的源代码」· 8 代码 · 共 288 行

8
288
字号
.TH DOSMINIX 8.SH NAMEdosminix, mkfile \- Running MINIX 3 under DOS.SH SYNOPSIS.RB "C:\eMINIX> " "boot disk0.mnx" "\0\0\0\0\0(Typical example)".br.RB "C:\eMINIX> " "mkfile \fIsize disk".SH DESCRIPTION.de SP.if t .sp 0.4.if n .sp..This text describes running MINIX 3.\" or Minix-vmdunder DOS.  The DOS versionof the Boot Monitor, described in.BR monitor (8),grabs as much memory as DOS is willing to give, loads MINIX 3 into that memoryfrom the active partition of a "file as disk", and jumps to the MINIX 3 kernelto let MINIX 3 take control.  As far as DOS is concerned MINIX 3 is just a partof the.B boot.comprogram..PPIn the example above.B disk0.mnxis the "file as disk".  It is a file of many megabytes that is used by MINIX 3as a disk of four partitions.  These partitions will normally be.B /dev/dosd1through.BR /dev/dosd4 ,with.BR /dev/dosd0for the whole "disk".  The Boot Monitor will set the.B dosd0boot variable to the name of the disk (its first argument), the root filesystem will be the active partition, usually.BR dosd1 .It is better to use the special name.B bootdevto indicate this device, usually in the setting.BR rootdev = bootdev ..PPOnce MINIX 3 is running it will operate the same as if started from a regulardisk partition until it is shut down.  On shutdown from protected mode itwill return to the Boot Monitor prompt, and with the.B exitcommand you leave the Boot Monitor and return to DOS.  Shutting down fromreal mode will reboot the machine, just like when run from a disk partition.(This more or less crashes DOS, but DOS is used to such abuse.).SS EMM386MINIX 3 can't run in protected mode (286 or 386 mode) if DOS is using a memorymanager like.BR EMM386 .You can either temporarily comment out EMM386 from.BR CONFIG.SYS ,or you can press.B F8on startup to bypass CONFIG.SYS.  This is only possible with the later DOSversions..SS "Windows 95"Press F8 at startup to make the boot menu visible.  Choose"\fBCommand prompt\fP", or "\fBSafe mode command prompt\fP" to run DOS.Use the "safe mode" if EMM386 is started in CONFIG.SYS..PPTyping F8 at the right moment isn't easy, so you may want to change the wayWindows boots by editing the.B MSDOS.SYSfile found in the root directory of your Windows system.  This is alas nottrivial.Open a window on your main drive, click on "\fBView\fP" and choose"\fBOptions\fP."  In the Options window choose "\fBView\fP" and enable"\fBShow all files\fP".  The MSDOS.SYS file should now be visible, amongseveral other hidden files.  Right-click on the MSDOS.SYS icon, choose"\fBProperties\fP" and disable "\fBRead-only\fP".  Bring MSDOS.SYS into asimple text editor such as Notepad.  In the.B "[Options]"segment add the following lines (or change existing lines into):.PP.RS.nfBootMenu=2BootMenuDelay=5.fi.RE.PPThe first setting makes the Windows boot menu always visible, and the secondline changes the delay before booting to 5 seconds.  Take care not to changeanything else, or things will go horribly wrong.  Save MSDOS.SYS and exit.Don't forget to make MSDOS.SYS read-only again, and also hide all the hiddenfiles again, unless you like it this way..SS "DOS compatibility box"The 16-bit version of standard MINIX 3 can be run in real mode in a DOS box.This is somewhat surprising, because it means Windows 95 simulates deviceslike the keyboard, timer, and interrupt controller well enough to fool MINIX 3into thinking that all is well.  Alas it doesn't work as well under WindowsNT.  Keypresses get lost if you type to fast, and using the floppyoccasionally locks MINIX 3 up.  This is a bit disappointing, because it is theonly way to run MINIX 3 under NT.  Under Windows 95 one is better offputting the system in DOS at boot and then to run MINIX 3 in protected mode..PPOne thing that is better under NT is that the Boot Monitor is able to get aso-called "Upper Memory Block", thereby raising useful memory to about 750K.Windows 95 however hogs leftover UMB memory in a process named.BR vmm32 ,whatever that may be.  To getsome of this memory you can put.B "BOOT /U"at the start of.BR autoexec.bat .The monitor will grab a 64K UMB if it can get it, and keep that memory safefor use by MINIX 3 when it is later started from Windows..PPThe easiest way to start MINIX 3 is to give all MINIX 3 disk files the suffix.BR MNX .Doubleclick on the disk you want to run to make the "\fBOpen With\fP" windowappear.  Click on "\fBOther\fP" and browse to the.B BOOT.COMprogram.  Set the name of the .mnx files to "\fBMINIX 3 "disk" file\fP" in thedescription box if you want everything right.  In the future you canjust click on a MINIX 3 disk file to run it, you don't have to start a DOSbox first.  (To make it perfect use "View", "Options", "File Types", choose"MINIX 3 "disk" file", "Edit", "Change Icon", "Browse", select MINIX.ICO.).PPWhen MINIX 3 shuts down it will try to reboot what it thinks is a PC.  Windowsseems to assume that the DOS session has exited.  Right-click on theBOOT.COM program, "Properties", "Program", and enable "Close on exit" to makethe DOS box disappear automatically when MINIX 3 thinks it reboots.  You mayalso want to lock the font to.BR 7x12 ,or any other font that isn't ugly..PPMINIX 3 disk files are opened in a write-exclusive mode.  A second MINIX 3session can only open it read-only, which may lead to a "can't openroot device" error..SS "Mkfile"MINIX 3 disk files can be created or resized with the.B mkfileutility.  Its two arguments are the size and name of the disk file.  Thesize is a number optionally followed by the letter.BR k ,.BR mor.BR gto specify kilobytes, megabytes, or even gigabytes.  So the call.PP.RS.B "mkfile 50m disk5.mnx".RE.PPwill create a 50 megabyte file named.BR disk5.mnx .If the file already exist then it is shrunk or grown to 50 megabytes.  Nodata is lost if the file is grown.  If the file is shrunk then only the datathat is cut off is lost.  These features allow one to inrease the size of aMINIX 3 /usr partition with the following recipe:.PP.RS.ta +24n+2m.nfcopy disk0.mnx disk0.new	Copy the disk to disk0.newmkfile 100M disk0.new	Enlarge to 100 megabytesboot disk0.mnx	Boot the old "disk"[ESC]	Get the attention of the monitordosd5=disk0.new	/dev/dosd5 becomes disk0.newboot\&...login: root.fi.in +(24n+2m).ti -(24n+2m)part	Choose dosd5, move to the Size field of dosd7partition, hit 'm' to fill it out to the end of the "disk".  Write and quit..in -(24n+2m).nfmkfs /dev/dosd7	Recreate the file system, but largermount /dev/dosd7 /mntcpdir -v /usr /mnt	Copy /usr to the new disk's /usr to beshutdown	Back to the monitorexit	Back to DOSren disk0.mnx disk0.oldren disk0.new disk0.mnx	Replace old by newboot disk0.mnx	Run the larger system.fi.RE.PPNow MINIX 3 runs from a larger "disk".  Don't worry if it claims to havecrashed, there wasn't a "shutdown" entry in /usr/adm/wtmp at the time it wascopied..PPThe above recipe is for a ordinary standard MINIX 3 installation with /usr onthe second and last partition..\" Minix-vmd usually has /usr on the third and.\" last partition (dosd3 / dosd8), its.\" .B mkfs.\" command requires a.\" .B "-t\ 2f".\" option to specify the file system type as "V2 flex", and it knows if.\" it has crashed or not..SS BackupsIn the recipe above you saw how simple it is to create a new system, justcopy a disk file.  It is equally simple to make a backup, you just copy thedisk file.  To make a test system: copy the disk file.  To make another testsystem: copy the disk file.  Let friends have their own MINIX 3: copy the diskfile again.  (Exciting, eh?).PPYou may want to save a MINIX 3 disk file in a ZIP file to save space.  It maylook as a good idea to first run.B "make clean"in.B /usr/srcto remove all the binary junk, but alas that has no effect at all.The disk file is compressed under DOS, and there it is unknown which blocksare in use and which are free.  With the following trick you can make thosedeleted blocks compress really well:.PP.RS.nfcd /usr/tmpecho >junkwhile cat junk >>junk; do :; donesyncrm junk.fi.RE.PPAfter these commands all free blocks contain newlines.  Long runs of thesame byte happen to compress by a factor 1000, so the unused disk blockswill almost disappear in the ZIP file..\" Under Minix-vmd you can use.\" .PP.\" .RS.\" cp /dev/zero junk.\" .RE.\" .PP.\" instead of the echo/while pair of lines above.  Standard MINIX 3 doesn't have.\" /dev/zero..SS "FAT driver"The dos disk driver, described in.BR dosd (4),has two identities.  By default you get the "\fBfile\fP" driver, that usesDOS file I/O calls to access a large DOS file as a disk.  The otheralternative is the "\fBFAT\fP" driver.  The FAT driver sits on top of anordinary MINIX 3 disk driver, and interprets a partition as a FAT (File AccessTable) file system to find a file to use as a MINIX 3 disk.  The resulthas the same effect as the file driver, except that no costly calls to DOSare made.  To enable this feature you have to use the following Bootenvironment settings:.PP.RS.nfdosd = fatdosd0 = hd1:\eminix\edisk0.mnx.fi.RE.PPThe.B dosdsetting tells MINIX 3 to use the FAT driver, and the.B dosd0setting tells the MINIX 3 device and DOS file name to use.  Disk I/O shouldbe sped up nicely by this change, although typical use of MINIX 3 doesn'trequire fast disk I/O, so the difference won't be too noticable..PPSupport for FAT-32 (big file system support added in the later Windows 95releases) has not been tested very well.  The FAT-12 and FAT-16 code hasbeen used a lot, and seems safe.  Note the risks inherent in thesedrivers:  The file driver uses simple DOS file I/O calls, leaving it toDOS to know its own file system.  The FAT driver interprets FAT file systemstructures by itself.  MINIX 3 booted from a real hard disk partition canonly use DOS disk files through the FAT driver..SH "SEE ALSO".BR dosd (4),.BR monitor (8),.BR usage (8)..SH NOTESUse at your own risk..SH BUGSHasn't been tried under Windows 98 yet..PPPray the deity of your choice will forgive you for running a UNIX-likesystem as an ordinary DOS program.  The author of this code is alreadydoomed.  When his time comes the daemons wi*(&%*$%*&.brMemory fault \- core dumped.SH AUTHORKees J. Bot (kjb@cs.vu.nl)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?