![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-10-26 07:56 |
47,815 topics / 349,928 posts / today 0 new / 48,288 members |
| DOS启动盘 & LOGO技术 (启动盘室) » [Seeking revisions] System install/backup/restore boot disk (Chinese) |
| Printable Version 2,500 / 21 |
| Floor1 QEYU | Posted 2003-07-25 00:00 |
| 中级用户 Posts 42 Credits 229 | |
|
I practiced making a system install/backup/restore boot disk that includes GHOST7.5, and I sincerely ask the moderator and everyone to give advice, make changes, and help improve it. Thank you!
Since I don't understand DOS, there will definitely be many places that make everyone laugh, so please forgive me and help me out. Is it possible to intelligently back up the image to the last partition of the hard disk. What commonly used tools should be added. @echo off set EXPAND=YES SET DIRCMD=/O:N set comspec=a:\command.com path=a:\;c:\ lh a:\TW /np lh a:\mouse.exe lh a:\mscdex.exe /d:mscd001 lh a:\doskey lh a:\smartdrv lh a:\ntfsdos cls echo. echo. echo. echo. cls echo. echo ==================== echo ★ “Magic” System Install Backup Restore Boot Disk ★ echo ======= Made by: QEYU ======= echo. echo This install boot disk was made based on the Windows Millennium (MS-DOS 8.0) Bootdisk, echo and is suitable for system installation under DOS, GHOST operations, etc. echo During the making of this boot disk, I received technical support from China DOS Union and echo CCF Quality Technology Forum, and I would like to express my thanks here. echo. echo ○ This boot disk has automatically loaded HIMEM and SMARTDRV, and can directly install operating systems. echo ○ It can run the FDISK program to partition the hard disk. echo ○ You can use the FORMAT command to format partitions. echo ○ It can perform GHOST operations such as automatic or manual system backup and system restore. echo. echo. echo ■ Operation menu: echo. echo 1 ─ Automatic system backup echo 2 ─ Automatic system restore echo 3 ─ Manual GHOST operation echo 4 ─ Enter DOS prompt echo. choice /c:1234 ▲ Please press the number of the item listed above to make your selection if errorlevel 4 goto tishifu if errorlevel 3 goto shoudong if errorlevel 2 goto huifu if errorlevel 1 goto beifen :beifen echo. echo You have selected automatic system backup. Please wait... a:\ghost.exe -clone,mode=pdump,src=1:1,dst=d:\system.gho -sure echo. echo. echo ◇ Automatic system backup is complete. Please remove the floppy disk and press Ctrl+Alt+Del to restart the system. goto end :huifu echo. echo You have selected automatic system restore. Please wait... a:\ghost.exe -clone,mode=pload,src=d:\system.gho:1,dst=1:1 -sure echo. echo. echo ◇ Automatic system restore is complete. Please remove the floppy disk and press Ctrl+Alt+Del to restart the system. goto end :shoudong echo. echo You have selected manual GHOST operation. Please wait while entering the GHOST interface... a:\ghost.exe echo. echo. echo ◇ Please carry out other operations, or press Ctrl+Alt+Del to restart the system. goto end :tishifu cls echo. :end echo. device=a:\himem.sys /testmem ffdevicehigh=a:\vide-cdd.sys /d:mscd001 dos=high,umb,auto files=30 buffers=30 stacks=9,256 lastdrive=Z |
|
| Floor2 dsm75 | Posted 2003-07-25 00:00 |
| 中级用户 Posts 44 Credits 238 | |
|
You can use dready to determine the last drive letter,
set lastdrv= for %%i in ( q p o n m l k j i h g f e d c) do call chkdrv.bat %%I your command Contents of chkdrv.bat if not %lastdrv%'==' goto _end dready %1 /w if errorlevel 2 goto _end set lastdrv=%1 _end Add wbat and locate and you can select and determine the gho file Once it's written, let everyone enjoy it, okay |
|
| Floor3 walu | Posted 2003-07-25 00:00 |
| 高级用户 Posts 201 Credits 916 | |
|
Please post it as an attachment for everyone to enjoy, thanks!
|
|
| Floor4 QEYU | Posted 2003-07-26 00:00 |
| 中级用户 Posts 42 Credits 229 | |
The following is quoted from dsm75's post at 2003-7-25 22:01:53: I can't make sense of it, it's really troublesome, and I just can't connect it with Ghost. What I uploaded defaults to backing up to drive D:, so please help revise and correct it. Many thanks! Open attachment |
|
| Floor5 QEYU | Posted 2003-07-26 00:00 |
| 中级用户 Posts 42 Credits 229 | |
The following is quoted from walu's post at 2003-7-25 22:11:30: I've uploaded it. I also hope we can improve it together. Thanks! Doing something practical for LP and MM is the purpose behind making this boot disk. |
|
| Floor6 hzy | Posted 2003-07-26 00:00 |
| 高级用户 Posts 135 Credits 578 | |
|
Jumping in:
This is my own backup/restore disk for personal use, please help improve it! Questions: 1. I want to change the default backup destination from drive D: to the first partition after D: that has more than 2G of free space. How can this be done? 2. Can wbat display prompt text on multiple lines (sometimes I want to write more detailed prompt information)? How can this be done? @ECHO Off CLS SMARTDRV > NUL LH KILLER > NUL LH DOSKEY > NUL LH CTMOUSE > NUL LH MOUSCLIP /M > NUL LH SHSUCDX /d:MSCD000 > NUL LH DOSLFN /Z:CP936UNI.TBL > NUL XMSDSK 2048 /Y > NUL FINDCD > NUL FINDRAMD > NUL PKUNZIP -o %RAMDRIVE%\ DOSCAB.ZIP > NUL PATH=%RAMDRIVE%.;A:.;%CDROM%.;C:.;D:.;E:.;F:..G:.;H:.;I:.;J:.;K:.;L:.;M:.;N:.;O:.;P:.;Q:.;R:.;S:.;T:.;U:.;V:.;W:.;X:.;Y:.;Z: LH TW /NP > NUL CLS :Begin cls WBAT BOX "SYMANTEC GHOST Backup/Restore Program! (Please make your selection within 15 seconds)",Auto backup,Auto restore,Man ual,Ex it #4,15 IF ERRORLEVEL 4 goto end IF ERRORLEVEL 3 goto _Manual IF ERRORLEVEL 2 goto _Restore IF ERRORLEVEL 1 goto _Backup :_Backup cls WBAT BOX "The program will automatically create a 696MB split image backup of drive C on drive D!",Confi rm,Ret urn,Ex it #3 IF ERRORLEVEL 3 goto end IF ERRORLEVEL 2 goto Begin IF ERRORLEVEL 1 goto _Autobackup :_Autobackup ghost -clone,mode=pdump,src=1:1,dst=D:\backup.gho -split=696 -z9 -auto -sure goto _end :_Restore cls WBAT BOX "Please choose the backup you want to restore!",CD backup,Other backup,Ret urn,Ex it #4 IF ERRORLEVEL 4 goto end IF ERRORLEVEL 3 goto Begin IF ERRORLEVEL 2 goto _Select IF ERRORLEVEL 1 goto _Cdrom :_Cdrom WBAT BOX "The existing data on drive C will be completely deleted! Do you really want to restore the CD backup?",Confi rm,Choose again,Ex it #3 IF ERRORLEVEL 3 goto end IF ERRORLEVEL 2 goto _Restore IF ERRORLEVEL 1 goto _Restore1 :_Restore1 ghost -clone,mode=pload,src=%CDROM%\backup.gho:1,dst=1:1 -auto -sure goto _end :_Select cls set get= get s "Please enter the full name of the backup file to restore (including extension):" copy /y backup.bat %ramdrive%\ > nul for %%a in (d: e: f: g: h: i: j: k: l: m: n: o: p: q: r: s: t: u: v: w: x: y: z do if exist %%a\%get% dir /b /s %%a\%get% >>%ramdrive%\backup.batcall %ramdrive%\backup.bat if not %backup%"==" goto _find WBAT BOX "Sorry! The backup file you wanted to restore was not found",Re-enter,Backup list,Ex it #3 IF ERRORLEVEL 3 goto end IF ERRORLEVEL 2 goto dir_gho IF ERRORLEVEL 1 goto _Select :_find cls WBAT BOX "The backup file has been found. If restore is executed, the existing data on drive C will be completely deleted!",Confi rm,Re-enter,Ex it #3 IF ERRORLEVEL 3 goto end IF ERRORLEVEL 2 goto _Select IF ERRORLEVEL 1 goto _Restore1 :_Restore1 ghost -clone,mode=pload,src=%backup%:1,dst=1:1 -auto -sure goto _end :dir_gho cls WRITEXT 1+ 1 -f10 The list of backup files on your computer is as follows: echo. for %%a in (d: e: f: g: h: i: j: k: l: m: n: o: p: q: r: s: t: u: v: w: x: y: z do if exist %%a\*.gho dir /b /s %%a\*.ghoWBAT BOX "If the backup file exists, the program will list it here!",Return to start,Re-enter,Ex it #3 IF ERRORLEVEL 3 goto end IF ERRORLEVEL 2 goto _Select IF ERRORLEVEL 1 goto Begin :_end %RAMDRIVE%\ reboot.bat :_Manual ghost.exe :end cls a:\ set backup= cls echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. WRITEXT 0+ 23 -f10 Please remove the CD and press any key to restart your computer ! echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. eject.com > NUL pause > nul reboot.com > nul |
|
| Floor7 dsm75 | Posted 2003-07-28 00:00 |
| 中级用户 Posts 44 Credits 238 | |
|
Below is a simple example of using wbat to display prompt text on multiple lines.
findcd >nul FINDRAMD>NUL echo @echo off >%tmp%\_menu.bat echo %RAMDRIVE% >>%tmp%\_menu.bat echo call w.bat pal ! cls ! box @%%0:_txt #1,15>>%tmp%\_menu.bat echo if errorlevel 2 goto exit>>%tmp%\_menu.bat echo if errorlevel 1 call menu.bat>>%tmp%\_menu.bat echo goto exit>>%tmp%\_menu.bat echo :_txt "Congratulations, you have successfully booted the system">>%tmp%\_menu.bat echo.>>%tmp%\_menu.bat IF NOT %CDROM%#==# ECHO Your CD-ROM drive has been loaded as drive %CDROM% >>%tmp%\_menu.bat IF NOT %CDROM%#==# ECHO.>>%tmp%\_menu.bat IF NOT %RAMDRIVE%#==# ECHO Your virtual drive has been loaded as drive %RAMDRIVE% >>%tmp%\_menu.bat IF NOT %RAMDRIVE%#==# ECHO.>>%tmp%\_menu.bat ECHO If you want to start the graphical menu, type menu at the command line to start the menu>>%tmp%\_menu.bat ECHO.>>%tmp%\_menu.bat ECHO The graphical menu will now start in #? seconds>>%tmp%\_menu.bat echo.>>%tmp%\_menu.bat echo >>%tmp%\_menu.bat echo :exit>>%tmp%\_menu.bat echo set wbat=>>%tmp%\_menu.bat %RAMDRIVE% call %tmp%\_menu.bat goto exit |
|
| Floor8 沈洁 | Posted 2003-07-28 00:00 |
| 金牌会员 Posts 1,812 Credits 4,590 From 上海市 | |
|
It would be best to load smartdrv twice
At the same time, smartdrv should also have appropriate parameters! For example, the most important thing is the cache size, Add more, 16MB would be pretty fierce! If you don't add parameters, it's equivalent to loading only 256KB! That's really far too little! |
|
| Floor9 wglwx | Posted 2003-07-29 00:00 |
| 高级用户 Posts 187 Credits 616 | |
The following is quoted from 沈洁's post at 2003-7-28 22:28:45: If you don't add parameters, when smartdrv is loaded it automatically decides the cache size according to the size of the computer's extended memory. Under DOS: Extended memory: 2M Cache size: 1M Extended memory: 6M Cache size: 2M 256K is when the extended memory is only 2M, and the cache size when using WINDOWS. |
|
| Floor10 QEYU | Posted 2003-07-29 00:00 |
| 中级用户 Posts 42 Credits 229 | |
|
@echo off
if not %lastdrv%'==' goto _end if %1'==' goto _end if %1==%cdrom% goto _end if %1==%RAMDRIVE% goto _end dready %1 /w if errorlevel 2 goto _end set lastdrv=%1 :_end Why is the lastdrv found the CD-ROM drive? Is it related to %CDROM% and %RAMDRIVE%? What exactly should I do? |
|
| Floor11 yuanxin | Posted 2003-07-29 00:00 |
| 中级用户 Posts 53 Credits 230 | |
|
Post it and let us have a look
|
|
| Floor12 QEYU | Posted 2003-07-29 00:00 |
| 中级用户 Posts 42 Credits 229 | |
The following is quoted from QEYU's post at 2003-7-29 8:03:28: The problem is solved. I used a makeshift workaround: before items like "Automatic system backup" and "Automatic system restore", do not load the CD-ROM drive; only load the CD-ROM drive before the "Enter DOS prompt" item. Thank you all very much for your help! |
|
| Floor13 dsm75 | Posted 2003-07-29 00:00 |
| 中级用户 Posts 44 Credits 238 | |
|
if %1==%cdrom% goto _end checks whether it is the CD-ROM drive
if %1==%RAMDRIVE% goto _end checks whether it is the virtual drive, if it is, goto _end and skip it if not, use the tool dready %1 /w to check whether that drive exists |
|
| Floor14 QEYU | Posted 2003-07-30 00:00 |
| 中级用户 Posts 42 Credits 229 | |
The following is quoted from dsm75's post at 2003-7-29 21:14:34: At first I did it this way too, but lastdrv was still cdrom. Maybe it wasn't loaded into %cdrom%? This super newbie asks one more question: how do you load a virtual drive? Ghost keeps writing the ghosterr.txt file to drive A:. What exactly should I do? |
|
| Floor15 dsm75 | Posted 2003-07-31 00:00 |
| 中级用户 Posts 44 Credits 238 | |
|
%cdrom% is a variable automatically assigned by Wengier's dos boot disk's fincd file. %RAMDRIVE% is also automatically assigned by Wengier's findramd file
You can add this at the end of autoexec.bat findcd >nul findramd >nul and then copy these two files to drive A: xmsdsk 4096 /y /t can load a virtual drive For details, you can look at Wengier's boot disk, there are still quite a lot of useful things in it |
|
| 1 2 Next |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |