1

Topic: Gparted thinks 10+ sectors are bad - hdd is new!

Hi everybody, I have that problem some people seemed to have before me as well.

I'm trying to increase the size of of my Win XP system partition, and was able to produce unallocated space from the logical partition on the same drive. But ntfsresize claims that my (brand new) hdd has 10 or more bad sectors. I went through the chkdsk /f /r routine several times, got the proper utility from the hdd manufacturer (Samsung) and did a complete surface scan. Everything perfect.

I tried the two different versions of the live CD, 0.5.11 and 0.4.6.1, both had the same result. Cannot resize anything, it believes there are very many bad sectors, it also claims that it can't read the file system.

So it's neither a too old version of Gparted nor does the hdd appear to be damaged. What would you recommend?

Thanks, Michael

2

Re: Gparted thinks 10+ sectors are bad - hdd is new!

I have the exact same problem!!
I think it might be because I cloned a damaged drive and restored it to a new one, maybe the cloning somehow copied some sectors as "bad"....
anyone have any ideas?

3 (edited by GigaDave 2010-02-14 18:26:47)

Re: Gparted thinks 10+ sectors are bad - hdd is new!

I second the above stories.

I tried to resize a NTFS partition last weekend and this weekend and got an exclamation mark beside the partition. Information stated that bad sectors were detected and Gparted could not continue. I have downloaded the apropiate tool for the hard disk which found and repaired 1 bad sector. I scandisked the drive and it was found clean. Rebooted twice and started Gparted again. No luck, exclamation mark was there.
Today I've ran the hard disk tool test various times and it finds the disk clean, same for scandisk, but not for Gparted.

Any advice would be highly appreciated.

[edit] Used Gparted 0.5.1 live cd (occurs also with version 0.5.0) [/edit]

4

Re: Gparted thinks 10+ sectors are bad - hdd is new!

Update:
I tried to get around the problem by copying my partition to unallocated space and then resizing the copy...
But instead of copying, it gave the same error.
So it won't resize or copy that partition.
Can any one help?

5

Re: Gparted thinks 10+ sectors are bad - hdd is new!

The trouble continues.
It seems I can't resize any of the other FAT partitions on my disk since the primary NTFS partition is said to have bad sectors.
(btw I ran some tests during the week and the disk is reported as fine)

6

Re: Gparted thinks 10+ sectors are bad - hdd is new!

Perhaps the hard drive suffers from some unexpected defects?

Hard drive testing tools can be found on many hard drive manufacturer web sites.  Some of these can perform tests that will erase your data, so it is advisable to have a backup of your data prior to running the tests.  After running the tests you should know if the drive is failing.

7 (edited by Ann Ominous 2010-03-10 19:55:59)

Re: Gparted thinks 10+ sectors are bad - hdd is new!

Similar issue with a drive containing a single NTFS partition with XP.

First used latest Clonezilla to copy device to device from old 60GB to temp 100GB drive.
Then used latest Clonezilla to copy device to device from temp 100GB to new 120GB drive.
Then used Ubuntu GParted in an attempt to resize the partition to use all the space.

GParted reports at least 266 bad sectors.
Chkdsk /f/r reports 0 bad sectors.

I do not believe that the old 60GB or temp 100GB drives had any bad sectors, but it is possible. Is that a plausible reason for why the new 120GB drive (with no bad sectors) is unable to be resized? If so, how can the 'bad sectors' list be reset? Or how can the drive be resized in spite of the 'bad sectors'.

Note: Ubuntu Disk Utility shows via SMART data that there are zero bad sectors and no read errors.

8

Re: Gparted thinks 10+ sectors are bad - hdd is new!

I have the same problem. I have a 500G XP partiti0n (ntfs) and I can't resize to 100G to leave 400 for ubuntu.

Anyone know how to get around this?

Mike.

9

Re: Gparted thinks 10+ sectors are bad - hdd is new!

This is an known outstanding issue in Gparted.  The problem is that Gparted currently issues an "ntfsresize" command to verify the partition to be resized (before changing anything), but doesn't use the ntfsresize "-b" flag which is capable of ignoring the NTFS special file called "$BADCLUS" containing the information on bad clusters (bad clusters on the PREVIOUS hard disk that was cloned, and not the new hard disk).  The net result is that the "ntfsresize" verification command fails with an error, causing GParted to refuse to perform the function.  This makes it impossible for GParted to resize partitions that have been cloned from prior hard disks that USED to have bad sectors.

This issue has already been logged to the bug database for GParted.  See https://bugzilla.gnome.org/show_bug.cgi?id=335595.  You will have to wait for the change request to be made before any partition with a non-blank $BADCLUS file can be resized with GParted.

One alternative is to truncate the $BADCLUS file manually, after which the partition can then be resized.  See instructions at the bottom of the web page http://www.linux-ntfs.org/doku.php?id=ntfsclone

Another alternative (which works for me) is using a PartitionMagic Live CD, which does not have the same problem (it can resize partitions with non-blank $BADCLUS files).

10

Re: Gparted thinks 10+ sectors are bad - hdd is new!

Thank you TimHalvorsen for your contribution.
GParted doesn't include the option to ignore bad sector warnings. It is possible, of course, to run ntfsresize from the command line, if we think that the warnings are wrong.

Another alternative (which works for me) is using a PartitionMagic Live CD, which does not have the same problem (it can resize partitions with non-blank $BADCLUS files).

However, Partition Magic is discontinued and isn't officially available anymore.

*** It is highly recommended to backup any important files before doing resize/move operations. ***

11

Re: Gparted thinks 10+ sectors are bad - hdd is new!

Hello Gparted brethren,

    I can't believe this thing is still biting people, but I've got teeth marks all over my A$$ from trying to get my son's XP volume moved from a 40G partition over. I've read as much as I could and I still haven't found a clear work-around.

    What I am trying to do is add a lager hd to my son's computer that he has outgrown the windows partition on. The drive is presently partitioned as follows:

sda
  sda1 - 40G Primary with XP
  sda5 - 2G swap
  sda6 - 20G /
  sda7 - 53G /home

    What I am trying to do is install a new 250G drive. The plan is to install the new drive as hd0 and then copy the 40G primary to the new drive and then grow it to 210G leaving roughly 30G unpartitioned at the end for whatever.

    Upon attempting the copy with gparted (0.52-9) the copy fails with an error saying that sda1 has a bad sector and that you need to boot into windows, run chkdsk /r (implies /f), reboot TWICE, and then the partition can be resized using the ntfsresize '--bad-sector' option. So far following that advise has hasn't produced any results. The problem being -- no matter how many times you run chkdsk and confirmed there are NO problem with bad sectors in windows, the yellow triangle stays next to the partitions in gparted and ... you're screwed.

    As a test, I decided to use good old 'dd' to copy the partition which I then planned on resizing after the XP volume had been copied from sdb to sda. To address the issue of possible sector problems in the original XP volume, dd was run to pad any sectors with '0's if an error was found. The cli used was:

    dd if=/dev/sdb1 of=/dev/sda1 bs=4K conv=noerror,sync

    The copy/duplication goes fine and I have a working copy of the XP install on the new drive with 200G of unallocated space at the end. When I open/boot gparted to grow the XP partition, I am completely shocked to see that same darn yellow-triangle next to the 'new' partition on the 'new' drive. The kicker is there are NO sector errors within the new XP volume. The physical media is fine. As mentioned before, even if there were a plausible sector or two that could not be copied, the sector would be null padded and should no result in gparted flagging it as a bad sector.

    Just thinking out loud, there has to be some type of test that can be done to confirm or eliminate perceived bad sectors in the event of a non-blank $BADCLUS. As it sits now, just as before, gparted dies when it attempts to resize the new partition with ntfsresize complaining about the same bad sectors within the new XP volume. I swear MS must a added this 'feature' during one of the recent updates.

    I notice the last post here is 5/25, has there been any progress or new work-arounds found in the past month?  Ho have others handled this situation and been able to resize the partition in light of the flagged bad sectors. I'm open to any new ideas. Whatever it is I do, I can't risk botching my son's Counter-Strike Steam install -- heaven forbid tongue

12

Re: Gparted thinks 10+ sectors are bad - hdd is new!

GParted uses the ntfsclone command to copy NTFS partitions.

Perhaps the following link on ntfsclone will provide some clues as to how to address the problem?
http://www.linux-ntfs.org/doku.php?id=ntfsclone

13 (edited by rickyjon 2011-02-26 06:15:34)

Re: Gparted thinks 10+ sectors are bad - hdd is new!

raffman,

i have the same error while resizing my hdd...

Thanks to gedakc for giving the solution of this problem...

I hope i can resize my hdd now...:)

Ricky jon

14

Re: Gparted thinks 10+ sectors are bad - hdd is new!

It's so hard to me. then you are so clever........:lol::lol: