1 (edited by Oblivion590 2009-04-26 21:36:16)

Topic: [SOLVED] Resized Vista partition, now can't boot Vista

I was using the GParted live disc on a USB flash drive to shift some space from my Debian partition to Vista, but this has resulted in being unable to boot either my Vista partition or the recovery partition at the start of my hard drive.  I have looked at the problem seen several times on these forums about having an incorrect "hidden sector" value at 0x1C - 0x1F in the MBR, but fixing it was to no avail.  Further, my Vista recovery disc claims that Vista should be able to boot fine, after having fixed some problems.

My Debian installation is completely capable of mounting the Vista NTFS partition and reading the files, but GRUB claims "Filesystem type unknown" when attempting to mount my Vista partition.  Attempting to work around that with rootnoverify simply returns Error 17: "Cannot mount selected partition."  Additionally, the Vista recovery CD is capable of finding Windows Vista, but BootRec.exe /ScanOS cannot find any Vista installations.

Is there any reason why these programs would be unable to read the Vista partition, when I can mount it just fine after booting to Linux?

I have also been attempting to get assistance with this problem at the NeoSmart.net forums.


EDIT: Attempts to use the "TestDisk" utility to repair the partition table to see if that would help were unsuccessful...except that now GParted is detecting my hard drive geometry wrong!  It is trying to use 255 heads, instead of 240, and through rounding, it now believes that my last partition exceeds the bounds of the disc, and claims the entire hard disk is unpartitioned.  Booting problems remain the same.

2

Re: [SOLVED] Resized Vista partition, now can't boot Vista

Hello Oblivion590,

seems to be a serious problem, I read the thread at neosmart.net. I saw the coarse structure of your HDD, but we need all details: fdisk -l -u,  all Records (MBR, PBR ,XBR) and the CHS value, that  is on the label of your HDD and the values, that BIOS detects or reads out.

You find some helpful threads here, which show, how you get these data. If there are problems to acquire the necessary files and values,  tell it here. -

IMHO, the big mistake was to move the recovery partition as well as the Vista partiton to the left by reason of ONE MegaByte. With big drives (LBA) "Gparted" always uses 63 sectors / 255 heads and if you do NOT uncheck "align to cylinder boundary" moves the partitions respectively a second time (your drive geometry had 240 heads). In worst case, this means a loss of 63 x 255 x 512 - 1 = 8,225,279 Bytes (= 7.84 MiB) !  Except for some BIOS Interruptroutines in a very early stage of boot process, no one needs CHS values today any more. BTW, does the BIOS recognize your harddisk still as such ? If you move the first primary partition too far to the beginning (less than one track, 63 sectors) , it might even get recognized as legacy ZIP drive, which uses fourth primary partition or whatever is at this location for booting . With your corrected "Hidden Sector" value, did you use the Intel-Little-Endian format (firts LSB/ then MSB) ?

Regards
cmdr

3 (edited by Canislupus01 2009-04-26 10:50:54)

Re: [SOLVED] Resized Vista partition, now can't boot Vista

I just dealt with a similar issue.  I boot linux on a second SATA drive.  My windows xp/ win7 installation is on a 1tb SATA. I made a change to the partition table, and I could no longer see the extended partitions.  They appeared to be deleted.  Look for a program called "testdisk".  It is free, It may even be in your repositories, and it has the ability to search for your lost partitions which are still on the disk.

edit: Oops! That was supposed to post earlier tonight.  Hit the button when closing window,by mistake. big_smile

4 (edited by Oblivion590 2009-04-26 21:36:01)

Re: [SOLVED] Resized Vista partition, now can't boot Vista

cmdr wrote:

Hello Oblivion590,

seems to be a serious problem, I read the thread at neosmart.net. I saw the coarse structure of your HDD, but we need all details: fdisk -l -u,  all Records (MBR, PBR ,XBR) and the CHS value, that  is on the label of your HDD and the values, that BIOS detects or reads out.

You find some helpful threads here, which show, how you get these data. If there are problems to acquire the necessary files and values,  tell it here. -

IMHO, the big mistake was to move the recovery partition as well as the Vista partiton to the left by reason of ONE MegaByte. With big drives (LBA) "Gparted" always uses 63 sectors / 255 heads and if you do NOT uncheck "align to cylinder boundary" moves the partitions respectively a second time (your drive geometry had 240 heads). In worst case, this means a loss of 63 x 255 x 512 - 1 = 8,225,279 Bytes (= 7.84 MiB) !  Except for some BIOS Interruptroutines in a very early stage of boot process, no one needs CHS values today any more. BTW, does the BIOS recognize your harddisk still as such ? If you move the first primary partition too far to the beginning (less than one track, 63 sectors) , it might even get recognized as legacy ZIP drive, which uses fourth primary partition or whatever is at this location for booting . With your corrected "Hidden Sector" value, did you use the Intel-Little-Endian format (firts LSB/ then MSB) ?

Regards
cmdr

fdisk -l -u

Disk /dev/sda: 160.0 GB, 160041885696 bytes
240 heads, 63 sectors/track, 20673 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x9455d63a

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1              63    13940639     6970288+  27  Unknown
/dev/sda2   *    13940640   175694399    80876880    7  HPFS/NTFS
/dev/sda3       175694400   175769999       37800   83  Linux
/dev/sda4       175770000   312605999    68418000    f  W95 Ext'd (LBA)
/dev/sda5       175785120   179686079     1950480   82  Linux swap / Solaris
/dev/sda6       179686143   271842479    46078168+  83  Linux
/dev/sda7       271842543   312575759    20366608+   b  W95 FAT32

My BIOS does not appear to have any means of viewing the CHS geometry or blasted anything about the HDD that I can tell--it has a hard disk checking utility, but it appears to be more geared towards seeing if the disk is corrupted, I believe.  I have not yet run this disk checking utility, because it would take a tremendously long time (hours, at least) to do so.  The BIOS on my Lenovo laptop seems rather scant in utility, but it does recognize the hard disk.

The reason I moved the data for only one megabyte, a paltry amount for any purpose, was essentially that I did not like seeing unallocated space on the drive, and I was not previously aware of the differences in Vista's partitioning--I agree that, with the knowledge I have gained since Thursday evening, it was definitely a mistake to shift my recovery and Vista partitions to the left by a megabyte.

When I modified the "hidden sector" value, I did use the Little Endian formatting:
0x3F000000 for partition 1
0xA0B7D400 for partition 2
0x40E2780A is what I calculated for partition 3, but I never tried this


Here is a MediaFire link to the file drvs.dat, as well as the first 100 blocks after each start sector shown above, plus the first 100 blocks of the drive.  Probably a bit overboard, so much that the MBR block file contains the first partition, but I figured I'd rather have too much than too little.

http://www.mediafire.com/?sharekey=4f20 … 49b5870170

Additionally, I have posted this question on the Ubuntu Forums (http://ubuntuforums.org/showthread.php?t=1137710), as per the recommendation in the NeoSmart forums thread.  One of the users asked me to run a partition analyzing BASH script, and its output has also been uploaded to the Mediafire page.

EDIT: The folks at the Ubuntu forums have resolved my issue with loading GParted.  Turns out that my extended partition was trying to extend one cylinder too far, possibly because there are some sectors past cylinder 20673, but not enough for a full extra cylinder.  However, I am still just as unable to boot to Windows Vista or the recovery partition.



FURTHER EDIT: I've gotten Vista working, too, with the help of the Ubuntu forum.

Using TestDisk to rebuild the Boot Sector of the Vista partition and loading with Grub as normal [root (hd0,1), chainloader +1, boot] resulted in a successful boot.

I will put [solved] in the topic title, and thanks for all of the instruction, albeit in other user's threads, on how to fix the hidden sector issue with the GParted live CD and your MC_HxEd!  I suspect that I would have had to fix the hidden sector value after the boot sector fixes if I hadn't done so already.