Thanks for posting that correction loufah. I was actually considering testing the theory out on an old drive because I didn't believe it to be true but I didn't get around to it.Quote from loufah:
No. dd'ing an entire disk (or at least the beginning, if you don't want to wait for a long time) with zeroes is exactly what you want to do if you have an infected MBR. And we do this when we need to redeploy a disk to hold a different OS or to be in a different RAID box.
Quote from loufah:
No. dd'ing an entire disk (or at least the beginning, if you don't want to wait for a long time) with zeroes is exactly what you want to do if you have an infected MBR. And we do this when we need to redeploy a disk to hold a different OS or to be in a different RAID box.
You are still living in the days of SMD drives. SCSI and ATA drives keep their bad sector list in an area that can only be accessed by special commands, not ordinary read and write commands.
The c/h/s numbers are mostly fiction, because since the 1990's disks have had a variable number of sectors per track, more on the outer tracks than the inner tracks, and are linearly addressed. c/h/s is just for the benefit of the BIOS and OS, and can be anything you want, although s is generally limited to 63 and of course the product should be as close as possible to the number of sectors on the disk so as not to waste space. In any case, fdisk can set up a new MBR with the appropriate c/h/s values.
The OS keeps a bad sector list, but this is specific to the OS and the filesystem type and is not kept in sector 0 of the drive. Even back in SMD days, if bad sectors could not be "slipped", the mapping used by most OS's used DEC standard 144, which put the table (and the bad sectors) in the first few tracks of the last cylinder of the drive.
Quote from angel_king:
the original poster may have a bad ram chip, or a bad motherboard, or a bad cpu, not a virus. fix this by getting a new computer, installing several fans to cool the motherboard, ram chips and cpu and don't put the computer in a cabinet (oven) because the fan noise is bothersome
for $170 I could have bought a whole new 64 bit dual core computer
how to get your hard drive back from a virus or to clean install windows to a blank hard drive
download damn small linux , suse linux live, fedora linux live or any linux that runs off the cd and ram chips,burn the iso image to a cd, put it in that machine, use sudo su or su to root # cfdisk /dev/hda or /dev/hdb or /dev/hdc or /dev/hdd to find the hard drive
find the instructions for "shred" program for linux on the internet
# shred -v -n 1 /dev/hda
shred is a file destruction program that will over write giberish to the hard drive 35 times by default setting -v = verbose, it tells you what is happening, -n 1 = number of times to overwrite " -n 1 " is overwrite one time you dont have time to overwrite 35 times it takes days
I have used this program hundreds of times and it will not harm the hard drive, it will wipe everything off the drive, windows (a virus), viruses for windows, the mbr, and all files.
get "antivir" free antivirus, use the windows firewall, reformat and start over when you get a virus
I have built 150 computers. time stealing evil machines.
I must admit that "shred" rocks...yet, I feel the need to create another "OS war" - what the hell is the equivalent MicroSucks command as shred - oh, wait, you probably have to BUY such a critter - LOL!Sure, if the MBR were overwritten, the OS at some level will think it's a different disk. I've actually done this intentionally when I have a 300GB disk I need to clone and all I have is a 301GB disk. The OS doesn't really care if the geometry is different from what the target disk originally was, since it's all a linear address space as far as it's concerned. (The only thing you ought not to do is give the OS the impression that the disk has more sectors than it actually has.) The 301GB disk does not think it's suddenly a different type, though. The Linux sdX device presents an address space that doesn't include anything really critical. If you still have that disk, plug it in, go to the BIOS setup routine provided by Adaptec or whoever, and see what the disk type, model, and geometry really are.Quote from gastropod:
When the command was complete - the Fujitsu "thought" it was a 9 GB Sun drive!
Quote from loufah:
I guess where Gastropod and I agree is that it's OK to overwrite the first few tracks of your disk with zeroes or garbage, and that should be enough to get rid of any boot sector virus that is there. So just do that.

) (Personal thought - Sun is toast - the Sparc chips just aren't keeping up with the Intel/AMD/(IBM Power) chips. With so little software on Solaris/OpenSolaris...why move to it? I hear the people with the, "but, it will run Linux programs too", but, if I want to run Linux programs...why not run Linux?) What a convoluted system that was too..."how many slices are you putting on that partition...oh and don't forget that slice 2 represents the whole disk.....but, why have slices AND partitions.?!?!?...I digress 