All of lore.kernel.org
 help / color / mirror / Atom feed
* Fix partition order killed my hard drive (twice)
@ 2015-04-13 10:11 Sergey Zolotarev
  2015-04-13 10:27 ` Ruediger Meier
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Sergey Zolotarev @ 2015-04-13 10:11 UTC (permalink / raw)
  To: util-linux

Hello,

Is it possible that fdisk could damage / kill a hard drive after using the "Fix partition order" command? It seems that that is exactly what happened to me two times already, with two different hard drives. 

First time I thought that it was my hard drive's fault as it was pretty old and cheap, So I bought a new not-so-cheap one and was quite happy with until today, when I used that evil command again!

Both of HDDs seem unrecoverable. When either is plugged BIOS gets stuck at initial screen (can't even enter setup). Using a USB adapter didn't help either... I'm not an expert in hard drives, but could it be the result of a corrupted / bad sector in the place where the partition table is stored? 		 	   		  

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Fix partition order killed my hard drive (twice)
  2015-04-13 10:11 Fix partition order killed my hard drive (twice) Sergey Zolotarev
@ 2015-04-13 10:27 ` Ruediger Meier
  2015-04-14  2:53   ` Dale R. Worley
  2015-04-13 10:31 ` Karel Zak
  2015-04-13 13:58 ` Peter Cordes
  2 siblings, 1 reply; 6+ messages in thread
From: Ruediger Meier @ 2015-04-13 10:27 UTC (permalink / raw)
  To: Sergey Zolotarev; +Cc: util-linux

On Monday 13 April 2015, Sergey Zolotarev wrote:
> Hello,
>
> Is it possible that fdisk could damage / kill a hard drive after
> using the "Fix partition order" command?

I remember there was such bug in past. Which version are you using?
$ fdisk -V

> It seems that that is 
> exactly what happened to me two times already, with two different
> hard drives.
>
> First time I thought that it was my hard drive's fault as it was
> pretty old and cheap, So I bought a new not-so-cheap one and was
> quite happy with until today, when I used that evil command again!
>
> Both of HDDs seem unrecoverable. When either is plugged BIOS gets
> stuck at initial screen (can't even enter setup). Using a USB adapter
> didn't help either... I'm not an expert in hard drives, but could it
> be the result of a corrupted / bad sector in the place where the
> partition table is stored?

First I would try to boot via rescue CD or similar. 
Then check how the partitiontable looks now (fdisk -l) and try to mout 
partitions manually. If you are missing partitions or if you just can't 
mount them then you may try to repair/recover the partition table.  

cu,
Rudi

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Fix partition order killed my hard drive (twice)
  2015-04-13 10:11 Fix partition order killed my hard drive (twice) Sergey Zolotarev
  2015-04-13 10:27 ` Ruediger Meier
@ 2015-04-13 10:31 ` Karel Zak
  2015-04-13 13:58 ` Peter Cordes
  2 siblings, 0 replies; 6+ messages in thread
From: Karel Zak @ 2015-04-13 10:31 UTC (permalink / raw)
  To: Sergey Zolotarev; +Cc: util-linux

On Mon, Apr 13, 2015 at 04:11:05PM +0600, Sergey Zolotarev wrote:
> Is it possible that fdisk could damage / kill a hard drive after
> using the "Fix partition order" command? It seems that that is
> exactly what happened to me two times already, with two different
> hard drives. 

Do you really believe that write some bytes to HDD may destroy the
device? I don't think so. 

fdisks-like utils just write some data to the device, nothing else.
You can replace it by dd(1) or "echo 'something' > /dev/sda"...

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Fix partition order killed my hard drive (twice)
  2015-04-13 10:11 Fix partition order killed my hard drive (twice) Sergey Zolotarev
  2015-04-13 10:27 ` Ruediger Meier
  2015-04-13 10:31 ` Karel Zak
@ 2015-04-13 13:58 ` Peter Cordes
       [not found]   ` <DUB119-W317EAA79F1829FA13DAEA6B4E60@phx.gbl>
  2 siblings, 1 reply; 6+ messages in thread
From: Peter Cordes @ 2015-04-13 13:58 UTC (permalink / raw)
  To: Sergey Zolotarev; +Cc: util-linux

On Mon, Apr 13, 2015 at 04:11:05PM +0600, Sergey Zolotarev wrote:
> Hello,
> 
> Is it possible that fdisk could damage / kill a hard drive after using the "Fix partition order" command?
> [...]
> Both of HDDs seem unrecoverable.

 It's probably not the drive that's bad, it's just that your BIOS
won't boot when it's attached.  So boot without, THEN connect it via a
USB adapter.  Or via SATA.  (SATA is electrically safe to hotplug,
thanks to having the ground pins longer than any others, and Linux
handles it just as well as USB.  I never reboot to swap hard drives.
I only reboot to check that my system still boots if I've done
anything that might put that in doubt :P)

 Or set your BIOS to not even look at USB devices while booting.

> could it be the result of a corrupted / bad sector in the place where the partition table is stored?

 A badly-written BIOS could certainly have it's boot-sector detection
code get stuck in an infinite loop with unexpected inputs.  There's no
reason to believe the data read from the sector is anything other than
what fdisk wrote to it.  You can check with smartctl -a /dev/sdX once
you get it connected to a booted-up computer.

-- 
#define X(x,y) x##y
Peter Cordes ;  e-mail: X(peter@cor , des.ca)

"The gods confound the man who first found out how to distinguish the hours!
 Confound him, too, who in this place set up a sundial, to cut and hack
 my day so wretchedly into small pieces!" -- Plautus, 200 BC

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Fix partition order killed my hard drive (twice)
  2015-04-13 10:27 ` Ruediger Meier
@ 2015-04-14  2:53   ` Dale R. Worley
  0 siblings, 0 replies; 6+ messages in thread
From: Dale R. Worley @ 2015-04-14  2:53 UTC (permalink / raw)
  To: Ruediger Meier; +Cc: szx, util-linux

Ruediger Meier <sweet_f_a@gmx.de> writes:
> First I would try to boot via rescue CD or similar. 
> Then check how the partitiontable looks now (fdisk -l) and try to mout 
> partitions manually. If you are missing partitions or if you just can't 
> mount them then you may try to repair/recover the partition table.  

If your partition table is damaged, it's possible to scan the disk
looking for the "magic numbers" that signal the start of partitions, and
reconstruct where the partitions are using that information.  (I've done
it myself.)

Dale

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: Fix partition order killed my hard drive (twice)
       [not found]     ` <20150418034306.GF3933@cordes.ca>
@ 2015-04-18  6:25       ` Sergey Zolotarev
  0 siblings, 0 replies; 6+ messages in thread
From: Sergey Zolotarev @ 2015-04-18  6:25 UTC (permalink / raw)
  To: Peter Cordes; +Cc: util-linux

> If you redo the steps that messed it up, does it mess it up again?
> Or, do you know what the steps were and have a copy of the messed up
> table? Without one or the other, it's probably going to be hard to
> debug.

I have a backup.log created by testdisk for the messed up version, would it be sufficient? The steps were

1. fdisk /dev/sda
2. enter expert mode
3. fix partition order
4. write partition table
5. exit

I'll try to re-create the same bug on my first hard drive (already copied everything from there).
 		 	   		  

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-04-18  6:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-13 10:11 Fix partition order killed my hard drive (twice) Sergey Zolotarev
2015-04-13 10:27 ` Ruediger Meier
2015-04-14  2:53   ` Dale R. Worley
2015-04-13 10:31 ` Karel Zak
2015-04-13 13:58 ` Peter Cordes
     [not found]   ` <DUB119-W317EAA79F1829FA13DAEA6B4E60@phx.gbl>
     [not found]     ` <20150418034306.GF3933@cordes.ca>
2015-04-18  6:25       ` Sergey Zolotarev

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.