|
|
我的系统一开始只有xp,在c盘,划了空间刚开始装RH9,后来装fc6的时候选择fdisk自动分区格掉了rh9,一开始xp和fc6能共存,后来有一天xp开着的时候,突然自动重启(我没注意到他是怎么重启的-正常关机还是突然崩溃),然后到现在每次开机都是
Booting "windows XP"
root noverify(hd0,0)
chainloader +1
Error 13: Invalid or unsupported executable format
Press any key to continue ....
按任意键能回到grub的图形界面,但是xp仍然会这样重复,这样windows就没办法进入,而fc6可以顺利进入。
fdisk命令如下
[root@localhost ~]# fdisk -l
Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 765 6144831 b W95 FAT32
/dev/hda2 766 9729 72003330 f W95 Ext'd (LBA)
/dev/hda5 766 3273 20145478+ b W95 FAT32
/dev/hda6 7191 9729 20394486 b W95 FAT32
/dev/hda7 3274 3286 104391 83 Linux
/dev/hda8 3287 7190 31358848+ 8e Linux LVM
Partition table entries are not in disk order
Disk /dev/hdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 * 1 4905 39399381 7 HPFS/NTFS
/dev/hdb2 4906 9729 38748780 f W95 Ext'd (LBA)
/dev/hdb5 4906 9729 38748748+ b W95 FAT32
[root@localhost ~]#
XP是直接安装在c盘没变过,第二个硬盘没装系统,fc6是在xp下用pqmagic划出空间后一路几乎默认安装过来的。
$ uname -a
Linux localhost.localdomain 2.6.18-1.2798.fc6 #1 SMP Mon Oct 16 14:54:20 EDT 2006 i686 i686 i386 GNU/Linux
grub.conf的配置如下:
# 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 (hd0,6)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/hda
default=1
timeout=10
splashimage=(hd0,6)/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.18-1.2798.fc6)
root (hd0,6)
kernel /vmlinuz-2.6.18-1.2798.fc6 ro root=/dev/VolGroup00/LogVol00 rhgb
quiet
initrd /initrd-2.6.18-1.2798.fc6.img
title Windows XP
rootnoverify (hd0,0)
chainloader +1
用google和baidu找到的方法试过
1)dos下用fdisk /mbr然后重装grub,无效
2)直接用xp安装盘重装xp,setup...出来查找硬件的时候,就停止黑屏然后没有反应,无法继续安装xp
3)修改grub.conf,添加makeactive在rootnoverify(hd0,0)之后,无效
继续上网搜索方法:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=115980
上有很多人给出各种各样的方法,其中建议BIOS设置为LBA mode而非CHS或auto,但是我没找到BIOS里有这个选项,我的主板是Gigabyte GA-6XV7-4XX,2000年配的机子。
http://www.pkblogs.com/sanlinux/2005_01_01_sanlinux_archive.html
这个blog说从rh升级到fc会有这样的问题,他们用重装windows解决了,但是我没办法重装windows(xp光盘放入之后开始到探测硬件一会就没有反应了),他们是升级的问题,而我当时在选择安装fc的时候是选择删除所有的linux分区的(不是手动用fdisk分区)。
http://lwn.net/Articles/86835/
上说是因为windows要读一下chs的问题,修改一下磁头数H就行了,给了一个命令
sfdisk -d /dev/hda |sfdisk --no-reread -H255 /dev/hda
但是我在fc6下用root帐号试的结果如下
[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.
Disk /dev/hda: 155061 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+ 764 765- 6144831 b W95 FAT32
/dev/hda2 765 9728 8964 72003330 f W95 Ext'd (LBA)
/dev/hda3 0 - 0 0 0 Empty
/dev/hda4 0 - 0 0 0 Empty
/dev/hda5 765+ 3272 2508- 20145478+ b W95 FAT32
/dev/hda6 7190+ 9728 2539- 20394486 b W95 FAT32
/dev/hda7 3273+ 3285 13- 104391 83 Linux
/dev/hda8 3286+ 7189 3904- 31358848+ 8e Linux LVM
New situation:
Units = sectors of 512 bytes, counting from 0
Device Boot Start End #sectors Id System
/dev/hda1 * 63 12289724 12289662 b W95 FAT32
/dev/hda2 12289725 156296384 144006660 f W95 Ext'd (LBA)
/dev/hda3 0 - 0 0 Empty
/dev/hda4 0 - 0 0 Empty
/dev/hda5 12289788 52580744 40290957 b W95 FAT32
/dev/hda6 115507413 156296384 40788972 b W95 FAT32
/dev/hda7 52580808 52789589 208782 83 Linux
/dev/hda8 52789653 115507349 62717697 8e Linux LVM
Warning: partition 6 does not start at a cylinder boundary
sfdisk: I don't like these partitions - nothing changed.
(If you really want this, use the --force option.)
我对比了一下上面的列表数字相差太大,又有警告,没敢--force试,怕万一不成windows下的数据全部丢失了。而且在https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=115980
里一开始说可以写成H240的形式,然后说in other cases probably 255 is better.
所以我糊涂了。
请大虾指点一下,thx! |
|