China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-15 13:36
中国DOS联盟论坛 » DOS疑难解答 & 问题讨论 (解答室) » Regarding the issue of restoring the system using a SATA optical drive bootable disk. View 2,004 Replies 5
Original Poster Posted 2009-01-24 12:35 ·  中国 山东 济南 联通
新手上路
Credits 4
Posts 3
Joined 2009-01-23 15:42
17-year member
UID 137316
Gender Male
Status Offline
I'm making a system recovery CD and need to achieve the function of inserting the CD to restore the system. I've modified someone else's program but haven't succeeded yet. Please help see where the problem is. Thanks. The relevant statement for using option 1 to perform system recovery is: ghost.exe -clone,mode=pload,src=D:\System Backup\XP_01222009.GHO,dst=1:1 -fx -sure -rb. The system boot guide file in the recovery CD is loaded in the virtual hard disk, and ghost.exe is loaded on the CD.

The program is as follows:

1. AUTOEXEC.BAT

@ECHO OFF

XMSDSK 4096 /Y

LH MSCDEX /D:IDE-CD /D:SCSI-CD /D:SATA-CD /D:USB-CD /S /K
FINDCD /S
SET CDR=%CDROM1%

%CDR%


@echo off

:loop

%cdrom%
cls
echo.
echo ********************************************************
echo.
echo Choice Action
echo.
echo 1 Start Ghost
echo.
echo 2 Quit to MS-DOS
echo.
echo ********************************************************
echo.
CHOICE /N /C:12 PICK A NUMBER (1, 2)%1
echo.

if errorlevel ==2 goto dos
if errorlevel ==1 goto ghost

:ghost
cls
pause
ghost.exe -clone,mode=pload,src=D:\System Backup\XP_01222009.GHO,dst=1:1 -fx -sure -rb

:dos
cls
echo Opening MS-DOS Prompt
echo.
:: next 3 lines added on 9/10/02, L.Ebright, DimIPS
echo Diskette drive A: has been re-assigned due to the CD-ROM boot process
echo and is NOT available when the system is started using the CD.
echo To use the Diskette drive, use drive letter B:
echo.
echo A RAMDISK drive is available for this boot cycle as %RAMD%:
echo It contains several Hard Drive setup tools. Please use these
echo tools only under the direction of Dell Support Staff.
echo.
echo Type "exit" to go back to the menu.
echo.
command
goto loop

:end
cls

2. config.sys

files=10
buffers=15
dos=high,umb
stacks=9,256
lastdrive=z
device=himem.sys /testmem:off
DEVICEHIGH=VIDE-CDD.SYS /D:IDE-CD
DEVICEHIGH=ASPICD.SYS /D:SCSI-CD
DEVICEHIGH=gcdrom.sys /D:SATA-CD
DEVICEHIGH=USBCD.SYS /D:USB-CD
Floor 2 Posted 2009-01-24 12:42 ·  中国 山东 济南 联通
新手上路
Credits 4
Posts 3
Joined 2009-01-23 15:42
17-year member
UID 137316
Gender Male
Status Offline
Originally posted by pierre1980 at 2009-1-24 12:35:
I am making a system recovery CD and need to implement the function of restoring the system when the CD is inserted. I have modified someone else's program but haven't been able to implement it yet. Please everyone help me and see where the problem is. Thank you. Among them...

I myself feel that when calling Ghost, the absolute path of the hard disk drive letter should not be used, that is: D:\..., but I don't know how to obtain the hard disk drive letter.
Floor 3 Posted 2009-01-24 16:48 ·  中国 山东 济南 联通
新手上路
Credits 4
Posts 3
Joined 2009-01-23 15:42
17-year member
UID 137316
Gender Male
Status Offline
Please provide the relevant Chinese content that needs to be translated so that I can perform the translation as required.
Floor 4 Posted 2009-10-27 23:50 ·  中国 广东 东莞 电信
银牌会员
★★★
Credits 1,284
Posts 538
Joined 2002-11-02 00:00
23-year member
UID 129
Gender Male
Status Offline
http://www.cn-dos.net/forum/viewthread.php?tid=49024&fpage=1&highlight=%2Bchishingchan

These software can definitely get you the answer, because I have succeeded, but it is not convenient to disclose the result, study by yourself!
Floor 5 Posted 2009-10-27 23:53 ·  中国 广东 东莞 电信
银牌会员
★★★
Credits 1,284
Posts 538
Joined 2002-11-02 00:00
23-year member
UID 129
Gender Male
Status Offline
List the hard drives separated by commas, and use the key functions of WBAT BOX to select
Floor 6 Posted 2009-11-09 19:05 ·  中国 上海 虹口区 电信
中级用户
★★
Credits 248
Posts 126
Joined 2008-05-30 17:18
18-year member
UID 120118
Gender Male
Status Offline
Found earlier in the forum, modified a bit myself, which can meet the building - owner's needs...

@echo off
:mini_BEGIN
if exist mini_dd.txt del mini_dd.txt
minito /nohp /p /ifs>mini_dd.txt
strings lines=LINESIZE mini_dd.txt
if %lines%#==0# goto fail
strings lines=add %lines%,1
set line=1
echo Hard disk information:
:mini
strings line=add %line%,1
if %line%#==%lines%# goto mini_1
strings lined=read mini_dd.txt,%line%
strings row1=left %lined%,3
strings row3=mid %lined%,8,2
strings row5=mid %lined%,19,3
strings row7=right %lined%,7
if %row5%#==YES# set actp=%row1%
set lastp=%row1%
set lastd=%row3%
set lastk=%row7%
if not %lined%#==# echo %lined%
goto mini

:mini_1
echo.
echo Please confirm the recognition result according to the hard disk information displayed above.
echo.
echo Automatic recognition result:
echo Active partition is: %actp%
echo Last partition is: %lastp%
echo The drive letter corresponding to the last partition is: %lastd%
echo The free space of the last partition is: %lastk%Mb
echo.
if exist mini_dd.txt del mini_dd.txt
goto exit

:fail
cls
echo.
echo Sorry, the software used by this tool failed to obtain valid hard disk information.
echo.
if exist mini_dd.txt del mini_dd.txt
:exit

Also:
ghost.exe-clone,mode=pload,src=D:\System Backup\XP_01222009.GHO,dst=1:1-fx-sure-rb

Should be written as:
ghost.exe-clone,mode=pload,src=D:\System Backup\XP_01222009.GHO:1,dst=1:1 -fx -sure -rb

[ Last edited by jh1688 on 2009-11-9 at 19:12 ]
Forum Jump: