|
楼主 |
发表于 2004-5-30 11:31:55
|
显示全部楼层
Fedora Core 2与windows双系统启动问题的预防与恢复
经manux兄提醒,
发现下文,
简单翻译了一下,
希望有所帮助。
原文位置:http://www.redhat.com/archives/f ... 4-May/msg00908.html
Prevention and Recovery of XP Dual Boot Problems
* From: Jack Aboutboul <jaboutboul speakeasy net>
* 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 <jaboutboul speakeasy net>
发至: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/f ... 4-May/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发展的方案,见:
http://www.redhat.com/archives/f ... 4-May/msg02114.html
此指南的目的在于使最初的解决方案和上述贴子涉及的改进方案统一起来。
本指南解释了改进方案的好处,提供了一些初学者使用此方案可能遇到问题的
解决方法。文章也提供了一种可以彻底预防问题的手段。
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=<drive geometry> 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频道。 |
|