Re: Part of new hard disk has 'disappeared' - access only to about hal

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Roy Alastair wrote:
I bought new larger HDD for laptop (WIN XP Home, Dell Inspiron) as old one was becoming full. Rather than reload from OEM CDs, update to Serv Pack 3 etc and load all softwatre, tried to save a lot of time by using freeware to clone existing disk - as I accept, at own risk! On restart, blue screen of death! Have resolved that, but now only about 73GB of 160GB drive is visible and formattable. Linux-based cloning program running from bootable CD, used again to tackle BSOD problem, produced error messages reporting other inaccessible partitions 'with unsupported flags'.
Have I terminally ruined it, or is there any way of scrubbing the entire HDD back to 'as new' state and starting again (in which case this time I'll do it via a full clean install etc, however long it takes)? I strongly suspect that I have corrupted the MBR, and perhaps especially the Volume Bytes forming part of the MBR in sector 0. Have used other internet -derived software to wipe sector 0, but that has not revealed the invisible parts of the HDD. It seems unlikely that the HDD has suffered physical damage, and I remain hopeful this is a software issue rather than broken hardware.

V grateful for any thoughts from those less ignorant than me!

As Pegasus asks, the most important part, is whether the original disk is OK.

This is a partial picture of your disk (just the bits that I've had
bad experiences with).

-----------------------------------------------------+//+--------------+-----------+
Master Boot Record Primary four Partitions Signature| | Boot Sector | Rest of |
<-- 446 bytes --> <----- 64 bytes -----> 0xAA55 | | | C: |
-----------------------------------------------------+//+--------------+-----------+

<-------------------- sector zero -------------------> <----- C: partition ------->

If you have your Linux disc, open a "terminal" window, and do this. This would
erase the MBR on disk hdb. Multiplying bs*count, tells you how much erasing it
is going to do. In this case, a total of 512 bytes of erasing.

sudo dd if=/dev/zero of=/dev/hdb bs=512 count=1

Sudo is only needed, if you're not logged in as root. If you're root, then don't
put the sudo part. The "if=" is the data source, in this case, a stream of zeros
for erasing stuff. The "of=" is the output target for the command. For example,
my second hard drive is "hdb" in Linux, so of=/dev/hdb is what I use. The Block Size
of 512 bytes, is the size of one sector. The command will process one block (count=1).

You can back up the MBR, by doing this. The "my_mbr.bin" file ends up in the
current working directory.

sudo dd if=/dev/hda of=my_mbr.bin bs=512 count=1

You can restore just the 446 byte executable code part, to another drive later,
like this. I haven't tested this command, and I'm not sure how the dd command
can address sub-sector sized quantities. But I've seen this suggested as a way
to put back just the 446 byte part.

sudo dd if=my_mbr.bin of=/dev/hdb bs=446 count=1

So you can do a few things from Linux, to the MBR.

If you want to erase the whole drive, the "dd" command can do that also.

sudo dd if=/dev/zero of=/dev/hdb

The command runs faster, if you give it a block size. On my 80,026,361,856 byte
disk, I erase it like this. This runs a couple times faster than the previous
command syntax. 290304 * 275664 = 80,026,361,856 bytes. The block size of
290304 is five hundred and sixty seven sectors. I try to keep the block size,
just below 512KB.

sudo dd if=/dev/zero of=/dev/hdb bs=290304 count=275664

If you want another tool to erase a disk, then you can use DBAN.
Be careful! This tool is designed to erase *all* connected disks,
so make sure you know first, what it is going to erase. This tool
can erase 99 disks simultaneously, and in the support forum, a
few people accidentally erased their backup disk. The safest course
of action, is to only have the disk to be erased, connected to
the computer. It looks like there may be ISO9660 versions, which
you can burn to make a bootable CD (using a tool that understands
how to handle an ISO file).

http://www.dban.org

DBAN selection screen.

http://sourceforge.net/project/screenshots.php?group_id=61951&ssid=39776

With DBAN, use the "quick" option, because any of the fancy
"35 pass" options, will take forever to finish.

I like a mixture of tools, some Windows, some Linux. For example,
this one will show you your partition table entries. This is
a representation of the 64 byte section of sector zero.

ftp://ftp.symantec.com/public/english_us_canada/tools/pq/utilities/PTEDIT32.zip

The Linux equivalent of the Windows PTEDIT32, is this. Type "p" to print the
current partition table. Then "q" to quit. You'd do this from a
terminal window. I've used this one a lot.

sudo fdisk /dev/hda

HTH,
Paul
.



Relevant Pages

  • Re: Shred forever?
    ... I heard that when we use the shred command to erase the entire harddisk it ... and I wanted to really clean the disk. ... then zero the sector and then move on to the next sector etc. ...
    (alt.os.linux)
  • Re: Shred forever?
    ... I heard that when we use the shred command to erase the entire harddisk it ... and I wanted to really clean the disk. ... then zero the sector and then move on to the next sector etc. ...
    (alt.os.linux)
  • Re: Advise on data recovery from failed drive
    ... I have an ancient program that I once wrote to make copies of disk drives ... It will retry a single sector read several times before ... FreeBSD 4.8-RELEASE dd command and discovered a new option that avoids ...
    (freebsd-questions)
  • Re: Part of new hard disk has disappeared - access only to about
    ... As Pegasus asks, the most important part, is whether the original disk is OK. ... The "of=" is the output target for the command. ... If you want to erase the whole drive, the "dd" command can do that also. ... The Linux equivalent of the Windows PTEDIT32, ...
    (microsoft.public.windowsxp.general)
  • Re: SCSI Error Troubleshooting
    ... server gets in states where it has trouble with disk access. ... I/O error: dev 08:11, sector 927989768 ... Command byte 2 bit 5 is invalid ...
    (comp.os.linux.hardware)