Bootable, TCP/IP network-capable DOS floppy

  Here are the files from the floppy. This is a DOS 6.22 floppy instead of DOS 9x to avoid Win 9x from formatting partitions with a LOCK on them which cause problems when restoring images. Also, IO.SYS and MSDOS.SYS combined only take 70K as opposed to over 200K on a DOS 9x.

As I am no guru when it comes with DOS batch files, and I'd much rather spend time with Perl, Python, and the such, there are probably better ways to do things in the configuration files below. Also, I just started checking out JP Software's excellent 4DOS and 4NT shell replacement for COMMAND.COM because of its much richer batch features, so this stuff is probably better handled by 4DOS (http://www.jpsoftware.com).  Here is the boot image (use sharewareWinImage to write it to a floppy.)

FILES

IO.SYS
MSDOS.SYS
4DOS.COM
4DOS.DAT
4DOS.INI
Config.sys
RAMDRIVE.SYS
SBIDE.SYS
TAISATAP.SYS
EMM386.EXE
FINDRAMD.EXE
HIMEM.SYS
IFSHLP.SYS
KEYB.COM
KEYBOARD.SYS
Autoexec.bat
PKUNZJR.COM
NCDOS.ZIP
NET.ZIP
PQMAGICT.ZIP
UTILS.ZIP
 

CONFIG.SYS

[menu]
menuitem=CD14,CDROM on IDE plug 1
menuitem=CD15,CDROM on IDE plug 2
menuitem=NOCD,No CDROM
menudefault=NOCD,30

[GENERAL]
device=himem.sys /testmem:off
device=emm386.exe noems
dos=high,umb
SHELL=A:\4DOS.COM /F /P

[CD14]
INCLUDE=GENERAL
devicehigh=sbide.sys /D:mscd001 /P:1F0,14

[CD15]
INCLUDE=GENERAL
devicehigh=sbide.sys /D:mscd001 /P:170,15

[NOCD]
INCLUDE=GENERAL

[COMMON]
devicehigh=IFSHLP.SYS
stacks=9,256
FILES=20
buffers=10
lastdrive=z
DEVICEHIGH=RAMDRIVE.SYS 4096 /E
 

AUTOEXEC.BAT

SET COMSPEC=A:\4DOS.COM

@ECHO OFF
FINDRAMD
if errorlevel=6 GOTO DRIVEF
if errorlevel=5 GOTO DRIVEE
if errorlevel=4 GOTO DRIVED
if errorlevel=3 GOTO DRIVEC
GOTO END

:DRIVEF
set ramdisk=F:\
GOTO MAIN

:DRIVEE
set ramdisk=E:\
GOTO MAIN

:DRIVED
set ramdisk=D:\
GOTO MAIN

:DRIVEC
set ramdisk=C:\
GOTO MAIN

:MAIN
REM --------- Connect to the network to get zipped stuff
PROMPT $p$g
SET TEMP=%ramdisk%
SET TMP=%ramdisk%

MKDIR %ramdisk%NET
MKDIR %ramdisk%NCDOS
MKDIR %ramdisk%DOS
MKDIR %ramdisk%4DOS
PATH=%ramdisk%;%ramdisk%NET;%ramdisk%NCDOS;%ramdisk%DOS;%ramdisk%4DOS;A:\

COPY A:\PKUNZJR.COM %ramdisk%DOS

COPY A:\NET.ZIP %ramdisk%NET

%ramdisk%
CD %ramdisk%NET
PKUNZJR NET.ZIP
DEL NET.ZIP

REM The whole reason for this, is that you need to generate a unique NetBIOS name
ECHO [network] >> SYSTEM.INI
ECHO filesharing=no >> SYSTEM.INI
ECHO printsharing=no  >> SYSTEM.INI
ECHO autologon=yes  >> SYSTEM.INI
ECHO computername=TMP-%_hour-%_minute-%_second >> SYSTEM.INI
ECHO lanroot=%ramdisk%NET  >> SYSTEM.INI
ECHO username=TEST  >> SYSTEM.INI
ECHO workgroup=ACME  >> SYSTEM.INI
ECHO reconnect=no  >> SYSTEM.INI
ECHO directhost=no  >> SYSTEM.INI
ECHO dospophotkey=N  >> SYSTEM.INI
ECHO lmlogon=0  >> SYSTEM.INI
ECHO logondomain=MYCOMPANY  >> SYSTEM.INI
ECHO preferredredir=full  >> SYSTEM.INI
ECHO autostart=full  >> SYSTEM.INI
ECHO maxconnections=8  >> SYSTEM.INI
ECHO [network drivers]  >> SYSTEM.INI
ECHO netcard=El90x.dos  >> SYSTEM.INI
ECHO transport=tcpdrv.dos,nemm.dos  >> SYSTEM.INI
ECHO devdir=%ramdisk%NET  >> SYSTEM.INI
ECHO LoadRMDrivers=yes  >> SYSTEM.INI

%ramdisk%
CD %ramdisk%NET
%ramdisk%net\net initialize
%ramdisk%net\netbind.com
%ramdisk%net\umb.com
%ramdisk%net\tcptsr.exe
%ramdisk%net\tinyrfc.exe
%ramdisk%net\nmtsr.exe
%ramdisk%net\emsbfr.exe

%ramdisk%net\net start
%ramdisk%net\net use y: \\MIS\IMAGES

COPY Y:\DOSUTILS.ZIP %ramdisk%DOS > NUL
COPY Y:\NCDOS.ZIP %ramdisk%NCDOS > NUL

%ramdisk%
CD %ramdisk%DOS
PKUNZJR DOSUTILS.ZIP
DEL DOSUTILS.ZIP

%ramdisk%
CD %ramdisk%NCDOS
PKUNZJR NCDOS.ZIP
DEL NCDOS.ZIP

MOUSE.COM

goto %config%
:NOCD
GOTO CONFIGURE

:CD14
:CD15
LH MSCDEX.EXE /D:mscd001 /M:8

:CONFIGURE
LH SMARTDRV.EXE /X
LH KEYB FR

REM CLS

NET USE

ECHO @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
ECHO Need a text editor and unzipper? Norton Commander to the rescue!
ECHO @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

:END
 

NET.ZIP

This a compressed file that contains all the stuff you need to connect to a remote TCP/IP host with a 3Com 905B network card. The extra SYSTEM.INI file is created live in AUTOEXEC.BAT.

11/18/96  01:38a                   817 lmhosts
11/18/96  01:38a                   395 networks
11/18/96  01:38a                   795 protocol
11/18/96  01:38a                   840 wfwsys.cfg
11/18/96  01:38a                 8,513 netbind.com
11/18/96  01:38a                 3,325 umb.com
11/10/99  11:59a                     0 CONNECT.DAT
04/17/98  04:15p                48,448 EL90X.DOS
11/18/96  01:38a                 2,619 nemm.dos
11/18/96  01:38a                21,940 protman.dos
11/18/96  01:38a                 4,174 tcpdrv.dos
11/18/96  01:38a                 4,294 emsbfr.exe
11/18/96  01:38a               450,342 net.exe
11/18/96  01:38a                22,826 nmtsr.exe
11/18/96  01:38a                13,782 protman.exe
11/18/96  01:38a                71,040 tcptsr.exe
11/18/96  01:38a                37,024 tinyrfc.exe
11/18/96  01:38a                 1,531 setup.inf
11/18/96  01:38a                 1,477 wcsetup.inf
10/11/99  12:30p                   425 protocol.ini
11/18/96  01:38a                   233 tcputils.ini
11/18/96  01:38a                76,234 net.msg
11/18/96  01:38a               123,066 neth.msg
11/18/96  01:38a                 4,468 ndishlp.sys

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
`bootable/recovery/recovery.cpp` 是 Android 源码中 `recovery` 模块的主要启动代码,该文件定义了 `main()` 函数,用于启动 `recovery` 程序,并执行相应的操作。下面是 `recovery.cpp` 文件的部分代码: ```cpp int main(int argc, char **argv) { RecoveryUI::Options ui_options; ui_options.allow_toggle_display = true; ui_options.locale = ""; RecoveryUI ui(ui_options); ... // Initialize the recovery API. if (register_update_callback(&on_update, &ui)) { LOGE("Can't register the update callback\n"); return EXIT_FAILURE; } ... // Initialize the command listener. if (!strcmp(basename(argv[0]), "recovery")) { // In recovery mode, only listen on the socket. if (socket_name.empty()) { socket_name = DEFAULT_SOCKET; } if (start_recovery_socket(socket_name, &should_abort)) { LOGE("Can't start recovery service with socket '%s'\n", socket_name.c_str()); return EXIT_FAILURE; } } else { ... } ... } ``` 在 `main()` 函数中,首先创建了一个 `RecoveryUI` 对象,用于管理 `recovery` 界面的显示。接着,通过调用 `register_update_callback()` 函数注册了更新回调函数 `on_update()`,用于在更新过程中更新 `recovery` 界面的显示。最后,根据启动命令行参数,启动相应的服务,包括 `recovery` 服务和 `adb` 服务。 需要注意的是,`recovery` 模块的启动和执行过程比较复杂,涉及到诸多细节问题。如果想深入了解 `recovery` 模块的实现原理,需要仔细阅读 `bootable/recovery` 目录下的其他源代码文件。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值