Hi,
scanning these posts I wondered whether anybody has seen the following problem and found a solution or can explain what is happening:
I am having some inconsistencies when running my Vaio Laptop under WinXP and/or under Wubi 10.04.2 (double boot). Chkdsk does not find any error but gparted and ntfsresize complain about at least 2 defective sectors. I did as indicated in these posts (i.e. run chkdsk /r /f twice on c: and d: and also run ntfsresize with the parameters set to correct bad sectors) but the error shown in gparted did not go away. I also run the Seegate HD tool under WinXP and it did not report any HD error. So, is there a defective sector or not?
Thanks for hints, DE
This worked great but it seems to be a lot of steps and a lot of things to keep track of. I found a much simpler way and it can all be done through gparted. I cannot take credit for this but I have tested it and it works great.
BE CAREFUL AS THIS DISABLES THE BAD SECTOR CHECK!
Basically, you create an executable bash script which adds the --bad-sectors option to the original ntfsresize program. You can follow these general steps:
- Locate the ntfsresize executable (for the GParted live CD it will be in /usr/bin, for Parted Magic it is in /usr/sbin). (/sbin for ubuntu)
- Rename it to ntfsresize.orig.
- Create a new bash script at the same location named ntfsresize. (See below for what you should put in this script.)
- Use chmod to ensure the new script is executable (chmod 755 will do the trick).
- Run GParted as normal. It will ignore the bad sector(s).
In the bash script itself, you’ll want to add these two lines:
#!/bin/bash
exec ntfsresize.orig --bad-sectors "$@"
I did all the moving and script creating with the sudo command as to keep permissions as root.
Now I don't even have to think about it, I just launch gparted and no bad sector error.
LindaBW:
I can't thank you enough for this wonderful and helpful posts. Three years later it's still useful. I had problems too with a bad sector, so Gparted wouldn't work at all. Your guide was of invaluable help, since I didn't want to deal with ntfsresize or fdisk, since it seemed too difficult. Your guide gave me confidence.
But, as MWola, I'd like to do some remarks, hoping this could help somebody else too. When creating the new partition in fdisk, the one with:
It asked me for sectors, not cylinders. People doing this should be very careful with this point. To my knowledge, by default the unit measure is given in sectors, until you specify it otherwise. If for some reason, in the step above fdisk ask you for an unit different than given in the partition table, as MWola suggest, open an alternate terminal (ctrl+alt+t) and type:Code:Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 2 First cylinder (11-4864, default 11): 11 Last cylinder, +cylinders or +size{K,M,G} (11-4864, default 4864): +19000M
Or change 'sectors' for 'cylinders', as required, and copy the value. I was given and asked everything in sectors, so I didn't have that issue.Code:fdisk -l -u='sectors'
But what confused me is that when asked for the first sector, the default given didn't correspond to the original partition table. This confused me a lot, and for a moment I thought of entering the default given. I realized there was a reason for you constantly keeping track of the original partition table, and I decided to enter the first sector given in the original partition table, NOT the default suggested. Everything else went as shown, and now I'm typing this on my new Ubuntu system. Thank you so much.
In short. keep track of if fdisk is asking you for cylinders or sectors, and enter the first sector or cylinder for the required partition given in the ORIGINAL partition table, regardless of what fdisk may have as default.
Last edited by Analogon; July 24th, 2012 at 05:54 PM. Reason: formatting
Bookmarks