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

Tim Young Tim.Young at LightSys.org
Fri Aug 6 14:55:32 CDT 2010


  Ok.  So after the dd and fdisk, you rebooted and then formatted?
Basically, that means that the partitioning is probably not the 
problem, in that it held for at least one reboot.

You said:

After formatting, I tried to write that to the table using Gparted, and
immediately lost all formatting.

I do not understand what you meant by this.  Formatting should not 
"be written to the table".

So, let's add a formatting step to what we have done.

I would do the quick version of dd (with the bs=512 count=1024).  All 
you need to zero out is the partition information at the beginning of 
the disk.

Then do fdisk, just like you had done.

Finally, before rebooting, let's format it like this:

mke2fs -j /dev/sda1

The above statement says to make an e2fs (the -j turns it into an 
e3fs) on the partition /dev/sda1.  This is basically a format.  Linux 
does an excellent job with the fdisk where 98% of the time it does 
not need to be rebooted after a repartition.  So we can go 
immediately from fdisk to mke2fs without rebooting.

After the format, still do not reboot, and let's try to mount the drive.
mkdir -p /mnt/tmp
mount /dev/sda1 /mnt/tmp

Then, let's make a file on the disk.
echo "This is a listing of my drive" > /mnt/tmp/myfile.txt
find / >> /mnt/tmp/myfile.txt

That should take a few seconds to run.  Now, let's reboot.
Still boot off your CD, do not do anything with gparted.  What we 
want to do is to see if you can mount the drive and read the file.
mkdir -p /mnt/tmp
mount /dev/sda1 /mnt/tmp
ls /mnt/tmp
less /mnt/tmp/myfile.txt

If this works, then the drive is fine, and it it is something else 
that is causing the data to be destroyed.

     - Tim

On 8/6/2010 11:46 AM, davidm at hisfeet.net wrote:
> 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.
>




More information about the Christiansource mailing list