Recovery Console
Recovery Console ابزاری Text-Based ا ست (شبیه محیط MS DOS) که توسط مایکروسافت برای رفع برخی از مشکلات ویندوزهای 2000 و XP استفاده می شود. به توصیه مایکروسافت بهتر است که قبل از استفاده از Recovery Console ازSafe Mode و گزینه های Start-up استفاده شود و در صورتی که این ابزارها قادر به رفع مشکل نبودند از Recovery Console استفاده شود. از Recovery Console زمانی استفاده می شود که ویندوز به خوبی شروع بکار نمی کند یا اینکه اصلا بالا نمی آید.
عملیاتی که می توان در Recovery Console انجام داد عبارتند از:
دسترسی به Root Folder ، Windows Folder و تمامی پوشه های زیر مجموعه آن.
دسترسی به Removable Media (مثل فلاپی درایو و سی دی درایو).
کپی فایل از Removable Media به دیسک سخت.
نکته: عکس این مطلب صادق نیست یعنی؛ امکان کپی فایل از دیسک سخت به دیسکت یا سی دی وجود ندارد.
تغییر نام، حذف و ایجاد فایلها و پوشه ها.
ایجاد، حذف و فرمت پارتیشن های دیسک سخت.
تعمیر Boot Sector, Master Boot Record و فایل Boot.ini
Extract کردن فایلهای فشرده شده در آرشیوهای .cab بر روی دیسک سخت.
فعال/غیرفعال کردن سرویس های ویندوز.
برای انجام عملیات فوق در Recovery Console از یکسری دستورات استفاده می شود که لیست این دستورات در پایان همین نوشته آورده شده است.
اجرای Recovery Console:
برای اجرای Recovery Console باید از سی دی نصب ویندوز XP و یا از دیسکت های بوت ویندوز XP (6 عدد دیسکت) استفاده کرد.
در صورت استفاده از سی دی نصب ویندوز XP باید ابتدا سیستم با سی دی نصب ویندوز بوت شود.
در صفحه "Welcome to Setup" سه گزینه به کاربر نشان داده می شود:
To set up Windows XP now, press ENTER.
To repair a Windows XP installation using Recovery Console, press R.
To quit setup without installing Windows XP, press F3.
در این صفحه باید گزینه دوم که مربوط به Recovery Console هست را انتخاب کنید.
بعد از فشردن کلید R یک محیط Text-Based با زمینه سیاه ظاهر می شود و پیغام زیر نمایش داده می شود:
Microsoft Windows XP Recovery Console.
Recovery Console provides system repair and recovery functionality.
Type EXIT to quit Recovery Console and restart the computer.
1: C:\WINNT
Which Windows XP (or 2000) installation would you like to log onto
<To cancel, press ENTER>?
در این مرحله باید شماره ویندوزی که قصد تعمیر آن را دارید در جلوی علامت ? تایپ کنید. در صورتی که بیش از یک ویندوز (ویندوزهای بر پایه تکنولوژی NT – مثل 2000, 2003, XP و نه ویندوزهای 95, 98, Me) بر روی سیستم نصب باشد در لیست فوق تمامی ویندوزهای فوق و مسیر نصب شان نشان داده خواهد شد و شما می توانید شماره ویندوز مورد نظر خود را انتخاب کنید. در مثال بالا فقط یک ویندوز( بر پایه تکنولوژی (NT در درایو C پوشه WINNT نصب شده است.
بعد از انتخاب ویندوز مورد نظر برای Log-in شدن به آن ویندوز باید کلمه رمز حساب Administrator را وارد کنید. در صورتی که این کلمه رمز را سه بار غلط وارد کنید بصورت اتوماتیک از Recovery Console خارج خواهید شد!
بعد از انجام تمامی مراحل فوق خط فرمان Recovery Console ظاهر می شود (در مثال فوق: C:\WINNT> ) و شما می توانید فرامین مورد نظر خود را اجرا کنید:
با تایپ دستور HELP و فشردن کلید ENTER لیستی از دستوراتی را که Recovery Console پشتیبانی می کند، نمایش داده می شود.
بعد از پایان کار می توانید با تایپ دستور EXIT از Recovery Console خارج شوید. سیستم بطور خودکار ریست خواهد شد.
نصب Recover Console:
در صورت تمایل می توانید Recovery Console را بر روی دیسک سخت سیستم نصب کنید تا دسترسی به آن راحت تر صورت گیرد. برای این منظور:
سی دی نصب ویندوز XP را در داخل دستگاه قرار دهید.
در منوی Start گزینه Run... را انتخاب کنید و دستور زیر را تایپ کنید:
drive:\i386\Winnt32.exe /cmdcons
* بجای drive باید نام درایو CD ROM خود را تایپ کنید.
با انتخاب گزینه OK پنچره ای باز می شود که از شما می خواهد نصب Recovery Console را تایید کنید. با انتخاب گزینه Yes نصب Recovery Console شروع می شود. برای نصب Recovery Console به 7 مگابایت فضای خالی بر روی دیسک سخت نیاز دارید.
بعد از پایان نصب Recovery Console گزینه ای با عنوان "Microsoft Windows XP Recovery Console" به منوی بوت سیستم اضافه می شود و شما می توانید در هنگام راه اندازی سیستم انتخاب کنید که قصد وارد شدن به ویندوز را دارید و یا قصد اجرای Recovery Console.
مثال کاربردی 1: رفع مشکل بوت ویندوز XP بعد از نصب ویندوز 98:
در صورتی که ویندوز 98 بعد از ویندوز XP نصب شود، هنگام راه اندازی سیستم امکان انتخاب بین ویندوز XP و 98 وجود نخواهد داشت برای رفع این مشکل می توان ویندوز XP را دوباره نصب کرد (!!) یا آنکه از Recovery Console برای رفع مشکل استفاده کرد:
در داخل Recovery Console دستور BOOTCFG /ADD را وارد کنید.
دیسک سخت برای پیدا کردن ویندوزهای نصب شده جستجو می شود و سپس لیستی از ویندوزهای موجود بر روی دیسک سخت نمایش داده می شود. در صورتی که فقط ویندوز XP و 98 بر روی سیستم نصب باشند، در لیست مورد نظر ویندوز XP بعنوان سیستم عاملی که پیدا شده نمایش داده خواهد شد. شماره ویندوز XP را از لیست تایپ کنید.
در مرحله بعد، از شما خواسته می شود که عنوانی برای ویندوزی که جدیداً اضافه کرده اید انتخاب کنید. می توانید از هر عنوان دلخواهی استفاده کنید. مثلا "Microsoft Windows XP".
در مرحله بعدی، از شما خواسته می شود که سیستم عامل پیش فرض را انتخاب کنید. برای انتخاب ویندوز XP بعنوان سیستم عامل پیش فرض شماره آن (شماره 1) را وارد کنید.
بعد از انجام مراحل فوق می توانید با تایپ دستور EXIT از Recovery Console خارج شوید. بعد از ریست سیستم، منوی بوت که در آن دو گزینه برای انتخاب بین ویندوز XP و 98 وجود دارد نمایش داده می شود که می توانید ویندوز مورد نظر خود را انتخاب کرده و آن را اجرا کنید.
مثال کاربردی 2: رفع مشکل بوت ویندوز XP بعد از حذف ویندوز 98:
معمولا کاربرانی که از دو سیستم عامل استفاده می کنند، ویندوز 98 را بر روی درایو C و ویندوز XP را بر روی درایوی دیگر نصب می کنند. سپس پس از مدتی که نیازی به ویندوز 98 ندارد درایو C را فرمت می کنند تا ویندوز 98 و تمامی متعلقات آن حذف شود، اما بعد از فرمت شدن درایو C حتی ویندوز XP هم دیگر بوت نخواهد شد.
نکته ای که وجود دارد این است که درایو C بعنوان اولین پارتیشن دیسک سخت شامل Master Boot Record می باشد و بعضی از فایلهایی که وظیفه نمایش منوی بوت سیستم و همچنین راه اندازی ویندوز XP را دارند در این درایو کپی می شوند. Format کردن درایو C موجب حذف این فایلهای سیستمی می شود که در نتیجه آن امکان بوت شدن ویندوز XP هم وجود نخواهد داشت. این فایلها عبارتند از: NTDetect.com, NTLDR, Boot.ini .
برای باز گرداندن این فایلها می توانید وارد Recovery Console شده و دستورات زیر را بترتیب اجرا کنید:
COPY drive:\i386\ntldr/
COPY drive:\i386\ntdetect.com
BOOTCFG /rebuild
* بجای drive باید نام سی دی درایو خود را وارد کنید.
لیست فرامین Recovery Console:
Attrib: changes attributes on one file or subdirectory.
Batch: executes commands that you specify in the text file, Inputfile. Outputfile holds the output of the commands. If you omit the Outputfile parameter, output appears on the screen.
Bootcfg: modifies the Boot.ini file for boot configuration and recovery.
CD (Chdir): operates only in the system directories of the current Windows installation, removable media, the root directory of any hard disk partition, or the local installation sources.
Chkdsk: The /p switch runs Chkdsk even if the drive is not flagged as dirty. The /r switch locates bad sectors and recovers readable information. This switch implies /p. Chkdsk requires Autochk. Chkdsk automatically looks for Autochk.exe in the startup folder. If Chkdsk cannot find the file in the startup folder, it looks for the Windows 2000 Setup CD-ROM. If Chkdsk cannot find the installation CD-ROM, Chkdsk prompts the user for the location of Autochk.exe.
Cls: clears the screen.
Copy: copies one file to a target location. By default, the target cannot be removable media, and you cannot use wildcard characters. Copying a compressed file from the Windows 2000 Setup CD-ROM automatically decompresses the file.
Del (Delete): deletes one file. Operates within the system directories of the current Windows installation, removable media, the root directory of any hard disk partition, or the local installation sources. By default, you cannot use wildcard characters.
Dir: displays a list of all files, including hidden and system files.
Disable: disables a Windows system service or driver. The variable service_or_driver is the name of the service or driver that you want to disable. When you use this command to disable a service, the command displays the service's original startup type before it changes the type to SERVICE_DISABLED. Note the original startup type so that you can use the enable command to restart the service.
Diskpart: manages partitions on hard disk volumes. The /add option creates a new partition. The /delete option deletes an existing partition. The variable device is the device name for a new partition (such as \device\harddisk0). The variable drive is the drive letter for a partition that you are deleting (for example, D). Partition is the partition-based name for a partition that you are deleting, (for example: \device\harddisk0\partition1) and can be used instead of the drive variable. The variable size is the size, in megabytes, of a new partition.
Enable: enables a Windows system service or driver. The variable service_or_driver is the name of the service or driver that you want to enable, and start_type is the startup type for an enabled service. The startup type uses one of the following formats:
SERVICE_BOOT_START
SERVICE_SYSTEM_START
SERVICE_AUTO_START
SERVICE_DEMAND_START
Exit: quits the Recovery Console, and then restarts the computer.
Expand: expands a compressed file. The variable source is the file that you want to expand. By default, you cannot use wildcard characters. The variable destination is the directory for the new file. By default, the destination cannot be removable media and cannot be read-only. You can use the attrib command to remove the read-only attribute from the destination directory. The option /f:filespec is required if the source contains more than one file. This option permits wildcard characters. The /y switch disables the overwrite confirmation prompt. The /d switch specifies that the files will not be expanded and displays a directory of the files in the source.
Fixboot: writes a new startup sector on the system partition.
Fixmbr: repairs the startup partition's master boot code. The variable device is an optional name that specifies the device that requires a new Master Boot Record. Omit this variable when the target is the startup device.
Format: formats a disk. The /q switch performs a quick format. The /fs switch specifies the file system.
Help: If you do not use the command variable to specify a command, help lists all the commands that the Recovery Console supports.
Listsvc: displays all available services and drivers on the computer.
Logon: displays detected installations of Windows and requests the local Administrator password for those installations. Use this command to move to another installation or subdirectory.
Map: displays currently active device mappings. Include the arc option to specify the use of Advanced RISC Computing (ARC) paths (the format for Boot.ini) instead of Windows device paths.
MD (Mkdir): operates only within the system directories of the current Windows installation, removable media, the root directory of any hard disk partition, or the local installation sources.
More/Type: displays the specified text file on screen.
Net Use: connects to a remote share for the Windows XP Recovery Console. The following text describes the syntax for this command:
NET USE [devicename | *] [\\computername\sharename[\volume] [password | *]] [/USER:[domainname\]username] [/USER:[dotted domain name\]username] [/USER:[username@dotted domain name] [/SMARTCARD] [/SAVECRED] [[/DELETE] | [/PERSISTENT:{YES | NO}]] NET USE {devicename | *} [password | *] /HOME NET USE [/PERSISTENT:{YES | NO}]
Rd (Rmdir): operates only within the system directories of the current Windows installation, removable media, the root directory of any hard disk partition, or the local installation sources.
Ren (Rename): operates only within the system directories of the current Windows installation, removable media, the root directory of any hard disk partition, or the local installation sources. You cannot specify a new drive or path as the target.
Set: displays and sets the Recovery Console environment variables.
Systemroot sets the current directory to %SystemRoot%.
برای توضیحات بیشتر در مورد فرامین فوق می توانید به مقاله Description of the Windows XP Recovery Console در Microsoft Knowledgebase مراجعه نمایید:
http://support.microsoft.com/kb/314058/EN-US
علی کشاورز
10 دی، 1383