超缩刻录GHO及其魂魄还原的秘笈
——巧借参数实现无需按键的系统备份光盘全自动恢复
文/虚灵大帝
超缩刻录的GHO镜像,如何实现无需按键的全自动恢复,《全启动2004》和《一键恢复精灵》回避了,《操作手册》也不明确,帮助中的E文《Using Norton Ghost with switches》(诺顿GHOST参数用法)中更没有现成的例子可以查找,似乎是一块难啃的骨头。即使号称经过特别制作的上海政府版(可能盗版),虽然可以读,但至少在我的机器上不能恢复,反复重启呀。我查了一下,它不是原版的。不过,我最近在Ghost这个妖孽的世界进行的一次探险中,摸索出了一个语法,从而破解了这个问题,成功地实现了无需按键的刻录盘恢复,整个过程一气呵成,就像有一个魂魄在控制计算机一样。
步骤一、侦察设备编号
1.先弄清爱机有几个硬盘,若有两个硬盘,按主从次序分别为1、2盘。
2.再弄清1、2硬盘各有几个分区,并打开GHOST看清要备份的分区是哪个分区,如1、2、3、4…。
3.最后在ghost.exe接口介面,看清光驱与刻录机的编号,如@CD-R1、@CD-R2。
特别提示:不能以Windows系统显示的C、D、E、F盘符,来想当然地安排分区号1、2、3、4,而应以在Ghost接口界面中显示的分区号1、2、3、4为准。如本人装有XP系统的F分区,在Ghost界面中显示的分区号就为2,如图1所示。
步骤二、察看系统文件容量大小
1.试运行ghost.exe,将镜像文件克隆在其它分区看看。
2.在ghost.exe 运行界面, statistics处反映出来的MB copied与MB remaining之和,应小于或等于1430MB(采用Ghost8.0版,-z9压缩率稍大点,应把握在不大于1443MB为好),如下图所示:
否则CD-R光盘就会因容不下而只有挂在摩托车屁股上观风景了!
步骤三、编写启动软盘
制启动软盘虽然麻烦一点,但可以收到一劳永逸的效果。启动软盘里,包括autoexec.bat、command.com、IO.sys、mouse.com、mouse.ini、msdos.sys、ghost.exe(2003)、config.sys、mscdex.exe、oakcdrom.sys等十个文件。其中config.sys的内容为:
menuitem=backup1,backup all of data the 1 partition in your 1st HD to CD-RW
menuitem=restore1,restore all of data the 1 partition in your 1st HD form CD
menudefault=restore1,8
menucolor=7,0
device=oakcdrom.sys /D:mscd001
filehigh=30
buffershigh==30
dos=high,ubm
文件Autoexec.bat的内容为:
mouse.com
mscdex.exe/D:IDECE001/L:@cd1/m:16
mscdex.exe/D:IDECE001/L:@cd2/m:16
@echo off
goto %CONFIG%
:restore1
echo.
echo Warning!This will delete all of data the 1 partition in your 1st HD!
echo.
Ghost -clone,mode=pload,src=@cd1:1\cdr00001.gho,dst=1:1 -sure -rb
goto _end
:backup1
echo.
echo This will backup all of data the 1 partition in your 1st HD to CD-RW!
echo.
Ghost -clone,mode=pdump,src=1:1,dst=@cd2 -bootcd -z9 -sure -rb
goto _end
:END
其中:/L为加载镜像文件参数,/M为加载缓冲参数,默认方式是8秒后自动执行还原第1硬盘1分区。如你还有其它要求,则要根据实际情况对Autoexec.bat的内容进行修改,如硬盘和分区的数字与盘符、光驱与刻录机的@CD1或@CD2等。启动盘中的mouse.com、mouse.ini二个文件,可方便鼠标操作,若软盘资源紧张,不要也可。
特别提示:利用DOS或98启动盘改造即可。在使用Ghost8.0时,应在硬盘上先建Ghost8.0后,再在Ghost8.0启动Ghost,若有-bootcd参数时,程序会自动加载Ghost8.0于光盘之中。
步骤四、超缩刻录
将启动盘插入计算机的软驱中,并将计算机改为软驱启动。若有个光驱装在第一IDE线的从盘接口上,并且直接用装在第二IDE线的主盘接口上的CD-RW备份1#硬盘的1#分区,于是选择有命令行:
ghost.exe –clone,mode=pdump,src=1:1,dst=@cd2 –z9 –bootcd –sure –fx
的backup1启动菜单,按回车后,程序会自动将1#硬盘的1#分区用–z9的压缩方式,在CD-RW光盘上生成一个加了密的CDR00001.GHO的镜像文件,并且光盘为可引导光盘。式中:–z9为最高压缩率,比high(如下图)按钮
压缩可多刻34MB的容量;–bootcd创建有软盘引导程序的可引导盘;–sure 对要求回答是yes内容一律点yes(如下图);
–fx完成后回到DOS提示符。若只有一个刻录机,只需将批处理文件Autoexec.bat中的@CD2,改成@CD1即可。
特别提示①:经笔者反复试验,页面文件pagefile.sys与休眠文件hiberfil.sys对.GHO镜像文件的容量大小几乎没有影响!
特别提示②:若在GHOST8.0下镜像,–bootcd命令还会在刻录盘中自动加入GHOST8.0版,同样加了密。
步骤五、魂操作的全自动光盘恢复
1.将计算机设为CDROM启动。
2. 在主光驱中,放入刚才刻录的带启动的有CDR00001.GHO文件的源光盘。此时,无需按键,无需选择菜单,光盘将全自动的完成系统恢复的整个过程。由于其自动执行的是还原第1硬盘1分区的操作,计算机选择的是默认启动信息中的还原项,即restore1:
Ghost -clone,mode=pload,src=@CD1:1\cdr00001.gho,dst=1:1 -sure –rb
需要注意的是,源光盘已经被GHOST自动进行了分区,写法必须是:@CD1:1\cdr00001.gho。这是笔者试用了几十种方案后摸索出来的,只有这种写法能够恢复成功。运行过程中,将弹出GHOST界面,如下图:
不要管它,它会在自动完成后,重启系统。整个过程,只需在启动时放入源盘就万事大吉。其效果如魂魄附体一般,比一键恢复精灵更快捷,更省心,更爽。更因为是自己制作的,自己也可以操纵灵魂了,是不是很伟大!
特别提示:此时的恢复光盘,是向主光驱或刻录机中,放入在GHOST下刻录的有cdr00001.gho文件的原版刻录盘。
e-mail:hfyun2000@yahoo.com.cn
QQ:262802818
Phto:13886582994
Secret Recipe for Super-compressed Burning of GHO and Its Soul Restoration
——Skillfully Using Parameters to Achieve Fully Automatic System Backup Disc Restoration Without Key Pressing
By: Emperor Xu Ling
The super-compressed GHO image, how to achieve fully automatic restoration without key pressing. "Full Boot 2004" and "One-key Restoration Wizard" avoid it, the "Operation Manual" is not clear, and the English version in the help "Using Norton Ghost with switches" (Norton GHOST Parameter Usage) has no ready-made examples to find, it seems like a tough nut to crack. Even the so-called specially made Shanghai government version (probably pirated), although it can be read, at least it cannot be restored on my machine, repeatedly restarting. I checked, it is not the original. However, in my recent exploration in the world of Ghost, I found a syntax and thus cracked this problem, successfully realizing the restoration of the burned disc without key pressing, and the whole process is seamless, just like having a soul controlling the computer.
Step 1: Scout Device Numbers
1. First, figure out how many hard drives your beloved computer has. If there are two hard drives, they are respectively 1st and 2nd drives in master-slave order.
2. Then, figure out how many partitions each of the 1st and 2nd hard drives has, and open GHOST to see which partition is the one to be backed up, such as 1, 2, 3, 4...
3. Finally, in the Ghost.exe interface, see the numbers of the optical drive and the burner, such as @CD-R1, @CD-R2.
Special reminder: Do not arbitrarily arrange partition numbers 1, 2, 3, 4 according to the C, D, E, F drive letters displayed in the Windows system, but should be based on the partition numbers 1, 2, 3, 4 displayed in the Ghost interface. For example, the F partition where I have the XP system installed shows partition number 2 in the Ghost interface, as shown in Figure 1.
Step 2: Check the Capacity of System Files
1. Run Ghost.exe for trial, and clone the image file to other partitions.
2. In the Ghost.exe running interface, the sum of MB copied and MB remaining reflected at statistics should be less than or equal to 1430MB (using Ghost 8.0 version, -z9 compression ratio is a bit larger, should be controlled within not greater than 1443MB), as shown in the following figure:
Otherwise, the CD-R disc will be unable to hold it and can only be watched on the motorcycle's butt!
Step 3: Write Boot Floppy
Although making the boot floppy is a bit troublesome, it can have a one-time effort and long-term effect. The boot floppy includes ten files: autoexec.bat, command.com, IO.sys, mouse.com, mouse.ini, msdos.sys, ghost.exe (2003), config.sys, mscdex.exe, oakcdrom.sys. The content of config.sys is:
menuitem=backup1,backup all of data the 1 partition in your 1st HD to CD-RW
menuitem=restore1,restore all of data the 1 partition in your 1st HD form CD
menudefault=restore1,8
menucolor=7,0
device=oakcdrom.sys /D:mscd001
filehigh=30
buffershigh==30
dos=high,ubm
The content of the Autoexec.bat file is:
mouse.com
mscdex.exe/D:IDECE001/L:@cd1/m:16
mscdex.exe/D:IDECE001/L:@cd2/m:16
@echo off
goto %CONFIG%
:restore1
echo.
echo Warning!This will delete all of data the 1 partition in your 1st HD!
echo.
Ghost -clone,mode=pload,src=@cd1:1\cdr00001.gho,dst=1:1 -sure -rb
goto _end
:backup1
echo.
echo This will backup all of data the 1 partition in your 1st HD to CD-RW!
echo.
Ghost -clone,mode=pdump,src=1:1,dst=@cd2 -bootcd -z9 -sure -rb
goto _end
:END
Among them: /L is the parameter for loading the image file, /M is the parameter for loading the buffer, and the default way is to automatically perform the restoration of the 1st partition of the 1st hard drive after 8 seconds. If you have other requirements, you need to modify the content of Autoexec.bat according to the actual situation, such as the numbers of the hard drive and partition, drive letters, optical drive and burner @CD1 or @CD2, etc. The mouse.com and mouse.ini files in the boot floppy can facilitate mouse operation, and if the floppy resource is tight, they can be omitted.
Special reminder: It can be transformed using a DOS or 98 boot floppy. When using Ghost 8.0, you should first create Ghost 8.0 on the hard drive, then start Ghost in Ghost 8.0. When there is the -bootcd parameter, the program will automatically load Ghost 8.0 on the disc.
Step 4: Super-compressed Burning
Insert the boot floppy into the computer's floppy drive and set the computer to boot from the floppy drive. If there is an optical drive installed on the slave drive interface of the first IDE cable, and directly use the CD-RW on the master drive interface of the second IDE cable to back up the 1# hard drive's 1# partition, then select the backup1 boot menu with the command line:
ghost.exe –clone,mode=pdump,src=1:1,dst=@cd2 –z9 –bootcd –sure –fx
Press Enter, the program will automatically generate a encrypted CDR00001.GHO image file of the 1# hard drive's 1# partition with -z9 compression method on the CD-RW disc, and the disc is a bootable disc. In the formula: –z9 is the highest compression ratio, which can burn 34MB more capacity than the high (as shown in the following figure) button; –bootcd creates a bootable disc with a floppy boot program; –sure clicks yes to all content requiring a yes answer (as shown in the following figure);
–fx returns to the DOS prompt after completion. If there is only one burner, just change @CD2 in the batch file Autoexec.bat to @CD1.
Special reminder ①: After repeated tests by the author, the page file pagefile.sys and the hibernation file hiberfil.sys have almost no impact on the capacity of the.GHO image file!
Special reminder ②: If imaging under GHOST 8.0, the –bootcd command will also automatically add the Ghost 8.0 version to the burned disc, also encrypted.
Step 5: Soul Operation's Fully Automatic Disc Restoration
1. Set the computer to boot from CDROM.
2. Put the source disc with the burned bootable CDR00001.GHO file in the main optical drive. At this time, no key pressing is needed, no menu selection is needed, and the disc will fully automatically complete the entire system restoration process. Because it automatically performs the operation of restoring the 1st partition of the 1st hard drive, the computer selects the restore item in the default boot information, that is, restore1:
Ghost -clone,mode=pload,src=@CD1:1\cdr00001.gho,dst=1:1 -sure –rb
It should be noted that the source disc has been partitioned by GHOST automatically, and the writing must be: @CD1:1\cdr00001.gho. This is what I explored after trying dozens of schemes, only this writing can restore successfully. During the running process, the GHOST interface will pop up, as shown in the following figure:
Don't worry about it, it will restart the system after automatically completing. The whole process, just put the source disc when booting and everything is done. The effect is like a soul possessing the body, faster, more worry-free, and more refreshing than the One-key Restoration Wizard. Moreover, because it is made by yourself, you can also manipulate the soul, isn't it great!
Special reminder: The restoration disc at this time is to put the original burned disc with the cdr00001.gho file in GHOST into the main optical drive or burner.
e-mail:hfyun2000@yahoo.com.cn
QQ:262802818
Phto:13886582994