歡迎您光臨本站 註冊首頁

Fedora Core 2與windows雙系統啟動問題的預防與恢復

←手機掃碼閱讀     火星人 @ 2014-03-25 , reply:0

本文做為參考學習下。

經manux兄提醒,
發現下文,
簡單翻譯了一下,
希望有所幫助。

Prevention and Recovery of XP Dual Boot Problems

* From: Jack Aboutboul
* To: fedora-devel-list redhat com
* Subject: Prevention and Recovery of XP Dual Boot Problems
* Date: Tue, 25 May 2004 17:25:06 -0400

XP雙系統啟動問題的預防與恢復
發自:Jack Aboutboul
發至:fedora-devel-list redhat com
主題:Prevention and Recovery of XP Dual Boot Problems
日期:Tue, 25 May 2004 17:25:06 -0400

This is the whole document for those who didnt get it.

以下是全文,提供給未獲得此文的人們。
<---begin--->

Dual Booting Issues With Fedora Core 2 and Windows: Prevention & Recovery

Fedora Core 2與Windows雙系統啟動問題:預防與恢復

NOTICE: Please read this document in its entirety.

注意:請完整閱讀這篇文檔。

This guide was inspired by the solution developed by Radu Cornea and
Alexandre Oliva in this thread:
http://www.redhat.com/archives/fedor.../msg02114.html .
This guide aims to integrate the original solution with the refinements
evolved in that thread. This guide offers an explanation of why the
refinements are beneficial and some workarounds to problems that may prevent
the uninitiated from using the solution. It also provides a means of
preventing the problem entirely.

這篇指南的靈感來自Radu Comea和Alexandre Oliva發展的方案,見:
此指南的目的在於使最初的解決方案和上述貼子涉及的改進方案統一起來。
本指南解釋了改進方案的好處,提供了一些初學者使用此方案可能遇到問題的
解決方法。文章也提供了一種可以徹底預防問題的手段。

Primer:

導火索:

There is a bug in Fedora Core 2 that causes the hard disk geometry as
reported in the partition table to be altered during installation. This
change may cause Windows boot failure. Although this bug is severe, it is
recoverable and no data should be lost. It is important not to panic if and
when this happens so you do not cause further problems or cause actual loss
of data in the process of recovering from the error.

Fedora Core 2有一個bug,會導致安裝過程中改變分區表中記錄的硬碟幾何
參數。這種改變可能導致Windows啟動失敗。儘管這個錯誤很嚴重,但是
它是可以恢復,不會造成數據丟失。重要的是,如果錯誤發生,你不要恐慌,
以免在修復錯誤的過程中,導致進一步的問題,造成實際的數據損失。

Prevention:

預防:

This bug can be avoided entirely by using some preventative steps while
installing Fedora Core 2. Thanks go out to Cero (cero coolnetworx net) for
discovery and testing of this solution.

這個錯誤可以在安裝Fedora Core 2的時候使用一些預防步驟加以徹底避免。
感謝Cero (cero coolnetworx net) 發現並測試了這個解決方案。

To avoid the hard disk geometry to be altered you may enter it manually
during installation by using the hdN= parameter (where N is
the letter representing the drive with the MBR you will use). To discover
the current geometry before installing Fedora Core 2 you should use a
utility that can read the drive geometry as reported in the partition table.
It is important to understand that some tools may not be reporting the
actual data from this location, but, rather, some derived value, so your
surest way is to use the fdisk utility. You can get this information by
following these steps.

要避免硬碟幾何參數被改變,你可以在安裝過程中使用參數
hdN=<驅動器參數>手動輸入(N代表安裝有MBR的驅動器)。在安裝Fedora
Core 2之前了當前幾何參數,需要使用工具,它能夠讀取分區表記錄的驅動器
幾何參數。重要的是要了解,一些工具可能不是從分區表報告實際數據,而
更可能是報告一些衍生數據,因此,最安全的作法是使用fdisk工具。你可以
按照以下步驟獲得相應信息。

Note: This example will assume you are looking at /dev/hda, which is the
master on the primary IDE interface. If your MBR is located on another
device you should use its name (eg: /dev/hde )

注意:本例假設你要查看的是第一個IDE介面的主驅動器/dev/hda。如果你的
MBR位於其它設備,則要使用它的設備名,如:/dev/hde。

Download and burn the Fedora Core 2 Rescue CD.

下載並燒制Fedora Core2 Rescue CD。

Boot from the Rescue CD (there is no need to start networking or mount
drives)

用Rescue CD引導(無須啟動網路或載入驅動器)

Issue the command: fdisk -l /dev/hda to print the current partition table
to screen in non-interactive mode.

運行命令:fdisk -l /dev/hda 以非交互模式將當前分區表輸出到屏幕。

Write down the drive geometry as reported at the beginning of the output
from fdisk. This is reported as number of Cylinders, Heads, and Sectors
(hence the name CHS).

記錄從fdisk開始所報告的驅動器幾何參數。這裡記錄的是柱面,磁頭和扇區
的數目(由此而產生CHS)。

You can now reboot the computer by simultaneously holding down the keys
Ctrl-Alt-Delete.

此時可以按下Ctrl-Alt-Delete組合鍵重啟機器。

You can now boot the Fedora Core 2 installation CD. At the first menu prompt
you should now choose to run the installer with the known geometry.

現在可以用Fedora Core 2的安裝光碟引導系統。在第一個提示菜單要選擇使用
已知參數運行安裝程序。

Example: linux hda=14593,255,63

例:linux hda=14593,255,63

The installer should now run normally and not alter your partition table
geometry entry. If, for any reason, this geometry should be changed
regardless of this preventative step, please use the recovery steps to
correct the geometry of the drive as reported by the partition table.

安裝程序現在可以正常運行而不改變你的分區表幾何參數記錄。如果,
出於某種原因,不是利用預防步驟,參數應該被改變,那麼使用恢復步驟
來改正分區表報告的驅動器幾何參數。

Recovery:

恢復:

You have installed Fedora Core 2 and find that you cannot boot Windows.
Typically the boot process will terminate with the words

你已經安裝了Fedora Core 2,發現無法啟動Windows。通常,引導過程以
如下詞語結束:
Rootnoverify(hd0,0)
Chainloader +1

These are the boot parameters from your Grub configuration. The parameters
are likely to be correct, but Windows fails to boot because Fedora Core 2
altered the hard disk geometry as reported by the drives partition table.

這些是Grub配置的引導參數。這些參數可能是正確的,但是Windows啟動失敗,
因為Fedora Core 2改變了驅動器分區表記錄的硬碟幾何參數。

IMPORTANT: Do not panic and do not begin using multiple tools in an attempt
to correct this error. Automated tools can be very dangerous. The actual
changes that need to be made are minor and benign. By running 3rd party
applications to recover a bootable Windows installation may cause you to
lose your data. You have been warned.

重要:不要恐慌,不要使用多種工具試圖修復該錯誤!自動工具可能非常危險。
需要所做的實際改變是微小和有益的,使用第三方工具來修復可引導的windows
系統,可能導致數據丟失。你已經被警告。

For those who are technically inclined I include here a brief explanation
of what is going on. The drive has not been damaged and your partition
table is fine. The problem is that Windows demands a "sane" CHS table.
This table has been altered by Fedora Cores installer and Windows hangs.
Luckily, the actual table, in LBA format, is not corrupted. For those
seeing a strange partition table, take note that you are probably looking at
the table in CHS values and these values are derived from the geometry. The
GNU/Linux operating system does not use these values and operates purely
with LBA values. Windows should not be using CHS either, but for some
reason it at least checks this geometry and can be prevented from booting by
them being bad. Changing the drive geometry changes the CHS partition table
because this is a virtualization of the true state of affairs on the drive
which are best described as being mystical. Think of CHS geometry as a
compass. If you change the geometry you have recalibrated where the
needles reference point is and you are no longer looking at true north.

對那些有技術愛好的人,我這裡附帶了一些實際變化的簡單解釋。驅動器
並未被損壞,分區表也是完好的;問題在於Windows要求「健全」的CHS表。而
這個表被Fedora Core的安裝程序改變了,Windows就掛了。幸運的是,以LBA
格式而存在實際的分區表沒有被破壞。有些人看到了奇怪的分區表,要注意,
你很可能看到的是CHS的表,這些值是從幾何參數衍生的。GNU/Linux操作系統
不使用這些值,而是純粹按LBA值運行。Windows也不應該使用CHS,但是
出於某些原因,它至少要檢查幾何參數,並且會因錯誤的幾何參數而無法啟動。
改變驅動器參數就改變了CHS分區表,因為CHS分區表虛擬了驅動器上的
實際狀態,後者可以說是很神秘的。你可以把CHS幾何參數想象成指南針,如果
你改變了幾何參數,就相當於重新刻度了指針的參考點,你就無法看到真正的
向北方向。

The solution to this problem is very simple, but it may confuse people
because most people will question why they are seeing strange values
reported from their partition table in CHS format. If you do not trust this
solution or your ability to follow these steps then you should stop and seek
hard disk recovery consulting services. The Fedora Project is in no way
liable for any data loss and this guide is offered without guarantees. You
are taking responsibility for what happens. Now, let us go through the
solution.

這個問題的解決方案非常簡單,但是它可能使人迷惑,因為多數人都會
問為什麼他們見到了奇怪的CHS格式的分區表數值。如果你不信任這個方案或
是你自己跟隨這些步驟的能力,那麼你應該停下來,尋求硬碟恢復諮詢服務。
Fedora項目無法對任何數據損失負責,本指南也不做任何保證。你要對所發生
的一切負責。接下來,繼續咱們的方案。

Because only the drive geometry is altered there is no need for manual
intervention in the form of discovering and entry of partition information.
The information in your partition table is correct. However, you need to
alter the geometry entry and normally this would require you to re-enter the
partition table by hand using a tool like fdisk. This is where the
application sfdisk comes to the rescue. Sfdisk can be very powerful in
non-interactive mode, it can output information that can be used as input
elsewhere, and it can accept data as input at run-time. This makes sfdisk
ideal for this solution because you can ask it to read the partition table
and deliver the result in a way that itself can write back when you tell it
to change your drive geometry. This makes the process fast and less prone
to human error as very few values need to be supplied. The solution can be
summed up in a single line with two commands:

因為只有驅動器幾何參數被改變,沒有必要手動干涉發現和記錄分區信息。
分區表的信息是正確的。然而,你需要改變幾何參數記錄,通常這要求你使用
fdisk等工具來手動重新輸入分區表。這裡就要應用sfdisk來進行恢復了。sfdisk
在非交互模式功能非常強大,它可以輸出信息作為其它地方的輸入信息,它也
可以實時地接收輸入數據。這使得sfdisk成為這個解決方案的理想工具,你可以
讓它讀取分區表,以這樣一種方式輸出結果,使得你讓它改變驅動器幾何參數的
時候,它再把表寫回去。這樣修復過程只要提供很少的數值,快速而且減少了可
能的人為錯誤。這個方案可以總結為兩個命令的一行語句:

sfdisk -d /dev/hda | sfdisk --no-reread -H255 /dev/hda

So that the reader may better understand what is going on here, lets go
through what each section does and what the parameters mean.

因此讀者最好理解究竟發生了什麼,下面解釋一下每一部分做些什麼,參數
是什麼含義。

sfdisk -d /dev/hda

This part runs sfdisk non-interactively and dumps the partition table in a
format that sfdisk can also use for input (as we are doing). Try this
command by itself to see your partition table as it is very safe. You will
want to check to check for warnings in the output. Warnings pose a problem
because they interfere with the use of this data as input. Output containing
a warning may look like the example below:

這一部分非交互運行sfdisk,將分區錶轉儲為sfdisk也可以作為輸入的格式(如
我們所做)。這個命令是非常安全的,你可以試著用它來看自己的分區表。你可能
也想在輸出查看一下警告信息。警告信息造成一些麻煩,因為它們會影響數據作為
輸入的用途。包含警告信息的輸出如下例:

$ sfdisk -d /dev/hda
Warning: extended partition does not start at a cylinder boundary.
DOS and Linux will interpret the contents differently.
# partition table of /dev/hda
unit: sectors

/dev/hda1 : start= 63, size= 16771797, Id= 7, bootable
/dev/hda2 : start= 16771860, size=217632555, Id= f
/dev/hda3 : start= 0, size= 0, Id= 0
/dev/hda4 : start= 0, size= 0, Id= 0
/dev/hda5 : start= 16771923, size=104856192, Id= 7
/dev/hda6 : start=121628178, size=112776237, Id= 7


For reasons unknown, using the option -- quiet does not suppress all
warnings so it becomes the task of the user to discover a way to still use
the output as input. The simplest way is to write the output to a plain
text file, editing out the warning in that text file, and using the edited
text file as the input, thus:

由於未知的原因,使用--quiet選項不能禁止所有的警告信息,因此用戶要
找到方法來將輸出作為輸入。最簡單的方法是將輸出寫入簡單文本文件,
編輯文本文件內的警告信息,再使用編輯過的文本文件作為輸入,這樣:

sfdisk -d /dev/hda > MyPartitionTable.txt
editing MyPartitionTable.txt to remove the warnings, saving the edited
text, and

編輯MyPartitionTable.txt,刪去警告信息,保存編輯過的文本,然後

cat MyPartitionTable.txt | sfdisk --no-reread -H255 /dev/hda

The output from "sfdisk -d /dev/hda" should begin like this (this is the
edited version of the example given before):
「sfdisk -d /dev/hda」的輸出像這樣開始(這是前面所給例子的編輯文件):

# partition table of /dev/hda
unit: sectors

/dev/hda1 : start= 63, size= 16771797, Id= 7, bootable
/dev/hda2 : start= 16771860, size=217632555, Id= f
/dev/hda3 : start= 0, size= 0, Id= 0
/dev/hda4 : start= 0, size= 0, Id= 0
/dev/hda5 : start= 16771923, size=104856192, Id= 7
/dev/hda6 : start=121628178, size=112776237, Id= 7

Note that "cat MyPartitionTable.txt" takes the place of "sfdisk -d
/dev/hda" as these are now equivalent. In this case the warning portion has
been stripped, preserving the needed data used by sfdisk in step two of the
command.

注意「cat MyPartitionTable.txt」替代了「sfdisk -d /dev/hda」,因為它們是
同等的。這樣警告部分已經被去除,保留了命令第二步sfdiks所要
用的數據。

sfdisk --no-reread -H255 /dev/hda

This portion of the two-part command performs the actual change to your
hard disk. This main operation is in -H255. This tells sfdisk to write a
head count of 255 into the drive geometry. This command executed by itself
would ask for user input of the partition table (just like fdisk). However,
by piping the table we just read in the first command, this is avoided and
work is saved and we know the data is correct (or, at least, unchanged).
This is why sfdisk is used.

兩部分命令的這一部分執行對硬碟的實際改變。主要的操作在於-H255。
此參數告訴sfdisk將磁頭255寫入驅動器幾何參數。執行這一命令會要求用戶輸入
分區表(如同fdisk)。但是,由於使用了管道傳輸前面所讀的表,避免了手動輸入,
數據得以保存。我們現在知道數據是正確的(或者至少是沒有改變)。這也是為什麼
要使用sfdisk。

The --no-reread option allows the command to run even when the disk has a
mounted partition. Some users may find they need to further force the
operation to complete. This is done by using --force (sfdisk --no-reread
--force -H255 /dev/hda).

選項--no-reread允許命令在磁碟即使有載入分區的情況下運行。一些用戶可能
發現還需要進一步強制操作完成,這通過使用選項--force(sfdisk --no-reread --force
-H255 /dev/hda)。

In this example we are only changing the number of heads in the geometry.
If you know the correct number of cylinders before the Fedora Core
installation changed these values you may also write back this number. An
example with 14,593 cylinders is provided below.

在本例中,我們只改變了幾何參數的磁頭數目。如果你知道Fedora Core安裝程序
改變數值前柱面的正確數目,你也可以寫回這個數目。下面提供了一個14,593柱面的例子。

sfdisk -d /dev/hda | sfdisk --no-reread -H255 -C14593 /dev/hda

The number of reported sectors (S) should not have changed and remained as
63.
記錄的扇區數目(S)不應該改變,要保持為63。

This is the part most likely to be met with the question "if I change the
number of heads, must I not also change the the number of cylinders?" The
answer to this question is "no." When the geometry was changed the number
of heads changed from 255 to 16 and the number of cylinders was increased to
compensate. As long as the values are large everything should be ok. Only
the pedantic need worry about changing the number of cylinders manually. If
you do not know the value from before you are best off not supplying this
number.

這裡很可能要碰到一個問題「如果我改變了磁頭數,我是不是一定要改變柱面數
呢?」回到是「不」。在幾何參數被改變時,磁頭數從255變成16,扇區的數目就相應地
被增加來彌補變化。只要數值夠大,一切都會正常。只有學究才會去需要擔心手動
改變柱面數。如果你不知道以前的柱面數,最好不要添加這個數值。

By using this method there is no need, and indeed you should not, run a
program that wipes the MBR (like fdisk /mbr). Doing so will cause you to
lose the Grub pointer installed in the MBR and you will have to use the
Recovery CD to regain access to your Fedora Core installation.

使用這種方法就沒有必要,而且實際上你也不應該使用程序來清除MBR(如
fdisk /mbr)。這樣做會導致安裝在MBR的Grub指針丟失,你將不得不用Recovery
CD來重新進入Fedora Core系統。

Updating Grub after installation seems to have no effect on the drive
geometry as the problem seems strictly limited to the Fedora Core installer.

安裝完成後升級Grub似乎對驅動器幾何參數沒有影響,因為問題看來僅限於
Fedora Core安裝程序。

Good luck and join us on the IRC at #fedora on irc.freenode.net for any
questions you have or contributions to the community you wish to make.

祝你好運。
如果你有問題要問,或是想對社區做貢獻,進入IRC,加入irc.freenode.net的#fedora頻道。

[火星人 ] Fedora Core 2與windows雙系統啟動問題的預防與恢復已經有477次圍觀

http://coctec.com/docs/linux/show-post-155160.html