|
原帖由 mygamexxx 于 2011-8-29 19:14 发表
考虑了再考虑,看样子还是要回到再初的做法,备份文件与程序置于同一分区,因为安装时你知道分区是什么类型,用程序选择要考虑太多,万一找到个linux的分区不是没戏,要出错。反正最初的方案只有一个缺点:程序 ...
将从 http://bbs.wuyou.net/forum.php?mod=viewthread&tid=158887&highlight=ghostid 下载的镜像
按楼主的思路,修改了一下,
畸形目录,一次备份后,只提供恢复功能
gholdr.bat:
!BAT
::---------lastdrv------------
set m=/os-backup../c_bak.gho
root endpart && (fd0)/diskid
cat --skip=0x4ff00 (md)+0x300 | set lastp=
ls %m% && cat --length=0 %m% || set gho=1
ls %m% && cat --length=0 %m% && set gho=2
ls %m% || set gho=0
::--------omnfis.exe----------
echo %lastp% > (md)0x200+1
cat --locate=\: --replace=\. (md)0x200+1
cat (md)0x200+1 | set bakp=
write --offset=17 (fd0)/bd.bat %bakp%\r\n
::------------sysdrv-------------------
find --ignore-cd --ignore-floppies /ntldr (fd0)/diskid || find --ignore-cd --ignore-floppies /bootmgr (fd0)/diskid || set sysp=
cat --skip=0x4ff00 (md)+0x300 | set sysp=
write --offset=17 (fd0)/sd.bat %sysp%\r\n
::----------if--go------------------
if %lastp%==%sysp% goto 0x220
if %gho%==1 goto 0x3000
if %gho%==0 goto 0x3000
if %gho%==2 goto 0x4400
exit
:0x4400 Restore
clear
echo -P:1012 $[0105]Mirror OK, Enter the password recovery system ...
echo -P:1122 $[0102]password=123456
password --md5 $1$2mJm$0MyiKSe0orTgEXBKP73Ac0
chainloader (fd0)+1
rootnoverify (fd0)
exit
:0x3000 Backup
clear
echo -P:1012 $[0105]Enter the password to start the backup system ...
echo -P:1122 $[0102]System backups in the final partition
password --md5 $1$ixUm$9Z/INiiCgjyM4cyhfIhrW.
:: pass=admin
cat --locate="rst" --replace=bak --skip=43 (fd0)/autoexec.bat
chainloader (fd0)+1
rootnoverify (fd0)
exit
:0x220
clear
echo -P:1012 $[0105]Error: not ntldr .or. bootmgr .or. Backup partition
echo -P:1122 $[0105]Press any key to MS-DOS ... && pause
(fd0)/fat del (fd0)/autoexec.bat
chainloader (fd0)+1
rootnoverify (fd0)
exit
-----------------------------------
bak.bat:
@ECHO OFF
CALL SD.BAT
CALL BD.BAT
set bf_dir=os-backup..
Omnifs.exe mkdir %B%:\%bf_dir% >nul
Omnifs.exe attrib +s +r +h %B%:\%bf_dir% >nul
ghost -clone,mode=pdump,src=%S%,dst=%B%:\%bf_dir%\c_bak.gho -sure -fro -z5 -rb
cls
------------------------------
rst.bat:
@ECHO OFF
CALL SD.BAT
CALL BD.BAT
set bf_dir=os-backup..
GHOST -clone,mode=pload,src=%B%:\%bf_dir%\c_bak.gho:1,dst=%S% -fro -crcignore -sure -rb
CLS
----------------------------
安装使用:
title G4D for ghost
map --mem /backup.img (fd0)
map --hook
(fd0)/gholdr.bat |
|