[CS-FSLUG] Hard drive won't format - or maybe stay formatted.

davidm at hisfeet.net davidm at hisfeet.net
Fri Aug 6 11:46:22 CDT 2010


fdisk -l revealed that the disk is indeed 250 GiB, and had a partiton. (I
didn't write down the details of that partition, but there were no errors
messages.

All right:  First I went to "dd" with the command as you wrote it, but
(from a CD boot of "mint9") substituting sda for sdb. That gave me no
errors but finished almost immediately.

Then I went to fdisk with the commands that you suggested.  right away I
got the message that Dos compatiblilty should be turned of ("c"), and
display units displayed in sectors ("u").  I did that.

"p" showed no errors, but no partitons.

I pushed "d" anyway, and confirmed that there were no partitions

then "n"  and got the confirmation that the partiton was formed and needed
to be written

"W" confirmed the partition table was written.

"W" confirmed the partiton table was written.

"p"showed no errors:  (by the way I'm typing this, since I don't have
these networked, and the system in question isn't connected to the
internet. There could be some typos.

250.1 GB, 250059350016 Bytes
81 heads, 63 sectors/track, 95707 cylinders
Units=cylinders of 5103 * 512=2612736 bytes
sector size (logical/physical:512 bytes/512/bytes
I/O size (minimal/optimal: 512 bytes/512/bytes
Disk Identifier 0x000816fc

Device	|Boot	|Start	|End		|Blocks		|ID	|System
/dev/sda|	|   2048|   488397167	|   244197560	|   83	|Linux

****I don't know enough about drive geometry to figure out if those
numbers all come out right or even close.  They probably do, but I still
have the following problem.  Even if they do, Gparted sees it diffeently.
I tried Gparted (just to view what it saw without changing anything) right
after the above procedure, and then I rebooted and tried again. ****

Either way it showed 232 GiB as being the whole disk, except for a small
sliver (less that a GiB) at the very beginning.

After rebooting I tried to format the partition Which in Gparted showed as
"unknown" or "unidentified" as far as format is concerned. After
formatting, I tried to write that to the table using Gparted, and
immediately lost all formatting.

LATER: I went through the Bios setup.  don't know if it might have had
some disk protection set before, (the option was there) but if it did, I
removed it so that Bios reports that there is no such protection. (had I
realized how, I could have checked that first).

So then I redid the dd if=/dev/zero of=/dev/sda   and this time I left it
at that for about an hour and a half.  When I did a Control-C it reported
that it had zeroed out 130 GiB

Then I went through the above procedure again, with exactly the same
results.  If I were  in the bussiness I'd be out of business:). I'm about
to give up on it.  I new drive costs less than 60,00.  But at least I'm
learning something.




>   You should have that fdisk on your system.
>
> man 8 fdisk
>
> The above command should give you the directions for fdisk.
> But basically:
> fdisk /dev/sdb
> (where /dev/sdb represents the device you want to destroy)
>
> Then there are a number of one-character commands :
> m = help  (it really means, 'M'enu)
> d = delete
> n = new
> p = print
> w = write & quit
>
> So, basically, start with pressing p and then enter.  Make SURE this
> is the device you want to toast.
> Then, use d to delete ALL the partitions
> then, do a "w" to save it.  See if you get one of the errors telling
> you it cannot make the change.  If it gives you an error, send it to us.
>
> If you do not get an error, then you need to go back into fdisk and
> use n to create a new partition table the way you want it.   When you
> are done (press p to verify it looks like you want it to), use w to
> write it back to disk.  Again, look for any error and send it on to
> us if there is one.
>
> You can do:
> fdisk -l
> (where that is a lower-case L)
> to simply print information about the devices and the partitions they
> have.
>
>      - Tim
>
> On 8/5/2010 3:46 PM, davidm at hisfeet.net wrote:
>> I tried to check what is fdisk(8) thru google Sounds like it's not the
>> fdisk included dwith most linux packages.  Where can I get a working
>> copy
>> and directions for using it?
>>
>>
>>> It's possible that some partition on the drive is being automatically
>>> mounted.  If that's the case, then the kernel's sense of the drive
>>> partitioning is fixed until the last partition is unmounted.  This is
>>> the point where good ol' fdisk(8) mutters, "writing partition table to
>>> disc...re-reading partition table," or something thereabouts.
>>> Basically, you're screwed in such a situation until you convince the
>>> kernel to let go of the last remnant of its belief about the drive.
>>>
>>> Qparted won't have any idea that this is the problem; it will know only
>>> that the ioctl() call that attempts to read the table back gives the
>>> same result it used to have.
>>>
>>> _______________________________________________
>>> ChristianSource FSLUG mailing list
>>> Christiansource at ofb.biz
>>> http://cs.uninetsolutions.com
>>>
>>
>>
>> _______________________________________________
>> ChristianSource FSLUG mailing list
>> Christiansource at ofb.biz
>> http://cs.uninetsolutions.com
>>
>
> _______________________________________________
> ChristianSource FSLUG mailing list
> Christiansource at ofb.biz
> http://cs.uninetsolutions.com
>






More information about the Christiansource mailing list