1

Topic: SOLVED another Current NTFS volume size is bigger than the device size

Hi there,

It struck me, too! Now I get the "ERROR: Current NTFS volume size is bigger than the device size!" error... I shrunk the first partition from 81907mb to 35055mb. then expanded the second to 97gigs. Third partition has 18 and the fourth is my 2gig linux swap partition. Now there is an overlap from the bug.
So:
sda1 : 35055mb
sda2 : 96986mb
sda3 : 18
sda4 :  2

Here is a screenshot of gparted.
http://www.mediafire.com/imageview.php?quickkey=yn2mdi42kdh
Here is the fdisk scan result:

Begin scan...
Possible partition(Windows NT/W2K FS), size(81907mb), offset(0mb)
Possible partition(Windows NT/W2K FS), size(96986mb), offset(35055mb)
Possible partition(Linux ext2), size(8004mb), offset(144581mb)       
Possible partition(Linux swap), size(2337mb), offset(150287mb)       
End scan.                                                            

Checking partitions...

* Warning: Discarded 1 overlapping partition guesses.
Partition(OS/2 HPFS, NTFS, QNX or Advanced UNIX): primary 
Partition(Linux ext2 filesystem): primary                 
Partition(Linux swap or Solaris/x86): primary             
Number of inconsistencies found: 1.                       

Guessed primary partition table:
Primary partition(1)
   type: 007(0x07)(OS/2 HPFS, NTFS, QNX or Advanced UNIX)
   size: 81907mb #s(167747256) s(63-167747318)
   chs:  (0/1/1)-(1023/254/63)d (0/1/1)-(10441/200/54)r

Primary partition(2)
   type: 131(0x83)(Linux ext2 filesystem)
   size: 8004mb #s(16394112) s(296102016-312496127)
   chs:  (1023/254/63)-(1023/254/63)d (18431/127/1)-(19451/250/63)r

Primary partition(3)
   type: 130(0x82)(Linux swap or Solaris/x86)
   size: 2337mb #s(4787368) s(307789335-312576702)
   chs:  (1023/254/63)-(1023/254/63)d (19159/0/1)-(19456/254/61)r

Primary partition(4)
   type: 000(0x00)(unused)
   size: 0mb #s(0) s(0-0)
   chs:  (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r
 

the fdisk guess is totally wrong...

here is my MBR:
http://www.mediafire.com/?gmt2mlnemz0

Can you please,please, please fix mine, too????

Thanks!!

2

Re: SOLVED another Current NTFS volume size is bigger than the device size

Following is the partition table as extracted from your MBR:

Entry  LBA of First    Length in       LBA of Last    Type
       Sector          Sectors         Sector
-----  ------------    -----------     -----------    ----
 1              63      71,794,422      71,794,484    NTFS
 2      71,794,485     198,627,660     270,422,144    NTFS
 3     270,422,145      37,367,190     307,789,334    Linux
 4     307,789,335       4,787,370     312,576,704    Linux-swap

From this information I do not see a problem with the partition table.  Each successive partition begins 1 sector past the end of the previous partition.  This is normal.

Was the above fdisk output from the command "fdisk -l -u"?
If not would you be able to post the results of this command?

Also the output from the following command would be useful.

parted /path-to-your-disk-device unit s print

Where /path-to-your-disk-device is something like /dev/sda or /dev/hda

EDIT:
To investigate the NTFS Partition Boot Records, I will need copies of the NTFS PBRs.

You can capture the NTFS Partition Boot Records in files with the following commands:

NOTE:  Be extra careful to type these commands properly, otherwise loss of data could result.

dd if=/dev/sda of=sda1-yannick.pbr bs=512 count=1 skip=63

and

dd if=/dev/sda of=sda2-yannick.pbr bs=512 count=1 skip=71794485

Then upload these files to a media sharing site, such as mediafire, and post the link to these files in this forum post.

3

Re: SOLVED another Current NTFS volume size is bigger than the device size

Hi,

thank you for the prompt response!

so ...

gedakc wrote:

fdisk -l -u

gave me this:

fdisk -l -u                                          

device /dev/sda: 160.0 GByte, 160041885696 Byte
255 heads, 63 Sectors/tracks, 19457 cylinders, together 312581808 Sectors
Units = Sectors of 1 × 512 = 512 Bytes
Disk identifier: 0x805d7cba

   Device  boot.     Begin        End     Blocks   Id  System
/dev/sda1              63    71794484    35897211    7  HPFS/NTFS
/dev/sda2        71794485   270422144    99313830    7  HPFS/NTFS
/dev/sda3   *   270422145   307789334    18683595   83  Linux
/dev/sda4       307789335   312576704     2393685   82  Linux Swap / Solaris

parted this:


linux-ct5u:/usr/sbin # parted /dev/sda unit s print
Model: ATA ST9160827AS (scsi)
Disk /dev/sda: 312581808s
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start       End         Size        Type     File system     Flags
 1      63s         71794484s   71794422s   primary  ntfs            type=07
 2      71794485s   270422144s  198627660s  primary  ntfs            type=07
 3      270422145s  307789334s  37367190s   primary  ext3            boot, type=83
 4      307789335s  312576704s  4787370s    primary  linux-swap(v1)  type=82

PBR of sda1:
http://www.mediafire.com/?5jzjumnyuf1
PBR of sda2:
http://www.mediafire.com/?nmwryii2ytz
this is my gparted error:

Check and repair file system (ntfs) on /dev/sda1  00:00:00    ( ERROR ) 
      
   calibrate /dev/sda1  00:00:00    ( SUCCESS ) 
      
  path: /dev/sda1
start: 63
end: 71794484
size: 71794422 (34.23 GiB) 
   check file system on /dev/sda1 for errors and (if possible) fix them  00:00:00    ( ERROR ) 
      
  ntfsresize -P -i -f -v /dev/sda1 
      
  ntfsresize v1.13.1 (libntfs 9:0:0)
Device name : /dev/sda1
NTFS volume version: 3.1
Cluster size : 4096 bytes
Current volume size: 85886595584 bytes (85887 MB)
Current device size: 36758744064 bytes (36759 MB)
ERROR: Current NTFS volume size is bigger than the device size!
Corrupt partition table or incorrect device partitioning?

sda2 creates a backwards overlap over sda1, because (in my simple understanding) the new smaller size of sda1 wasn't set..The device size of sda1 is correct, while the volume size wasn' reduced to match the new device size. Current sda1 volume size is obsolete ...

Thank you for your time and support!

4

Re: SOLVED another Current NTFS volume size is bigger than the device size

Since there is a partition directly following sda1, I think it is safer if we decrease the sda1 NTFS PBR to fit within the partition size.  The second sda2 NTFS PBR appears correct with a size of 198,627,648 sectors.

The change I have made to the file is from a length of 167,747,256 sectors:
00000020   00 00 00 00  80 00 80 00  B8 9E FF 09  00 00 00 00
To a new length of 71,794,421 sectors:
00000020   00 00 00 00  80 00 80 00  F5 7E 47 04  00 00 00 00

Note:  The NTFS volume size is always 1 sector less than the total number of sectors in the partition table entry because the NTFS backup sector is not considered part of the NTFS volume.

To apply this change:

1) Download the new NTFS PBR: sda1-yannick_new.pbr

2) Load the new NTFS PBR on your hard disk.
NOTE:  Be extra careful when entering the commands.  Data loss could result otherwise.

dd if=sda1-yannick_new.mbr of=/dev/sda bs=512 count=1 seek=63

3) Reboot the computer

4) Check that the file system is recognized in GParted

5) If all seems fine then I would advise booting into Windows and running "chkdsk /f /r" multiple times, until there are no more faults.

5

Re: SOLVED another Current NTFS volume size is bigger than the device size

Hi,

thanks man! I can mount the drive know and see files. Progress! Windows is still pissed of and won't boot... Gparted now gives me this:

Check and repair file system (ntfs) on /dev/sda1  00:00:04    ( ERROR ) 
      
   calibrate /dev/sda1  00:00:00    ( SUCCESS ) 
      
  path: /dev/sda1
start: 63
end: 71794484
size: 71794422 (34.23 GiB) 
   check file system on /dev/sda1 for errors and (if possible) fix them  00:00:04    ( ERROR ) 
      
  ntfsresize -P -i -f -v /dev/sda1 
      
  ntfsresize v1.13.1 (libntfs 9:0:0)
Device name : /dev/sda1
NTFS volume version: 3.1
Cluster size : 4096 bytes
Current volume size: 36758741504 bytes (36759 MB)
Current device size: 36758744064 bytes (36759 MB)
Checking for bad sectors ...
Checking filesystem consistency ...
Accounting clusters ...
Cluster accounting failed at 8974302 (0x88efde): missing cluster in $Bitmap
Cluster accounting failed at 8974303 (0x88efdf): missing cluster in $Bitmap
Filesystem check failed! Totally 2 cluster accounting mismatches.
ERROR: NTFS is inconsistent. Run chkdsk /f on Windows then reboot it TWICE!
The usage of the /f parameter is very IMPORTANT! No modification was
and will be made to NTFS by this software until it gets repaired.

Maybe I can get W going again and do checkdisk... Currently W gives me a "NTLDR missing bla bla" grrrr. :-)

6

Re: SOLVED another Current NTFS volume size is bigger than the device size

For Windows XP you might need to boot from the windows CD and run commands like "fixboot", "fixmbr", and "bootcfg /rebuild".

With Vista and Windows 7 I think the commands might be "bootrec /fixmbr", "bootrec /fixboot", and "bootrec /rebuildbcd".

7

Re: SOLVED another Current NTFS volume size is bigger than the device size

gedakc wrote:

For Windows XP you might need to boot from the windows CD and run commands like "fixboot", "fixmbr", and "bootcfg /rebuild".

With Vista and Windows 7 I think the commands might be "bootrec /fixmbr", "bootrec /fixboot", and "bootrec /rebuildbcd".

Hi,

I am using a netbook without cd drive. The first challenge is to get by the "'NTLDR is missing" message into the DOS Prompt... I will search the net for a solution. First of all, thanks to your support, my pictures from my last vacation are saved. Thanks for that.

8

Re: SOLVED another Current NTFS volume size is bigger than the device size

I am glad to hear that you have your data back.  smile

Since the NTFS volume size problem is fixed, I will edit the initial post and prefix "SOLVED" in front of the title.

I wish you well getting Windows to boot again.