Partitioning an hd with bad sector

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read this

Partitioning an hd with bad sector

Postby MOGM on Fri Feb 27, 2009 5:42 am

Hi to everybody,
i'm trying to install linux mint on my laptop (compaq presario R3000) but i'd like not to lose the xp partition.
I tried this way:
-freed about 25 gigabytes on the win partition
-made a backup copy of my data
-defragged the disk three times
-booted from the mint cd (felicia, main edition)

The problem is that gparted refuses to resize the ntfs partition, since it has a "bad sector". It recommends executing chkdsk /F/R and reboot twice, then resize the partition with ntfsresize -bad--sectors.

I tried doing this but all i can get is to reduce the space available to win without being able to create a partition for linux.

Please, help me to say windoze goodbye
MOGM
Level 1
Level 1
 
Posts: 24
Joined: Fri Feb 27, 2009 5:12 am

Linux Mint is funded by ads and donations.
 

Re: Partitioning an hd with bad sector

Postby Fred on Fri Feb 27, 2009 7:58 am

MOGM,

Greetings. Let me get a bit more information. Will Windows still boot and run correctly?

Boot the Mint live cd and find a program in your menu called gparted. It is a partitioning program. Open it and post a screen shot of your partition table.

At least you have a backup of your data, so that is one thing you have going for you. :-)

Fred
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
User avatar
Fred
Level 10
Level 10
 
Posts: 3356
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

Re: Partitioning an hd with bad sector

Postby MOGM on Fri Feb 27, 2009 9:55 am

Tanks for the interest, Fred.
Win runs perfectly, i took the screen you asked me.
Here it is
Image


I shot also the error screen.
Image

Hope it helps.
MOGM
Level 1
Level 1
 
Posts: 24
Joined: Fri Feb 27, 2009 5:12 am

Re: Partitioning an hd with bad sector

Postby DataMan on Fri Feb 27, 2009 8:26 pm

As the warning message you display mentioned, you are probably on borrowed time with this h/d. If you've done the remidiation recommended and it hasn't resolved the situation, you should definitely be thinking short term of making the capital expenditure toward a replacement h/d. Post back if you need assistance in backing up your partitions for re-imaging back to a new h/d.

DataMan
Linux'd since 2005 Linux ID 422356 Ubuntu ID 15015
User avatar
DataMan
Level 6
Level 6
 
Posts: 1192
Joined: Thu Dec 04, 2008 6:47 am
Location: Carmel, Indiana USA at /var/www

Re: Partitioning an hd with bad sector

Postby Fred on Sat Feb 28, 2009 3:45 am

MOGM,

I am torn between taking the tact Dataman has in the above post or pointing you toward more analysis.

There is a tool set called "smartmontools" in the repos that could give you more info regarding the health of the hard drive. You might want to google it and read a bit. If in fact you are actually having a problem with the disk itself and not a problem with ntfs file system corruption, then you should begin immediately to transition to another hard drive before disaster strikes and you are out of the computer business. At least as far as the hard drive goes. :-)

Since you are still functional with Windows I suspect it is a disk problem and not a file system problem but using "smartmontools" will be able to nail that down for you.

I am sure there are Windows tools that can do the same thing but I am not familiar with what they might be enough to recommend a particular program.

Good luck.

Fred
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
User avatar
Fred
Level 10
Level 10
 
Posts: 3356
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

Re: Partitioning an hd with bad sector

Postby MOGM on Sat Feb 28, 2009 6:34 am

Fred,
I've googled smartmontools and found a winxp version.
When running the test i receive the following output:
Image
From my newbie interpretation it seems that the drive is ok, but as said i have also made a backup of my data, just in case.
MOGM
Level 1
Level 1
 
Posts: 24
Joined: Fri Feb 27, 2009 5:12 am

Re: Partitioning an hd with bad sector

Postby viking777 on Sat Feb 28, 2009 7:34 am

So let us assume your disk is OK then. Can you just bring me up to date, have you tried the ntfsresize option yet or not? If you have, what happened? Ntfsresize doesn't actually shrink partitions itself, it just resizes the filesystem so it takes up less space on the existing partition leaving you to resize the partition youself.
Fujitsu Lifebook AH532. Intel i5 processor, 6Gb ram, Intel HD3000 graphics, Intel Audio/wifi. Realtek RTL8111/8168B Ethernet.Lubuntu 13.10,Ubuntu12.10 (Unity), Mint16 (Cinnamon), Manjaro (Xfce).
Image
User avatar
viking777
Level 14
Level 14
 
Posts: 5153
Joined: Mon Dec 01, 2008 11:21 am

Re: Partitioning an hd with bad sector

Postby MOGM on Sat Feb 28, 2009 8:54 am

I've already tried ntfsresize with the --bad-sector option, but since it does not shrinks the partition and GParted still refuses to do it i'm struk at this point.
I'd be grate to anyone who can tell me a way to create a new partition for the mint installation.
By the way, if the disk is ok, why GParted signals an error?
MOGM
Level 1
Level 1
 
Posts: 24
Joined: Fri Feb 27, 2009 5:12 am

Re: Partitioning an hd with bad sector

Postby Fred on Sat Feb 28, 2009 9:20 am

MOGM,

I am going to throw out a few possibles for you to mix-n-match and choose from. :-)

Observations:

1.) My suspicions were wrong. The disk is probably just fine. Which would indicate some undefined file system corruption.

2.) When was the last time you did a really thorough anti-virus scan of all files? Once-upon-a-time there was a cute little virus that planted itself in the file system. The way it did this was change the length of a sector from 512 to some other value. I forget now what length but it is unimportant at this point. This left another sector too short. chkdsk would fix this by marking the two non-standard sectors as defective, however when you reboot, a stub that is placed in the 1st sector, (boot sector), triggers the virus to re-plant itself and the process begins anew. A good way to get an indication of this virus is to run chkdsk and reboot twice and check the storage available. Run chkdsk again and do the same thing. If you have this or some variation of this virus you will never get it to stay fixed and the storage space will just continue to be reduced each time. This is a very hard virus to get rid of once you are infected. It is hard to find and hard to fix without using mass destruction techniques.

3.) It could be just some common file system corruption, which ntfs is prone to do, for no obvious reason, from time to time. It is just a coincidence that it doesn't seem to affect the operation of the system, at least not at this point in time.

Fixes:

1.) Stay with Windows on this drive and do nothing. System is working... at least for now.

2.) Off-load your operating system and data as is, re-constitute a fresh ntfs file system, and put everything back on the drive. At the same time you can allow space for the Linux install. If it is a virus problem you will still have it however.

3.) Backup your data, (only data, no executables or system files, and then only after they have been scanned), dd the entire drive and start over with a fresh set of partitions and new XP install. This is the drastic fix but the only one that is a 99.9% sure thing.

Fred
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
User avatar
Fred
Level 10
Level 10
 
Posts: 3356
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

Re: Partitioning an hd with bad sector

Postby MOGM on Sat Feb 28, 2009 11:37 am

Fred,
I made the test you suggested to find the virus, here are the results.
Prior to making the first chkdsk/f/r&reboot twice cycle i had 32.178.996.528 bytes of free space
After the first cycle they were 32.181.276.672
After a second cycle they were 32.181.514.240
Are this fluctuations normal or is a virus at work?

Unfortunately i don't have the xp install cd with me, so formatting the whole hd is not a viable option, at least for a time, which leaves me struck with an inexplicably working xp.
MOGM
Level 1
Level 1
 
Posts: 24
Joined: Fri Feb 27, 2009 5:12 am

Re: Partitioning an hd with bad sector

Postby viking777 on Sat Feb 28, 2009 12:54 pm

MOGM. Am I correct in thinking that the way you are tackling this is to boot from the live cd then run gparted and then try to create a partition on which to install Mint? If this is the case then why not tackle it a different way. Boot from the live cd and hit the install button. When you get to the partitioning screen select 'guided resize' or whatever it is called and let the installer create the partition for you - not something I would normally recommend, but I have run out of other ideas.

There is no reason on earth why this should work when what you are doing doesn't, but that alone makes it worth a try!

Of course if I have misunderstood and you have been doing this all along then just dismiss this post as the ramblings of a demented old man!
Fujitsu Lifebook AH532. Intel i5 processor, 6Gb ram, Intel HD3000 graphics, Intel Audio/wifi. Realtek RTL8111/8168B Ethernet.Lubuntu 13.10,Ubuntu12.10 (Unity), Mint16 (Cinnamon), Manjaro (Xfce).
Image
User avatar
viking777
Level 14
Level 14
 
Posts: 5153
Joined: Mon Dec 01, 2008 11:21 am

Re: Partitioning an hd with bad sector

Postby MOGM on Sat Feb 28, 2009 1:06 pm

viking777,
You are right, i was using GParted from the booted cd to partition my hd.
I've already tried using the mint installer to make a "guided resize" but it seems to have no such option and the custom installation requires to format entirely the existing partitions.
Anyway, tanks for sharing your ideas.
MOGM
Level 1
Level 1
 
Posts: 24
Joined: Fri Feb 27, 2009 5:12 am

Re: Partitioning an hd with bad sector

Postby Fred on Sat Feb 28, 2009 1:36 pm

MOGM,

I see nothing in your numbers that would lead me to believe that you have a virus problem. That leaves option (1) or (2) in my post above. Not that I don't want you to use Linux, but if I were in your position, I would do nothing. I tend to be pretty conservative so since you don't have an install disk for XP currently available, I wouldn't risk a mistake doing option (2). But that is just me.

I really don't know what else to tell you at this point, but will be willing to try to answer any questions you might have.

Fred
Last edited by Fred on Sat Feb 28, 2009 2:08 pm, edited 1 time in total.
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
User avatar
Fred
Level 10
Level 10
 
Posts: 3356
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

Re: Partitioning an hd with bad sector

Postby MOGM on Sat Feb 28, 2009 2:04 pm

Fred,
In fact i do have a linux mint and ubuntu cds available, but not the xp one.
I've made a thought about using the ubuntu cd to install it and then download the mint packages, but it seems a bit to elaborate for my actual skills.
I'll simply procrastinate the installation until i can get the xp cd or the system crashes, whatever comes first.
Tanks for the advice.
MOGM
Level 1
Level 1
 
Posts: 24
Joined: Fri Feb 27, 2009 5:12 am

Re: Partitioning an hd with bad sector

Postby Fred on Sat Feb 28, 2009 2:09 pm

MOGM,

I misspoke in my post above. Please re-read it. lol

Fred
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
User avatar
Fred
Level 10
Level 10
 
Posts: 3356
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

Re: Partitioning an hd with bad sector

Postby MOGM on Sat Feb 28, 2009 2:19 pm

Fred, Nevermind, i've figured it.
MOGM
Level 1
Level 1
 
Posts: 24
Joined: Fri Feb 27, 2009 5:12 am

Linux Mint is funded by ads and donations.
 

Return to Newbie Questions

Who is online

Users browsing this forum: buytick, Google [Bot] and 25 guests