Making Fedora Core 2 and Windows play well together (分区工具对磁盘CHS的影响)

 这篇文章来自Fedora 的一个邮件列表
从下面的三个邮件列表中得到信息以及大家的回复可以看出,这并不是FC2存在的问题,对所有的
发行版本都可能存在这种问题,我觉得这和用户在自己的磁盘上安装第一个系统时所使用的分区工具
有密切的关系;这种问题的来源应该是两种分区工具的不同的环境下分区造成访问磁盘时的紊乱而
导致的。
关键字:
Dual Booting Issues With Fedora Core 2 and Windows: Prevention & Recovery
多启动,预防和恢复

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/fedora-test-list/2004-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.(解释了该文章的主要来源以及要旨)

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,这会导致已经安装的win启动失败,虽然这是一个很严重的问题,但它是可以恢复的;当遇到这种情况
时,再没有导致进一步的问题发生和数据丢失的情况下,你没有必要恐慌,因为这时是可以从错误中恢复。

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.预防步骤,感谢Cero的测试和解决方案。

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.可以通过直接输入磁盘的参数来避免,首先用fdisk根据来获取磁盘的CHS;有
的工具报告的并不是真实的CHS,这是一种假象,所以先在其它系统上用fdisk工具来获取该磁盘的物理参数。
我理解的geometry应该就是CHS 的值,因为用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 )这里实例是/dev/hda

Download and burn the Fedora Core 2 Rescue CD. 下载刻录 FC2 的急救CD

Boot from the Rescue CD (there is no need to start networking or mount
drives) 从急救盘启动

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).从这里可以看出 geometry 就是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.
用FC2的安装CD启动,在启动菜单的提示符中加入 linux hda=14594,255,63这个CHS值就是刚才记下的值

Example: 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.
此时安装就不会改变你的CHS了;如果使用上面的预防步骤的情况下,仍然会改变CHS,就使用恢复步骤来校正CHS值
就是下面的恢复步骤。


Recovery:恢复

You have installed Fedora Core 2 and find that you cannot boot Windows.
Typically the boot process will terminate with the words 此时FC2已经安装,但是win无法启动
典型的win的启动如下所示:

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作为bootloader的启动方式,这看起来没有什么不妥,但是由于CHS的改变导致win的无法正确启动。

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.
重要提示:不要试图使用第三发工具来修复该问题,尤其自动化工具非常危险,我们不知道它做了什么,有
可能会导致数据的丢失;因为实际此时需要作的工作却很少(没有第三方工具‘想象’的那么多)

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.
解释了此时的分区表状态,以及win自己认为什么样的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.对该问题的解决方案非常简单,作者再次说明该方案不负商业责任^_^

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:由于这仅仅是由于CHS的入口导致的问题,所以就
没有必要再研究分区的信息了,因此只需要一个工具来校正CHS 分区的入口就OK了,接下来解释了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 -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选项并不能完全屏蔽所有的警告信息,你可以用
下面的命令将分区信息输入到一个文件 MyPartitionTable.txt

sfdisk -d /dev/hda > MyPartitionTable.txt

editing MyPartitionTable.txt to remove the warnings, saving the edited
text, and 编辑该文件去掉警告信息,然后用下面的命令和上面这条代替最初的命令

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):

# 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.

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.这条命令是校正的主要操作,它接受一个分区表信息,我们这里使用了
管道从前面的命令中得到的分区传递到这里作为输入。

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也是这样。

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.

sfdisk -d /dev/hda | sfdisk --no-reread -H255 -C14593 /dev/hda
这里的 -H -C -S 分别对应正确的CHS值

The number of reported sectors (S) should not have changed and remained as
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.

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.

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

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.


--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
http://www.redhat.com/mailman/listinfo/fedora-devel-list
/
Keith Kelly wrote: 
> I've found a bug in FDisk which is responsible for all the problems I've
> had trying to get FreeBSD installed. I also found a work-around, and
> I'm happy to report I'm typing this message from Konquerer inside
> FreeBSD 5.1-RELEASE right now. 这是一个来自FreeBSD5.1上的信息。

Gratulation.

> Basically, the problem is that FreeBSD's FDisk and the motherboard BIOS
> independently calculate a set of CHS values (Cylinders/Heads/Sectors)
> based on the total sector count of the disk, but they do it in different
> ways and thus end up with different values. BIOS得到的CHS和os得到的CHS不同。

Yes. That is because there are different ways to calculate that.

> So, the problem is that FDisk makes *different* assumptions than my BIOS
> does about what the sectors and heads values should be.

That has always been the problem for CHS conversions.

> I ran across
> some information on a BIOS manufacturer's site which claimed that for
> "LBA mode" SCSI drives (more accurately known as "LBA-Assist translation
> mode"), that it is safe to assume that sectors should be 63 and heads
> should be 255. Given that FreeBSD's roots and developer community seems
> historically SCSI-centric, I can see how these assumptions would have
> been picked up and used in FDisk and considered acceptable. But these
> assumed values are clearly not correct for how CHS gets calculated by
> many PC BIOSes for IDE drives.

LBA is the only common mode known to all BIOS vendors, Harddrive
manufactures and so on, because at least someone made up some
assumptions and published them instead of developing their own CHS
translation. SCSI was first to breach the BIOS CHS barrier on PCs and so
they defined that method. If your BIOS is in auto mode, it tries to get
the current format from the harddisk most times uses CHS, but will also
find a disk with LBA. So in a modern system LBA would be the safe pick
and not CHS. Most likely it picks it from disk (the partition table uses
entries for cylinders, heads and sectors to describe the partitions), so
the first fdisk sets the addressing the bios chooses. So to avoid
conflicts and enhance the usabilty of your drive in different PCs and
with different systems use LBA.

> Furthermore, I believe that the reason FDisk rejects the manually
> entered CHS of 19618/16/255 is because either (1) it tries to enforce
> those bad assumptions about heads and sectors, or (2) it gets confused
> by the rounding error. In other words, in the case of rounding error,
> FDisk may be taking the manually-entered values, multiplying them
> together, and seeing that it doesn't exactly match (or come close enough
> to, in its humble but flawed opinion) the total sector count for the
> drive. The way Fdisk's geometry validation ought to work is like this:
>
> - Divide the total sector count of the drive by (H*S), where H and S are
> the user-supplied values.
> - Round the result to the nearest whole number.
> - Compare that result to the user-supplied value for cylinders.
> - If the result matches, accept the user's input as good.

The test will ensure that the user dont make typos, but it can't ensure
that the C. H and S are arranged the same in both conversions.

> In the meantime, the workaround for anyone experiencing this problem is
> to go into their BIOS and set the hard drive to "User" mode, and
> manually enter the same C/H/S settings that FDisk calculated for the
> drive. Unfortunately, I think this means that if you have to
> repartition and reformat the entire drive, since the BIOS will now be
> addressing the drive using different C/H/S settings and will be unable
> to read any partitions that were formatting using different C/H/S
> addressing. So while there is a workaround, it is far from an ideal
> user experience.

Better solution, put the IDE drives to LBA and you'll see that you get
the same CHS every time and on every system except MSDOS < 6.3. If you
got a filesystem which doesnt bother about CHS and uses linear
addressing you 'only' need a new partition table. After redoing the
drive you can put the IDE back to Auto. 更好的解决方案是设置磁盘为LBA模式,除了MSDOS < 6.3
的版本外,都将得到同样的CHS值,如果你有一个和CHS无关而且使用线性的文件系统那么你只需要一个新的分区表,
做好后重新将磁盘设置为Auto模式。

Hendrik
//
Charlie Sorsby wrote: 

    Hello,

    I enquired about this before but then (unrelated) things came up
    and I had to put the installation on the back burner for a while.
    I'm only now returning to it.

    Here are the notes that I made when I booted from the distribution
    CD (from freeBSD mall as I recall); the notes are between the lines
    of "#" characters:

    ######################

    Sunday, 27 Jan, 2008 -- 12:35:32 MST

    Well, this is my second attempt to install freeBSD 6.2 on the
    Lenovo T60 ThinkPad laptop.


Don't have one of these myself.

    Before the earlier attempt, I had used PartitionMagic to shrink the
    Windows XP slice and make room for freeBSD.


Ughhh! Partition Magic is truly evil! It does non standard things. I quit
using it years ago.

    When I, later, tried to install from the distribution CD, the
    installer complained about the disk geometry. I didn't copy the
    complaint down at that time so I'm going to try again and *try* to
    enter all error messages into this file.

    Booting from the CD:

    Country/region/group menu appears; selecting United States.

    At the sysinstall Main Menu which appeared next, I am selecting the
    Standard installation.

    Next is the fdisk message. Accepting the "OK" (the only choice)
    takes me to another Message:


This is not an fdisk message, this is an error from sysinstall:

    Message
    WARNING: A geometry of 232581/16/63 for ad4 is

^^^^^^^^^^^^
This looks like CHS geometry.

    incorrect. Using a more likely geometry. If this
    geometry is incorrect or you are unsure as to whether
    or not it's correct, please consult the Hardware Guide
    in the Documentation sub menu or use the (G)eometery
    command to change it now.

    Remember: you need to enter whatever your BIOS thinks
    the geometry is! For IDE, it's what you were told
    in the BIOS setup. For SCSI, it's the translation
    mode your controller is using. Do NOT use a ``physical
    geometry''.


If this is the message that pops up in sysinstall immediately prior to
launching fdisk, it is generally safe to ignore it. I just did an install
of 7.0 RC1 and when I set the BIOS manually to LBA (it was coming up CHS on
its own) I still saw this message, even though the LBA translation matched
exactly what fdisk subsequently reported. There is something wrong with
sysinstall.

There is a difference between what sysinstall reports and what fdisk
reports. Even when you *know* the BIOS is providing an LBA translation that
_exactly_ matches what fdisk reports you will still see this error from
sysinstall.

    Last time, I tried going to the BIOS setup screens but there was
    *nothing* about the disk geometry. I called Lenovo and their tech
    support guy didn't know what I was talking about. He ended up
    telling me that that's information that the hardware engineers know
    about and not available -- or something to that effect.


Again - I don't know this laptop. But generally there is a BIOS page that
lists drives and you can cursor up and down to select different drives by
pressing return on a highlighted entry. Usually, the next screen will
show "Auto" something or other and if you highlight "Auto" and press return
you can get to a screen where you can usually choose from one of three
translations manually. What fdisk is expecting to see is "LBA".

    Accepting the "OK" (again the only choice), I am taken to the FDISK
    Partition Editor where it says:

    Disk name: ad4 FDISK Partition Editor
    DISK Geometery: 14593 cyls/255 heads/63 sectors = 234436545 sectors

(114470MB) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This does look like an LBA geometry, which is what you want.
Notice that it is different from what sysinstall thinks.


    Offset Size(ST) End Name PType Desc Subtype Flags
    0 63 62 - 12 unused 0
    63 92156337 92156399 ad4s1 4 NTFS/HPFS/QNX 7
    92156400 9646560 101802959 ad4s2 4 Compaq Diagnostic 18
    101802960 132638688 234441647 - 12 unused 0

    [Followed by the command summary.]

    *I* certainly don't know whether what sysinstall thinks the
    geometry should be is correct or not.


Sysinstall most likely has it wrong. My bet here is fdisk has it right.


    Because I have no bloody idea what the disk geometry is, I'm afraid
    to continue. I don't recall ever having had such comments/complaints
    in past when installing earlier versions of freeBSD on desktop systems
    such as the one I'm typing this on which is running freeBSD 4.11.


If you wish to continue you don't have any choice. The drive has already
been setup by Partition Magic and the other operating system. Since it
looks like fdisk is seeing LBA you can probably ignore sysinstall.

BUT!!!!! You should prepare a recovery plan in advance. BACK UP anything you
do not want to lose! While you may not have any choice if you do wish to
proceed, you just may wind up with a system that needs to be totally
reinstalled from the ground up. Prepare for the possibility, and if you are
not prepared don't take the chance if anything on that drive is important
to you.

If the partition table on the drive is standard then fdisk is only going to
add a few bytes to it. If Partition Magic has garbaged it then when fdisk
writes into it it will be hosed at that point. I have seen Partition Magic
do this before. It's why I won't use it.



    So, should I just continue the process using the geometry that
    sysinstall "guesses" or will that cause problems? If the latter,
    how can I learn the proper geometry to use? I couldn't find
    anything in the BIOS configuration to tell me and, as I comment in
    the notes above, lenovo's tech support were useless.


Most "tech support" for retail markets is advertising. "Useless" is a sheer
understatement.

    Any help will be sincerely appreciated.


Don't know what help any of this may have been. My bet is you can ignore the
sysinstall error like so many of us do, use whatever geometry comes up in
fdisk, and the install should be OK. The real monkey wrench here is
Partition Magic. Like I said before: If you're not ready to lose data then
don't get caught with your pants down. If you are prepared to recover lost
data then give it a go. Caveat Emptor: YMMV!

-Jason

 
上面是另外两个邮件列表内容,稍后总结,都是针对安装双系统时分区对磁盘的物理扇区影响而导致问题的解决方案.


下面是对该文章的评论和邮件回复!


( Log in to post comments)

Making Fedora Core 2 and Windows play well together

Posted May 26, 2004 10:47 UTC (Wed) by hchristeller (subscriber, #4246) [Link]

I'd like to thank the authors for the best explanation of the issues that I've yet seen. I wish that I'd had this a week ago. It should have been in the release notes.

There's one part that I still don't understand. If Linux doesn't use the CHS values in the partition table, then why does anaconda change them?


Short answer: Because anaconda uses parted, and parted expects the disk geometry from the kernel to be accurate.

Making Fedora Core 2 and Windows play well together

Posted May 29, 2004 2:33 UTC (Sat) by cliff22 (guest, #21930) [Link]

HEY - what if you dont install grub on the MBR but install grub on the root partition for Fedora instead? Then install the GAG bootloader on the MBR and use GAG to choose your windows or Fedora.

This way Fedora and Grub never write to the MBR. Will that stop the partition table from being changed (in a way that affects windows)? or does the problem also happen if the fedora installer creates or changes a partition??? Whats not clear to me is when the partition table gets screwed up, is it by grub or the fedora partition program?

I have been using the GAG boot loader for a while now on many machines and it really makes life simple. Check it out at http://gag.sourceforge.net/

Making Fedora Core 2 and Windows play well together

Posted May 29, 2004 17:07 UTC (Sat) by surhudm (guest, #21939) [Link]

Check out :

http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=115980#c104 and
http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=115980#c105

Surhud

Making Fedora Core 2 and Windows play well together

Posted Sep 4, 2004 1:38 UTC (Sat) by SFX (guest, #24508) [Link]

This is just a quick recovery tip for anybody who has accidentally hosed their system by using the xP Recovery Console prior to finding out about this fix: You can recover your NTFS data by using a Mac running OS 10.3.5. It reads NTFS out of the box. If you are using a ATA drive you can configure it as a slave in a G4 and it will mount the drive automatically on boot, or you can use a IEEE 1394 drive case (which is your all around best best). If you're using a SATA drive you either need a G5 or a IEEE 1394 case with an SATA interface. Trust me that this a quick, easy resolution to the problem because you can extract your data from the drive and back it up to the host, format the drive (you can even zero all data or do an 8 way overwrite) and then set up partitions and format them with MS-DOS FAT32 filesystem and put your data back on a secondary partition and do a clean reinstall. Then you can move your data back over afterwords, see this site for a description of supported filesystems in OSX:

http://www.kernelthread.com/mac/osx/arch_fs.html

If you have access to a Mac to do this, then do it. It won't take that long. Data recovery on a Mac is easy, everybody should keep one around somewhere just for that alone. Don't be prejudiced, like I said before, it's all *nix now ;-)

Making Fedora Core 2 and Windows play well together

Posted May 26, 2004 10:47 UTC (Wed) by horen (subscriber, #2514) [Link]

An alternative -- one which I chose to use -- is to "bite the bullet" and add an additional hard drive, devoted solely-to and onto-which your Windows installation will be placed.

I took an old 5.1GB Seagate drive (IDE), and jumpered it as the second drive (slave/hdb). Next, I disconnected the 80-pin ribbon cable from the first drive (master/hda), put a *legal* Windows/XP CD in the CDROM, and then rebooted the host.

Following the successful installation, I halted the host, reconnected the ribbon cable to the first/master drive and then booted the host. Since I have been using GRUB, it booted right into FC/2. I then added the following stanza to /boot/grub/grub.conf:

title Windows XP Pro [Hebrew-enabled]
map (hd0,0) (hd1,0)
map (hd1,0) (hd0,0)
rootnoverify (hd1,0)
chainloader +1

Use the command "info grub" to learn about the map, rootnoverify, and chainloader commands.

Finally, reboot your host and, when the GRUB splashscreen appears, move the cursor down to the "Windows" entry and press return.

It works like a champ, for me; should for you, too.


Making Fedora Core 2 and Windows play well together

Posted May 26, 2004 13:18 UTC (Wed) by djao (subscriber, #4263) [Link]

No Linux up to this point has had this issue, neither should FC2.

Actually, Mandrake and SuSE both had this same issue before Fedora 2. The bug, if you want to call it a bug, is with linux 2.6 in general, not with any distribution in particular.

Making Fedora Core 2 and Windows play well together

Posted May 26, 2004 19:03 UTC (Wed) by allenp (subscriber, #5654) [Link]

Just a data point: I added FC2 to a Dell C400 laptop that already had
Windows 2000 last night. Resized the NTFS partition using tools from the
SystemRescueCD disk and installed FC2 in a dual-boot setup. Windows still
boots as well as it ever did, if you can call that a good outcome. :-)

The bug apparently does not always bite.

Making Fedora Core 2 and Windows play well together (don't think so)

Posted May 29, 2004 4:59 UTC (Sat) by f3dr0 (guest, #21932) [Link]

I also have w2k on a compaq laptop and it boot correctly after the Fedora Core 2 installation. But if use a tool like PartitionMagic __after__ the installation, it immediately says that the geometry is a mess and I got problems trying to resize partitions.

Cheers!


Making Fedora Core 2 and Windows play well together

Posted May 26, 2004 10:54 UTC (Wed) by JoeBuck (subscriber, #2330) [Link]

Wow.

Certainly this document is useful to anyone who has already been hurt by the bug, or who has already downloaded and burned Fedora 2 ISOs. I would like to see a bit more detail, though, on exactly at what point the disk geometry information becomes corrupted, to assess whether an upgrade via apt or yum would be affected.

But does the Fedora team think that asking everyone who wants a dual-boot setup to follow this procedure is a satisfactory solution? It's complex enough to be error-prone, and greatly increases the complexity of installing Fedora dual-boot.

If I were in charge, I would declare Fedora Core 2 a "paper bag release" because of this bug, and put out 2.01 (or whatever you want to call it) in a hurry. It should be possible to do this in a way that only the first CD needs replacement.

Making Fedora Core 2 and Windows play well together

Posted May 26, 2004 13:44 UTC (Wed) by dowdle (subscriber, #659) [Link]

It doesn't happen every time. I installed on about a dozen duel boot
machines before I ran into the problem. In most cases I reused existing
partitions and it worked fine.

Again, it isn't unique to just Fedora Core 2... but it appears any distro
that uses the 2.6.x kernel

1 Strike and your out?

Posted May 26, 2004 16:25 UTC (Wed) by JoeBuck (subscriber, #2330) [Link]

But almost no one installs Windows. They get it pre-installed when they buy their computer. And almost everyone who does install it doesn't install it after installing Linux. On the other hand, large numbers of people install Linux after Windows using a dual-boot setup. The consequence is that far more people are affected by this problem.

Look, the Fedora folks need to fix this bug. It should be treated as a show stopper.

1 Strike and your out?

Posted May 26, 2004 17:02 UTC (Wed) by dowdle (subscriber, #659) [Link]

Lots of people install Windows.... like after it screws up and needs to be
reinstalled... or after a virus or worm, etc. The need to reinstall isn't
as bad with W2K and XP.

Again, I installed on about a dozen systems before I ran into this the
first time. It certainly doesn't happen every time... or at least that
hasn't been my experience. Perhaps it is because I've installed mostly on
pre-partitioned systems that previously ran Linux... but I'm not sure.

As reported over and over, it isn't unique to Fedora Core 2 and it is
really an issue with the kernel. I'm sure the kernel developers
(including several employees at Red Hat) are working on it.

The vast majority of people installing FC2 have downloaded it... and it
isn't their first Linux. Once it starts coming out in books and more
beginners start locking themselves out of Windows, it might be a bigger
issue.

1 Strike and you're out?

Posted May 26, 2004 17:35 UTC (Wed) by kena (subscriber, #2735) [Link]

Most home users don't "install" Windows. Most home users can't "install" it -- they can only re-image their system with the manufacturer's included image CD's. Which, sadly, will gladly step on not just the MBR and partition table, but everything else on the primary physical disk. Go buh-bye. Needless to say, MS doesn't care a great deal about the possibility that -other- operating systems might co-exist. Of course, the fact that that wipes Windows data as well shows how little they truly do care...

$.02

1 Strike and your out?

Posted May 26, 2004 16:55 UTC (Wed) by hchristeller (subscriber, #4246) [Link]

Windows may nuke the boot loader, but it doesn't overwrite the partition table without permission. Reinstalling GRUB or LILO is pretty easy, and well documented.

Figuring out why the partition table changed when installing FC2 to existing partitions was neither easy nor well documented. At least it's documented now.

In my case, Windows wasn't an issue. I wanted to install FC2 on a spare partition to evaluate it before upgrading my current Linux partitions. The FC2 installer complained about the partition table it found. I'd backed up the system, so I created new partitions with FC2. After restoring, my previous Linux complained about the FC2 partition table. I've been burned by partition table issues before, so I don't like to see warning messages.

Now maybe I have enough information to have a partition table that both old and new Linux distributions are happy with. Is that asking too much?

Making Fedora Core 2 and Windows play well together

Posted May 26, 2004 16:29 UTC (Wed) by szaka (subscriber, #12740) [Link]

SUSE 9.1 is affected too, moreover at least most distro using 2.6 kernel with Parted based partitioning code (quite many, unless fixed). Fdisk should be ok.

Will fdisk with its "x extra functionality (experts only)" command work?

Posted May 26, 2004 16:53 UTC (Wed) by nicku (subscriber, #777) [Link]

I have used fdisk with the "x extra functionality (experts only)" command to change the CHS values a couple of times in the distant past, and do not remember a disaster happening.

Does anyone here know whether that would be a suitable way of setting the drive geometry settings in the partition table, as an alternative to using the sfdisk method described in this article?

Making Fedora Core 2 and Windows play well together

Posted May 26, 2004 18:16 UTC (Wed) by smoogen (subscriber, #97) [Link]

SuSE is affected to. One of my students says that he had similar problems with GenToo. Face it Linux is crap.. just stick with Windows ;)

Making Fedora Core 2 and Windows play well together

Posted May 29, 2004 17:11 UTC (Sat) by surhudm (guest, #21939) [Link]

Hey well it is your windows which is doing all the crap... Check out hte above article on why the problem arises...

Surhud

Making Fedora Core 2 and Windows play well together

Posted May 27, 2004 16:55 UTC (Thu) by advaita (guest, #21897) [Link]

Excellent guidebook this. I wish it were out a few days earlier. I was bitten by this bug in spite of having Windows XP and FC2 on different hard disks, since I decided to install GRUB on /dev/hda1. I would like to describe my mistakes, and hopefully someone else will know exactly what *not* to do!

Instead of Googling for more detailed info (there was quite a bit that would have helped me recover almost instantly) I ended up doing very stupid things like going to the WinXP recovery console and then trying FIXMBR and FIXBOOT and such. Consequence: my WinXP installation went kaput. Then I had the fortunate idea of installing NTFSprogs on FC2, after which I mounted the WinXP disk, and copied over all my personal stuff and burned CDs. Finally, I swiped /dev/hda clean and re-installed WinXP.

So lots of time wasted, instead of changing the disk access mode in the BIOS from C/H/S to LBA and letting WinXP live its usual life. But the info on resetting the partition table is great though.

Thanks and cheers!

Making Fedora Core 2 and Windows play well together

Posted May 28, 2004 23:26 UTC (Fri) by ivaldes1 (guest, #21926) [Link]

So if I ran fixmbr of fixboot from console, there is no way I can boot Win2000 again without re-installing it? I have to get my data through FC2?

-- IV

Making Fedora Core 2 and Windows play well together

Posted May 26, 2004 11:31 UTC (Wed) by newren (subscriber, #5160) [Link]

Wow, I'm really glad I saw this article on LWN. I might boot to my Window partition some time in the next year (no guarantees), and if I did, and this in fact affects me too, I'd probably waste several hours trying to track down the problem before eventually giving up and deciding that I just did something stupid and nuked Windows...and then boot back to Linux and forget about it. Now that I know, if Windows doesn't boot then I can just jump straight to the boot back to Linux and forget about it step without the hours of frustration. :-)

Making Fedora Core 2 and Windows play well together

Posted May 26, 2004 11:35 UTC (Wed) by kay (subscriber, #1362) [Link]

Thats it!

The fedora team wants to nuke Windows from all harddisc ;-))

Kay

It's not Windows specific

Posted May 26, 2004 12:25 UTC (Wed) by proski (subscriber, #104) [Link]

The problem is actully not specific to Windows. The driver geometry should not be changed, whether I have Windows or QNX or FreeBSD. The installer has no business messing with the drive geometry. It's a bug. The only part specific to Windows is that it won't boot.

I hope Fedora will release a bootable floppy image that would revert the geometry to LBA. I suspect they are working on it already. It's easier to write and debug a script once that to explain even a simple thing to every user. But they should debug it really well. Besides, the script should restore the cylinder count to the correct value (not just for pedants).

It's not Windows specific

Posted Aug 3, 2004 12:46 UTC (Tue) by warpedMania (guest, #23722) [Link]

No indeed, it is not. I was using three OS's: windows 98 (fat32), OS/2 (hpfs) and Red Hat Linux vs. 8 (Ext2). After I installed Fedora over my old Linux and had the filesystem of that partition changed to Ext3, there was a big surprise: Windows would still boot, but OS/2 refused, even though all the data are still present on my HPFS partition. I am glad I had my holidays in the meantime, otherwise I might have damaged my preferred OS (OS/2 of course), trying to fix the problem. This is a stupid bug, and I think it deserves some more attention.

Making Light of it

Posted May 26, 2004 13:49 UTC (Wed) by AnswerGuy (subscriber, #1256) [Link]

... but you forgot to put in the part when where you mark those old MS Windows partitions as type 8e (LVM), run pvcreate and vgextend and make the space available to Linux at your leisure.

(BTW: I like LVM! Now that support is maturing and I forced myself to learn it it's nice to keep a few gigs of space unallocated and ready to toss into filesystem on a moment's notice. Online resizing/growing will make that EVEN BETTER).

JimD

Making Fedora Core 2 and Windows play well together

Posted May 26, 2004 14:37 UTC (Wed) by cpm (subscriber, #3554) [Link]

What's Windows and why do I need it on my Linux box?

Making Fedora Core 2 and Windows play well together

Posted May 26, 2004 15:28 UTC (Wed) by TimCunningham (guest, #10316) [Link]

What a clever and witty joke.

Making Fedora Core 2 and Windows play well together

Posted May 27, 2004 7:16 UTC (Thu) by cpm (subscriber, #3554) [Link]

Would be nice if it were not a sarcastic, but
rather a reasonable question.

Perhaps someday.

Making Fedora Core 2 and Windows play well together

Posted May 27, 2004 2:34 UTC (Thu) by still_a_nube (guest, #21866) [Link]

'What's Windows and why do I need it on my Linux box?'

cos we have to share the PC with sceptical family members!

Making Fedora Core 2 and Windows play well together

Posted May 27, 2004 8:07 UTC (Thu) by justme (guest, #19967) [Link]

Windows is a sham placeholder for your real operating system, put on your hard drive by hardware manufacturers to keep Microsoft from running them out of business.

Making Fedora Core 2 and Windows play well together

Posted May 26, 2004 18:16 UTC (Wed) by emak (subscriber, #488) [Link]

Very clear. Unfortunately I removed windows partitions yesterday...

Making Fedora Core 2 and Windows play well together

Posted May 27, 2004 17:34 UTC (Thu) by vds (guest, #21898) [Link]

I had two different situations where the GRUB installation left my Dell d600 laptop non-bootable, one in which I did a FC2test1->test2 update, the other when I did a clean installation of final FC2, letting it reformat the existing Linux partitions.

The situation was Linux on top of Windows XP Pro, with GRUB as the bootloader (originally from rh9, then FC1, then FC2 test(s), then FC2 final).

In both cases, my system hung at the GRUB 'loading stage2' message to the point where I needed to remove the battery to continue. The second time (FC2 final), I successfully recovered by:
- booted disk1 in rescue mode
- remounted read-write as per the rescue mode instructions
- ran grub-install manually
- rebooted (ok)

It was acting like the stage2 file in GRUB wasn't installed, but in my (close to) panic, I didn't stash the contents of /boot/grub for later investigation before booting rescue. Doh.

Making Fedora Core 2 and Windows play well together

Posted Jun 10, 2004 3:33 UTC (Thu) by aarjav (guest, #22224) [Link]

An alternative but round about solution that worked for me. (If this one doesn't work for you)

http://www.aarjav.net/articles/dual.txt

Making Fedora Core 2 and Windows play well together

Posted Jul 2, 2004 5:21 UTC (Fri) by nigelhorne (guest, #22757) [Link]

I tried the sfdisk command but got this max[imum] allowable size error.

[root@njh root]# sfdisk -d /dev/hdb | egrep -v '^(Warning|DOS)' | sfdisk
--no-reread -H255 /dev/hdb
Warning: HDIO_GETGEO says that there are 16 heads

Disk /dev/hdb: 77545 cylinders, 255 heads, 63 sectors/track
Old situation:
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End #cyls #blocks Id System
/dev/hdb1 * 0+ 690 691- 5550426 b W95 FAT32
/dev/hdb2 691 4864 4174 33527655 f W95 Ext'd (LBA)
/dev/hdb3 2989 4293 1305 10482412+ a5 FreeBSD
start: (c,h,s) expected (1023,254,63) found (1023,0,1)
end: (c,h,s) expected (1023,254,63) found (1023,15,63)
/dev/hdb4 0 - 0 0 0 Empty
/dev/hdb5 691+ 848 158- 1269103+ 82 Linux swap
start: (c,h,s) expected (691,1,1) found (1023,15,63)
end: (c,h,s) expected (848,254,63) found (1023,15,63)
/dev/hdb6 1714+ 2988 1275- 10241406 b W95 FAT32
start: (c,h,s) expected (1023,254,63) found (1023,1,1)
end: (c,h,s) expected (1023,254,63) found (1023,15,63)
/dev/hdb7 4294+ 4865- 572- 4590904+ 83 Linux
start: (c,h,s) expected (1023,254,63) found (1023,7,1)
end: (c,h,s) expected (1023,254,63) found (1023,15,63)
/dev/hdb8 2989 3005- 17- 131072
/dev/hdb9 3005+ 3133- 129- 1032368
/dev/hdb10 3133+ 3166- 33- 262144
/dev/hdb11 3166+ 3199- 33- 262144
/dev/hdb12 3199+ 4293 1095- 8794684+
Warning: given size (9181809) exceeds max allowable size (0)

sfdisk: bad input
[root@njh root]#

Making Fedora Core 2 and Windows play well together

Posted Jul 2, 2004 11:24 UTC (Fri) by Nemesis (guest, #22765) [Link]

I got the same error :-/

Here it is:
[root@localhost ant]# /sbin/sfdisk -d /dev/hda | /sbin/sfdisk --no-reread -H255 /dev/hda
Warning: HDIO_GETGEO says that there are 16 heads

Disk /dev/hda: 158816 cylinders, 255 heads, 63 sectors/track
Old situation:
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End #cyls #blocks Id System
/dev/hda1 * 0+ 3823 3824- 30716248+ 7 HPFS/NTFS
end: (c,h,s) expected (1023,254,63) found (1023,15,63)
/dev/hda2 3824 260- 263786- 2118855944 f Win95 Ext'd (LBA)
start: (c,h,s) expected (1023,254,63) found (1023,0,1)
end: (c,h,s) expected (260,3,63) found (1023,15,63)
/dev/hda3 8318 9963 1646 13221495 83 Linux
start: (c,h,s) expected (1023,254,63) found (1023,2,1)
end: (c,h,s) expected (1023,254,63) found (1023,15,63)
/dev/hda4 0 - 0 0 0 Empty
/dev/hda5 3824+ 3855 32- 257008+ 82 Linux swap
start: (c,h,s) expected (1023,254,63) found (1023,15,63)
end: (c,h,s) expected (1023,254,63) found (1023,15,63)
/dev/hda6 3856+ 8317 4462- 35840983+ 83 Linux
start: (c,h,s) expected (1023,254,63) found (1023,15,63)
end: (c,h,s) expected (1023,254,63) found (1023,15,63)
Warning: given size (4237711888) exceeds max allowable size (2489946480)

sfdisk: bad input

Making Fedora Core 2 and Windows play well together

Posted Jul 17, 2004 10:57 UTC (Sat) by thenads (guest, #23106) [Link]

yeah i had the same error...

Tried using the --force command which seemed to do the trick, but threw up some other errors later on. Rebooted and windows ran ok, but trying to create a partition in the blank space on the drive under XP's disk manager brought up an error.

Would fixmbr solve this, and if not, anyone know what would be the best option?

Making Fedora Core 2 and Windows play well together

Posted Jul 23, 2004 17:08 UTC (Fri) by tolandmike (guest, #23382) [Link]

I get the same problem; have you found a fix for it yet?

-jk

Making Fedora Core 2 and Windows play well together

Posted Jul 13, 2004 12:28 UTC (Tue) by aks1232001 (guest, #23025) [Link]

well the simplest way to recover windows is to put a windows install cd.. boot from the cd...then run fixmbr at the promt from the cd in dos mode....thats it!!!!!!!!!

Making Fedora Core 2 and Windows play well together

Posted Jul 31, 2004 7:36 UTC (Sat) by ziffull (guest, #23602) [Link]

The root cause of this problem is it got by testing and thats not cool in my book. Linux sucks, and i will never use it again due to this horrendouse nightmare. I see nobody taking responsability for this screw up and that to me is the sign of a sinking screwed up product. I am also offended at the amount of time it took to get the solution out, the lack of ownership and the blatent pass the buck attitude of your developers who screwed this up in the first place. "Your not responsible for losing data" LOL (I Know - the hard drive just did it all by itself you freaking morons.) Did we just assume the changes made in the kernel would just boot like normal for dual boot without testing it. You know what they say when you ASSUME. This was unacceptable in my book and you can kiss my long time linux user ass goodbye.

Making Fedora Core 2 and Windows play well together

Posted Oct 23, 2004 1:51 UTC (Sat) by Bender (guest, #25588) [Link]

Meh. Poor little wanker's crying because he didn't know what he was doing
and screwed up his install? Cry me a river, buddy. The problem's yours.
You own it. Don't go blaming the developers. You should've read up on
the risks before installing, so you knew what you were getting into. You
didn't, now you're off sucking your thumb. Get a grip.

Clearly, this is a case of PEBCAK. You're beneath my contempt.

Dual booting WinXP and Fedora Core 2 with no problems for the past three
months. Dual-booting various versions of Windows with various Linux
distros for 5 years, again with no problems.

Making Fedora Core 2 and Windows play well together

Posted Jan 1, 2005 21:50 UTC (Sat) by papertape (guest, #26969) [Link]

I think ziffull's ire is understandable.

My first reaction was "How could Suse have been so stupid as to let this out?" Then, "How could the Linux people have been so stupid?" and "How could the GNU people...?" Now I'm wondering how this got by so many people. Didn't anyone, anywhere, blow the whistle?

After 43 years of fooling with computers and the software they run, I have plenty of sympathy for the people who commit their lives to getting them to work, but I have yet to see an exception to the rule "You get what you pay for."

I paid only $90 for Suse 9.1. One good thing is that it came with two hefty paperback manuals in a convenient box just the right size for a doorstop. Do you Redhat and Mandrake buyers get the same utility?

My message to the Linux vendors is "Welcome to the commercial world. Read the title of this topic, and if you claim your Linux plays well with Windows, you damn well better make sure it does, before charging me money for your product."

Making Fedora Core 2 and Windows play well together

Posted Aug 1, 2004 20:38 UTC (Sun) by bashworth (guest, #23649) [Link]

I too had this issue just happen to me.

Specs of system for install:

1 120gig Hard Drive (Windows XP dedicated)
1 13gig Hard Drive (For Linux. Mandrake 10 previously installed here)

Did the Fedora Core 2 install, and no Windows XP. (insert beads of sweat on forehead here. I have a lot of info on Windows XP, and did NOT want to do a reinstall.)

I found this page and tried the steps given, but sfdisk gives me "command not recognized" (beads of sweat grow to drops)

Due to information in this article, I tested out changing my disk read mode in BIOS from Auto to LBA.

I now have Windows XP again. (sweat no longer an issue)

Making Fedora Core 2 and Windows play well together

Posted Aug 11, 2004 17:35 UTC (Wed) by jspeece (guest, #23945) [Link]

You guys ROCK! The info totally saved my bacon! Nice Job!

Making Fedora Core 2 and Windows play well together

Posted Aug 14, 2004 18:47 UTC (Sat) by waryTechuser (guest, #24008) [Link]

Does this bug apply only to installations where Win XP is involved? I have a 700 MHz Dell with Win ME on the original 20 GB hard drive (It is the only drive on my system), and I was seriously considering installing Fedora Core 2 so that I would have a dual-boot system, but I am not sure if that is a wise idea now. I am newbie to Linux and this fix looks like it might be little over my head, and according to some threads at other sites may not even work.

Making Fedora Core 2 and Windows play well together

Posted Aug 15, 2004 15:04 UTC (Sun) by waryTechuser (guest, #24008) [Link]

Let me rephrase that. Does this seem to be a problem on older pre-XP era computers or computers with only pre-XP OSs? I already saw Warpedmania's post but noticed that it didn't affect the Win 98 partition.

sfdisk patched

Posted Aug 24, 2004 12:25 UTC (Tue) by dwheeler (subscriber, #1216) [Link]

Clearly, the main problem here (installing GNU/Linux keeps Windows from booting) needs to be fixed. But this article brought a related problem to my attention: sfdisk's output can't always be used as input to sfdisk, even though it's supposed to. That's because sfdisk warnings are sometimes sent to stdout, instead of stderr as intended.

I just created a patch to sfdisk to fix this problem, so that you won't have to use a text editor just to send sfdisk output to sfdisk again, and sent it to Andries Brouwer (chief maintainer of util-linux, which contains sfdisk). Andries Brouwer has already accepted the patch in the mainline of util-linux (by the way, kudos to he and others for working on such critical yet unsung utilities). You can get the sfisk patch as an attachment in the Fedora Core Core 2 bug 115980 discussion.

This patch doesn't solve the immediate problem of a messed-up partition due to an install. And until the newest util-linux gets distributed widely, the patch won't solve the problem of interleaved warnings for current sfdisk users. But the patch DOES mean that, if a similar solution is ever be needed in the future, it'll be much easier to apply.

Making Fedora Core 2 and Windows play well together

Posted Sep 4, 2004 18:10 UTC (Sat) by Tzalidar (guest, #24519) [Link]

THANKS!!!

This guide was really helpful. I got this issue on a debian install (debian sarge, netinstall RC1). And now it works!!!

-- May trogdor be with you

Making Fedora Core 2 and Windows play well together

Posted Sep 22, 2004 6:44 UTC (Wed) by harrylime (guest, #24891) [Link]

Help, I've added a new hard drive (160g hitatchi) for fedora 2
sfdisk -d /dev/hda brings up;

# partition table of /dev/hda
unit: sectors

/dev/hda1 : start= 63, size=120101877, Id= c, bootable
/dev/hda2 : start= 0, size= 0, Id= 0
/dev/hda3 : start= 0, size= 0, Id= 0
/dev/hda4 : start= 0, size= 0, Id= 0

whilst sfdisk -d /dev/hdb brings up;

# partition table of /dev/hdb
unit: sectors

/dev/hdb1 : start= 63, size=268430022, Id=42
/dev/hdb2 : start=268430085, size= 208845, Id=83, bootable
/dev/hdb3 : start=268638930, size= 3132675, Id=82
/dev/hdb4 : start=271771605, size= 49897890, Id= f
/dev/hdb5 : start=271771668, size= 49897827, Id=83

grub.conf is;

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd1,1)
# kernel /vmlinuz-version ro root=/dev/hdb5
# initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd1,1)/grub/splash.xpm.gz
title Fedora Core (2.6.5-1.358)
root (hd1,1)
kernel /vmlinuz-2.6.5-1.358 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.5-1.358.img
title Other
rootnoverify (hd0,0)
chainloader +1

I've tried adding "makeactive" and "rootnoverify (hd0,1)" which dont work!

can I adjust the sfdisk command etc, can anyone help!!!!!

Making Fedora Core 2 and Windows play well together

Posted Nov 7, 2004 4:57 UTC (Sun) by maxo (guest, #12091) [Link]

I tried sfdisk -d /dev/hda but it tells me that there aren't any partitions. Even stranger, fdisk -l /dev/hda does list my partitions. So I'm, er, very confused. Any help appreciated.

Making Fedora Core 2 and Windows play well together

Posted Nov 7, 2004 5:03 UTC (Sun) by maxo (guest, #12091) [Link]

OK well I found you don't even need to follow the above. Just go into your BIOS and in your hard disk settings (in Phoenix BIOS, it's the first selected option when you go into BIOS, then select your hard drive), then you just change one of the settings from 'Auto' to 'LBA'. And then Windows will boot.

Making Fedora Core 2 and Windows play well together

Posted Nov 13, 2004 20:13 UTC (Sat) by itismike (guest, #26017) [Link]

Excellent. I am glad that there is an easy fix for many, but some (newer)motherboards do not have the LBA option.

The sfdisk trick worked for me...Windows is up and running. However, it broke my Fedora core3 installation. I can boot to root (full graphical mode) but 'df' shows that my LVM2 volume is completly full. Perhaps I set the partition table values wrong...

Wish me luck!,

Mike

Linux LVM 100% full?

Posted Nov 21, 2004 11:23 UTC (Sun) by itismike (guest, #26017) [Link]

I'm still stuck with a barely operating install. Can anyone give me a hint where I can start looking? I've been seaching forums and google for two weeks now, and am empty-handed. Perhaps this isn't the right place to ask this, but there seem to be people here that have tried the same fix...has noone else had this 100% full / partition after the fix?

I don't even understand what these numbers mean, but here's some data:
sfdisk gives the following:

[root@localhost ~]# sfdisk -d /dev/hdb
# partition table of /dev/hdb
unit: sectors

/dev/hdb1 : start= 63, size= 205002, Id=83, bootable
/dev/hdb2 : start= 205065, size= 12389895, Id=8e
/dev/hdb3 : start= 0, size= 0, Id= 0
/dev/hdb4 : start= 0, size= 0, Id= 0
[root@localhost ~]#

-----

here's my df results:
[root@localhost ~]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
4031680 3968824 0 100% /
/dev/hdb1 99250 12189 81936 13% /boot
none 768584 0 768584 0% /dev/shm
/dev/hda6 713448 704104 9344 99% /media/hda6
/dev/hda7 38337728 13344864 24992864 35% /media/hda7
/dev/hdc 716308 716308 0 100% /media/cdrecorder
[root@localhost ~]# sfdisk -d /dev/hdb
# partition table of /dev/hdb
unit: sectors

/dev/hdb1 : start= 63, size= 205002, Id=83, bootable
/dev/hdb2 : start= 205065, size= 12389895, Id=8e
/dev/hdb3 : start= 0, size= 0, Id= 0
/dev/hdb4 : start= 0, size= 0, Id= 0
[root@localhost ~]#

-----

and here's fdisk:

Disk /dev/hdb: 6448 MB, 6448619520 bytes
15 heads, 63 sectors/track, 13328 cylinders
Units = cylinders of 945 * 512 = 483840 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 217 102501 83 Linux
/dev/hdb2 218 13328 6194947+ 8e Linux LVM
[root@localhost ~]#

Thanks for ANY insight!!!

Mike

why is it so quiet in here?

Posted Dec 17, 2004 18:19 UTC (Fri) by itismike (guest, #26017) [Link]

Wow. I forgot that I posted this. Just in case anyone was concerned, the solution was to find a bigger disk...it was just a coincidence that after I resolved the boot problem as stated above, the disk just happened to become critically full. It's now developed S.M.A.R.T. errors, so I won't have the chance to prove this, but I'm pretty sure this was all a silly mistake.

Mike

Making Fedora Core 2 and Windows play well together

Posted Mar 8, 2005 10:18 UTC (Tue) by Unscrewed1 (guest, #28316) [Link]

I've recently installed Fedora Core 2 on my Xp machine and Xp boots fine, loads up a little slow but thats ok. But when I try to boot fedora it freezes on a blank screen with the curson in the top left corner. I got the fedora cd's free from pogolinux.com. I've tried almost everything if someone could help me it would be greatly apprieciated. (I know i'm a horrible speller)

Thanks

Making Fedora Core 2 and Windows play well together

Posted May 31, 2005 5:38 UTC (Tue) by oflahero (guest, #30237) [Link]

I'll just add my voice too and thank the authors for getting me out of a hole.

My experience with this bug involved trying to get Fedora Core 3 as a dual boot onto a Dell Latitude D400 laptop already with Win XP and Fedora Core 2 on it (which were previously working fine together.)

Chose the upgrade option from the Core 3 installer (to overwrite Core 2), it did the biz and then, on reboot, gave me that b@stard 'Grub Loading stage2..' error.

I found that the 'Recovery' section of the article didn't work for me, but reinstalling Core 3 as a fresh install over Core 2 using the 'linux hda=cccc,hh,ss' boot option worked a dream - I really wasn't expecting it to.

So cheers again on an excellent article.

Making Fedora Core 2 and Windows play well together

Posted Jun 7, 2005 8:32 UTC (Tue) by valentin_nils (guest, #28155) [Link]

Not sure if anybody is interested, but I found that Debian and Red Hat
will report the hard disc geometry different than Mandrake, Suse and
Novell.

http://www.be-known-online.com/modules/newbb/viewtopic.ph...


I would appreciate any feedback by e-mail.

Best regards

Nils Valentin
Tokyo /Japan
valentin_nils(at).be-known-online.com

Making Fedora Core 2 and Windows play well together

Posted Jul 17, 2005 11:53 UTC (Sun) by darksyd (guest, #31033) [Link]

I got this error when I gave the command-

[root@localhost ~]# sfdisk -d /dev/hda | sfdisk --no-reread -H255 /dev/hda
Warning: extended partition does not start at a cylinder boundary.
DOS and Linux will interpret the contents differently.
Warning: HDIO_GETGEO says that there are 16 heads
start: (c,h,s) expected (1023,254,63) found (1023,0,1)
start: (c,h,s) expected (1023,254,63) found (1023,0,1)
start: (c,h,s) expected (1023,254,63) found (1023,0,1)
*** buffer overflow detected ***: sfdisk terminated
======= Backtrace: =========
/lib/libc.so.6(__chk_fail+0x41)[0x9cc565]
sfdisk[0x804c563]
sfdisk[0x804d805]
sfdisk[0x804eaba]
/lib/libc.so.6(__libc_start_main+0xc6)[0x902de6]
sfdisk[0x8048dc1]
======= Memory map: ========
0065d000-00666000 r-xp 00000000 16:41 785666 /lib/libgcc_s-4.0.0-20050520.so.1
00666000-00667000 rwxp 00009000 16:41 785666 /lib/libgcc_s-4.0.0-20050520.so.1
007fe000-00818000 r-xp 00000000 16:41 785682 /lib/ld-2.3.5.so
00818000-00819000 r-xp 00019000 16:41 785682 /lib/ld-2.3.5.so
00819000-0081a000 rwxp 0001a000 16:41 785682 /lib/ld-2.3.5.so
008ee000-00a12000 r-xp 00000000 16:41 785691 /lib/libc-2.3.5.so
00a12000-00a14000 r-xp 00124000 16:41 785691 /lib/libc-2.3.5.so
00a14000-00a16000 rwxp 00126000 16:41 785691 /lib/libc-2.3.5.so
00a16000-00a18000 rwxp 00a16000 00:00 0
00eb2000-00eb3000 r-xp 00eb2000 00:00 0
08048000-08053000 r-xp 00000000 16:41 1540532 /sbin/sfdisk
08053000-08054000 rw-p 0000b000 16:41 1540532 /sbin/sfdisk
08054000-0805e000 rw-p 08054000 00:00 0
08b95000-08bb6000 rw-p 08b95000 00:00 0 [heap]
b7d23000-b7d29000 r--s 00000000 16:41 1571549 /usr/lib/gconv/gconv-modules.cache
b7d29000-b7d2a000 rw-p b7d29000 00:00 0
b7d2a000-b7f2a000 r--p 00000000 16:41 1508978 /usr/lib/locale/locale-archive
b7f2a000-b7f2c000 rw-p b7f2a000 00:00 0
bf82f000-bf845000 rw-p bf82f000 00:00 0 [stack]
Aborted

I have a PIII 800 MHz, 128 MB SDRAM (yeah, its old! i'll change it very soon). WinXP Pro is installed on hda and Fedora Core 4 on hdd.

Making Fedora Core 2 and Windows play well together

Posted Jul 18, 2005 22:08 UTC (Mon) by mbraincell (guest, #31062) [Link]

I too got the same kind of errors and sfdisk aborted. I just installed Fedora core 4 and have Windows XP home edition. Mine is a laptop with intel celeron processor. I thought the problem was only with Fedora core 2, and I was just one unlucky one to get it on Core 4, but now I see I am not alone

Making Fedora Core 2 and Windows play well together

Posted Sep 22, 2005 14:58 UTC (Thu) by savoyboy (guest, #32620) [Link]

I just installed FC4 on an Intel Pentium 4 also running Windows 2003 Server SP1 and I ran into the same error with sfdisk. This is a known bug with sfdisk and is addressed at this link:

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=159418

The bug report gives a patch for the sfdisk source and a reference to the update available for sfdisk. I fixed the sfdisk overflow error by running "yum update util-linux.i386".

Making Fedora Core 2 and Windows play well together

Posted Sep 25, 2005 23:42 UTC (Sun) by jesC29 (guest, #32671) [Link]

I got bit by this when I had to reinstall windoze on a machine that had a previously working dual-boot XP and FC2 setup. The XP reinstall overwrote GRUB and then I booted to the FC2 rescue disk and ran 'grub-install hda' only to end up in the same situation as so many other posters here.

I tried the modified sfdisk command and a few other things listed on the bug thread on Bugzilla but wasn't able to get anything to fly. So, I ran fixmbr and fixboot from Windoze Recovery and was able to boot to XP again.

It seems the work around given here is great when you are trying to do an install, but I can't find any information about how to specify the geometry when just running grub-install. In fact, why was the geometry altered just by running grub-install?

Anyhow, I was thinking about attempting to upgrade my FC2 install to FC4 and hoping that would resolve the issue but now I see that some people are having the same problem with later versions of Fedora as well. I have valuable data on both of the installed OS's and I would prefer to be able to still use both.

Can anyone offer me advice on how best to proceed in order to rescue my dual-boot capabilities without having to back up all my data and re-install things yet again...?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值