2019年8月14日 星期三

【伺服器】如何修復 Server 2008

原始參考文章來源:https://www.dell.com/support/article/tw/zh/twdhs1/sln167714/windows-server-%E5%A6%82%E4%BD%95%E4%BF%AE%E5%A4%8D%E5%BC%95%E5%AF%BC%E6%96%87%E4%BB%B6%E5%9C%A8windows-server2008%E6%88%962008r2%E6%9C%8D%E5%8A%A1%E5%99%A8%E4%B8%8D%E5%90%AF%E5%8A%A8?lang=zh


最近公司的伺服器又開不起來,依照 Dell 的教學方式在第一次掛點時可以正常的依文件裡的指示操作;but,人生就是這個 but 這次怎麼按 "修復選項" 也沒有用。

詢問伺服器續簽的廠商說『由於最先不是不找他們簽約,現在這個問題沒辦法幫忙,請問微軟…』(看來只剩下換硬碟的功能,下次乾脆錢省下來,除了主要的那台,其他的自己修)

想說怎麼進個指令模式 (command prompt) 怎麼這麼難,開機後按F8一直都進不了 (當時有接外接硬碟),後來拔掉外接硬碟後,以原本的系統重開機就能以安全模式+指令模式的方式來操作…。

在第11步驟時,由於 copy f:\BootMgr c:\ 是為了要確認 c:\ 下面的檔案在不在而不是要覆蓋,但我不小心的按到 Y ,當場有點傻眼。接下來的步驟 bootrec 的指令都無法用...(應該是用修復光碟開機才會有的指令)。索性直接重開機試試,沒有想到就正常了…還好!


原始參考文章來源:https://www.dell.com/support/article/tw/zh/twdhs1/sln167714/windows-server-%E5%A6%82%E4%BD%95%E4%BF%AE%E5%A4%8D%E5%BC%95%E5%AF%BC%E6%96%87%E4%BB%B6%E5%9C%A8windows-server2008%E6%88%962008r2%E6%9C%8D%E5%8A%A1%E5%99%A8%E4%B8%8D%E5%90%AF%E5%8A%A8?lang=zh
===========文章來源備份(Dell網站) 分隔線=======================

Windows Server: How to Repair the Boot Files in Windows Server 2008 or 2008 R2 if the Server Won't Boot

There are a number of possible causes for the failure of a server to boot into Windows. This article deals with a problem in the boot files and demonstrates how to repair them.

Introduction

When booting to the Windows Recovery Environment (WinRE), the drive letters are assigned on a first-come, first-serve basis. For example, the C: drive in Windows will often have a different letter in WinRE. The DiskPart utility can be used to keep track of the drives and what is stored on them.
  • First Partition: 100 MB System Reserved (No drive letter)
  • Second Partition: 60 GB (C:) OS
  • Third Partition: 1.5 TB (D:) Data
  • DVD Drive: E:


Figure 1: Illustration of Drive lettering in Windows and WinRE (English only)Note: If there is no System Reserved partition. It is okay to select the drive containing the Windows folder.

Restoring Boot Files
Note: The media can be a CD, DVD, or USB storage device

Figure 2: DiskPart result (english only)



Figure 3: Result when no OS is found (English only)

This means that one of the following is true:
  1. Boot to the Windows Server DVD.
  2. Open the command prompt.
    1. Server 2008 R2:
      1. If no driver is needed, press Shift-F10 to open the command prompt.
      2. Continue with step 3.
    2. Server 2008 (or 2008 R2 if a driver is required)
      1. Click Next at the first screen.
      2. Click Repair your computer.
      3. If no driver is needed, click Next and proceed to step vii below.
      4. If a driver is needed, click Load Drivers.
      5. Insert the media containing the needed driver.
      6. Navigate to the folder containing the driver, select it, and click Open.
      7. Click Command Prompt.
  3. The command prompt appears.
  4. Type DiskPart at the command prompt.
  1. Type List vol at the DiskPart prompt.
  2. Write down the drive letter of the DVD drive. In this example, it is F.
  3. Write down the drive letter of the system reserved drive. In this example, it is C.
  4. Type Select vol 1 (assuming volume 1 is the System Reserved volume, as it is here).
  5. Type active. This sets the selected volume as active.
  6. Type exit to return to the command line.
  7. Type Copy f:\BootMgr c:\ at the command prompt. One of two things will happen:
    1. If the file Bootmgr already exists on C:, type N to avoid overwriting it.
    2. If the file Bootmgr doesn't already exist on C:, it will automatically be copied.
  8. Type Bootrec /Fixmbr at the command prompt.
  9. Type Bootrec /Fixboot at the command prompt.
  10. Type Bootrec /rebuildBCD at the command prompt.
    1. If no OS is found, the following appears:
      1. The boot configuration database (BCD) already exists.
      2. The OS is not there.
      3. The OS is damaged beyond the ability of BootRec to recognize it.
    2. If BootRec /RebuildBCD succeeds, it will list any installations of Windows that it found. Press Y to accept and add them to the BCD.
  11. The server is now configured to boot from the proper partition. Close the command prompt and reboot the system into normal mode.

沒有留言:

張貼留言