You are not logged in.
Hi everyone,
I decided to reintall Windows on my drive today as I recently upgraded my motherboard and my old windows install would no longer boot. Everything on the Windows side went well. I proceeded to reinstall Grub so I could get back to Linux. This is where my problems began. It seems windows reordered the partition table somehow. I.E. what was /dev/sda3 now became /dev/sda2. I can see why it did it as there was gaps in my numbering from previously deleted partitions and what not. I.E I had /dev/sda1. /dev/sda3, etc, so there was some gaps here and there. I guess windows decided to crunch everything down so they go in sequence /dev/sda1. /dev/sda2. /dev/sda3 and so on up until /dev/sda6. I have some unallocated space in there as well. This is all fine and dandy and I reconfigured Grub and fstab to mount everything properly and my Arch install seems ok and all my data is in tact but I have some other issues now it seems.
1. I cannot boot into my new windows installation. Windows is located on /dev/sda1 and is NTFS. And here is my grub entry for windows:
# (1) Windows
title Winblows XP
rootnoverify (hd0,0)
makeactive
chainloader +1
When I select this option it tries to do this but it just sits there and does nothing until I ctrl-alt-del. I don't use Windows much but installed it so I could play some of my games so I would like it to work.
2. My partition table seems to be corrupt or gone. When I fire up gparted it shows the whole drive as "unallocated space". This doesn't seem good. :-( It was working fine right before my windows install as I checked gparted to figure out what partitions were where so I could restore grub. I even tried parted and it won't show me much. When I issue it a "print" command it returns the following:
Error: Can't have overlapping partitions.
And finally when I issue an fdisk -l I get the following:
omitting empty partition (5)
Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x4a80f0b1
Device Boot Start End Blocks Id System
/dev/sda1 * 1 2550 20481851 7 HPFS/NTFS
/dev/sda2 2551 2562 96390 83 Linux
/dev/sda3 2563 38913 291989407+ f W95 Ext'd (LBA)
/dev/sda4 7905 38913 249079761 83 Linux
/dev/sda5 3200 5112 15366141 83 Linux
/dev/sda6 7663 7904 1943833+ 82 Linux swap / Solaris
I don't see anything overlapping but I do notice the partitions are out of order. /dev/sda4 should be at the bottom but not sure if that matters or not.
I am thinking more than likely issue 1 and 2 are related but I am not sure. Any help would be greatly appreciated. I guess worst case scenario I could back up my complete drive and then redo the partitions from scratch and then copy everything back over but that seems like a lot of work and I am hoping for a simpler solution.
Kevin
Last edited by ould (2007-10-26 13:06:40)
Offline
please post the output of cfdisk /dev/sda , that will tell us the partition types you have.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
please post the output of cfdisk /dev/sda , that will tell us the partition types you have.
Here you go:
cfdisk (util-linux-ng 2.13)
Disk Drive: /dev/sda
Size: 320072933376 bytes, 320.0 GB
Heads: 255 Sectors per Track: 63 Cylinders: 38913
Name Flags Part Type FS Type [Label] Size (MB)
------------------------------------------------------------------------------
Unusable 1.05*
sda1 Boot Primary NTFS [^B] 20973.42*
sda2 Primary Linux ext3 98.71
Logical Free Space 5239.51
sda5 Logical Linux ext3 15734.97
Logical Free Space 20974.47
sda6 Logical Linux swap / Solaris 1990.52
Logical Free Space 0.04*
sda4 Primary Linux ext3 255057.68*
If I print the partition table here is what I get(it looks messed up):
Partition Table for /dev/sda
---Starting--- ----Ending---- Start Number of
# Flags Head Sect Cyl ID Head Sect Cyl Sector Sectors
-- ----- ---- ---- ---- ---- ---- ---- ---- ----------- -----------
1 0x80 32 33 0 0x07 254 63 1023 2048 40963702
2 0x00 254 63 1023 0x83 254 63 1023 40965750 192780
3 0x00 254 63 1023 0x0F 254 63 1023 41158530 583978815
4 0x00 254 63 1023 0x83 254 63 1023 126977823 498159522
5 0x00 254 63 1023 0x83 254 63 1023 63 30732282
6 0x00 254 63 1023 0x82 254 63 1023 63 3887667
Thanks for the help!
Kevin
Offline
It definitely looks like the windows install messed everything up.
The starting/end CHS values are so weird it' s unlikely you can correct the partition table.
There's 1 thing worth checking however : Go into the bios and make sure the drive is set to use LBA.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
It definitely looks like the windows install messed everything up.
The starting/end CHS values are so weird it' s unlikely you can correct the partition table.
There's 1 thing worth checking however : Go into the bios and make sure the drive is set to use LBA.
Everything seems good in the BIOS. Looks like my only course of action is to backup to another drive and reformat this one. Luckily I have a empty 500 gig waiting to be installed in another machine. I need to basically back up 3 partitions all ext3, /boot, /home and /. What is the best way to go about backing this up. I have used mondo rescue in the past. Any other reliable or better options out there? Any suggestions appreciated.
Thanks,
Kevin
Offline
I had similar problems with a second hard disk a while ago, gparted showed the disk as blank. After a bit of googling I tried out a program called testdisk. Saved my life
If I remember right, basically it scans cylinder after cylinder for possible partitons, displays the results of the search, and asks if you want to write that info to the partition table. You can try it out and see if testdisk displays your partitions correctly.
Offline
I had similar problems with a second hard disk a while ago, gparted showed the disk as blank. After a bit of googling I tried out a program called testdisk. Saved my life
If I remember right, basically it scans cylinder after cylinder for possible partitons, displays the results of the search, and asks if you want to write that info to the partition table. You can try it out and see if testdisk displays your partitions correctly.
Thanks for the reply. Funny you should mention this as I did try this program and while it repaired the partition table more or less it reverted to an older partition table but luckily I had backed up all my pertitnent data first. Most of my data seemed to be still there after I ran testdisk but I was worried some of it may be corrupt so I repartitioned and reverted to my backed up data on fresh partitions. I am still unable to boot into windows for some reason though, grub just freezes when it tries to boot into the windows partition. But atleast my partition table is in tact now.
Kevin
Offline
Looking through my tech notes I found this (can't remember where I found it though):
After the complete installation of Fedora, when you try to boot with windowz xp you'll ended up with the following message:
Rootnoverify(hd0,0)
Chainloader +1
well, it seems nothing wrong with it, if you get that message, generated by the GRUB boot loader.
at this point never experiment or be panic, all your data and the xp partition is safely there. running any third party tool to rectify this matter might cost you the data you've in your windowz partition.
in brief the Linux keeps partition table in LBA though the windowz uses CHS. and during the installation Fedora alters the CHS.
so simply run the following command
sfdisk -d /dev/hda | sfdisk --no-reread -H255 /dev/hda --force
in simple termas the first fsdisk appearence pipes out the partition table data and the second sfdisk, takes it as an input value to write the head count as 255 to the drive geometry.
Offline
Looking through my tech notes I found this (can't remember where I found it though):
so simply run the following command
sfdisk -d /dev/hda | sfdisk --no-reread -H255 /dev/hda --force
in simple termas the first fsdisk appearence pipes out the partition table data and the second sfdisk, takes it as an input value to write the head count as 255 to the drive geometry.
I came across the same info as well. I tried that to no avail. Windows still refuses to boot unfortunately. All I want windows for is games so it isn't life threatening that I get it working but it is annoying the hell out of me that I can't get it to work. lol.
Kevin
Offline
In case anyone is still following this thread. I solved my windows booting problem. It turned out it was caused by the BIOS. As a last resort I checked for BIOS updates for my mobo and found that there was a few newer ones than what I had. I upgraded it to the latest and cleared the CMOS. Then I proceeded to set it back up and then went ahead and reinstalled windows followed by restoring my backed up linux partitions and everything worked first try. Go figure.
Kevin
Offline