PDA

View Full Version : Recovery Console



vcldeveloper
چهارشنبه 08 تیر 1384, 17:50 عصر
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

barbod_ahmadi
دوشنبه 13 تیر 1384, 23:18 عصر
خیلی ممنون از مقاله بسیار مفید شما
راستی شماره ویندوز؟

در این مرحله باید شماره ویندوزی که قصد تعمیر آن را دارید در جلوی علامت ? تایپ کنید
اگر شماره ویندوز دا نداشتیم؟

vcldeveloper
سه شنبه 14 تیر 1384, 02:42 صبح
اگر شماره ویندوز دا نداشتیم؟
در اون مرحله، ویندوزهای NT-base نصب شده بر روی سیستم شما، لیست می شند. مثلا:


1- Windows XP
2- Windows 2000 Professional

شما باید شماره ایی که جلوی ویندوز نوشته شده (مثلا برای XP در مثال بالا = 1) رو انتخاب کنید - یعنی انتخاب کنید که می خواید از Recovery Console کدوم یکی از ویندوزها استفاده کنید.

barbod_ahmadi
سه شنبه 14 تیر 1384, 07:38 صبح
آها
من منظور شمارو درست متوجه نشده بودم
به هر حال متشکرم
ـــــــــــــــــــــــــ ـــــــــــــــــــــــــ ــــــــــــــــــــ
علم در انحصار هیچکس نیست :wink:

javadonline
سه شنبه 14 تیر 1384, 08:25 صبح
سلام آقای کشاورز


ممنون از اینکه این مقاله را گذاشتین.

می خواستم بدونم برای WIN 2000 SERVER هم SET میشه دیگه یعنی همین مراحل را باید بریم فرقی که نمی کنه .


بعد یه سوال دیگه در مورد DOMAIN , HOST مقاله نمی زارین استفاده کنیم . ممنون میشم.

vcldeveloper
چهارشنبه 15 تیر 1384, 02:22 صبح
می خواستم بدونم برای WIN 2000 SERVER هم SET میشه دیگه یعنی همین مراحل را باید بریم فرقی که نمی کنه .
فکر کنم ویندوز 2000 XP رو موقع نصب به عنوان یک سیستم عامل NT -base بشناسه، اگر نشناخت، می تونید از همون روش بالا استفاده کنید.


در مورد DOMAIN , HOST مقاله نمی زارین استفاده کنیم . ممنون میشم.
این رو در بخش شبکه مطرح کنید، آقای Gladiator مطالب کامل و مفیدی در زمینه تنظیمات و پیکربندی شبکه در اون بخش اراپه میدند.

موفق باشید

نغمه
پنج شنبه 26 بهمن 1385, 17:51 عصر
چه جوری میشه recovery console را uninstall کرد؟

adaman
شنبه 28 بهمن 1385, 02:31 صبح
برای uninstall به طریقه ی زیر عمل شود :


1 - Open My Computer.
2 - Double-click the hard drive on which you installed the Recovery Console.
3 - On the Tools menu, click Folder Options.
4 - Click the View tab.
5 - Click Show hidden files and folders, clear the Hide protected operating system files check box, and then click OK.
6 - At the root directory, delete the \Cmdcons folder.
7 - At the root directory, delete the file Cmldr.
8 - At the root directory, right-click the Boot.ini file and then click Properties.
9 - Clear the Read-only check box, and then click OK.
10 - Open Boot.ini in Notepad, and remove the entry for the Recovery Console. It will look similar to this:
C:\cmdcons\bootsect.dat="Microsoft Windows Recovery Console" /cmdcons
11 - Save the file and close it.
در ویرایش فایل boot.ini دقت شود ،اشتباه مساوی با تعویض ویندوز. همیشه یک بک آپ داشته باشین ازش.:چشمک:

نغمه
یک شنبه 29 بهمن 1385, 16:16 عصر
ممنوووووووووووووووووووووو وووووووووووووووووون

نغمه
سه شنبه 08 اسفند 1385, 19:09 عصر
دستور attrib خصوصیات فایل اتخاب شده را تغییر میدهد منظور از خصوصیات چی هست؟ و منظورش چه فایل های هست؟
منظور از سرویس های ویندوز چی هست که میشه فعال یا غیر فعالش کرد؟
من وقتی سی دی نصب xp را میگذارم تو صفحه welcome امکانی برای کار با recovery console نیست !!!!! در این حالت وقتی که سیستم بالا نمی اید از چه راهی وارد recover console شوم؟

vcldeveloper
چهارشنبه 09 اسفند 1385, 09:42 صبح
من وقتی سی دی نصب xp را میگذارم تو صفحه welcome امکانی برای کار با recovery console نیست !!!!! در این حالت وقتی که سیستم بالا نمی اید از چه راهی وارد recover console شوم؟
در صفحه دوم یا سوم نصب درباره ورود به Recovery Console از شما سوال می پرسه.
درباره دو تا سوال دیگه هم می تونید در سایت مایکروسافت یا فوروم های مختلف مربوط به ویندوز اونها رو بپرسید. در این فوروم دیگه به سوالات ویندوز جواب داده نمیشه.

نغمه
چهارشنبه 09 اسفند 1385, 18:24 عصر
من چه در حالت نصب جدید ویندوز و چه در حالت به روز کردن امتحان کردم ولی در مورد recovery console چیزی ازمن نخواست؟

adaman
پنج شنبه 10 اسفند 1385, 00:59 صبح
http://i6.tinypic.com/29wv5te.jpg