My hard drive has bad sectors and locks up all the time. Since I don't have a job, I'd like to try to keep the drive as opposed to replacing it if at all possible. If I reformat the drive, could I isolate the bad sectors in their own partition and use the rest of the drive in a primary partition?
No you can' put them in a separate partition. I would not trust the drive in any way because when a drive starts going bad it's usually a cascading effect and will continue to get worse. I certainly wouldn't trust the drive to store any important data or be stable in any way.
I have created a partition with all the bad sectors. It only works if there is no errors in and near the MBR and the bad sectors are in a area somewhat contiguous. You need to map all the bad sectors. of the whole drive. Determine the percentage range of bad sectors and expand it up and down by 10 percent, Partition usable space above and below. Test and repartition as necessary. You need a large band so the head does not ride over a disk defect. I've only applied this technique to MFM drives. One lasted five years longer. The bad area may take up a great part of the disk.
Have you used the harddrive manufacturer's own utility? Some of them have a facility for 'repairing' the drive which is essentially marking the bad sectors so the drive ignores them. "I've always been mad, I know I've been mad, like the most of us..." Pink Floyd
Depends on what is causing it. Some virus can report them bad. If they keep making more each day or so there would be little hope of fixing it but you can try I guess.
Normal disks have bad sectors usually after time. Most file systems mark the whole sector bad if it can't do a write to a part of the drive after so many attempts.As above there are hard drive diags from OEM's that help. Might look for a low level format but see the diags first for why it is failing.
1/3 of highway deaths are caused by drunks. The rest are by people who can't drive any better than a drunk.
Good error testing is very slow, You need to write down every bad sector found. Using CHKDSK or SCANDISK may work. You don't want software that remaps bad sectors.