[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Did v7.4 invalidate my hard drive?



Thank you for looking into this.

The drives are SATA.  There isn't much on the USB bus.  I've got testdisk analyzing the drive now.

Jim


P.S.  I don't see how it would be relevant, but I did notice Knoppix accessing both my DVD drives when I didn't think it should.  I didn't have any bootable disks in the drives at the time.  They're SATA too.



Sent from my HTC

----- Reply message -----
From: "Klaus Knopper" <debian-knoppix@knopper.net>
To: "Jim Pritchett" <jpritchett1@charter.net>
Cc: <debian-knoppix@lists.debian.org>, <debian-knoppix@knopper.net>
Subject: Did v7.4 invalidate my hard drive?
Date: Thu, Aug 7, 2014 5:01 PM

Hello Jim,

On Thu, Aug 07, 2014 at 01:52:42PM -0500, Jim Pritchett wrote:
> Hi,
>       this is what happened.  I redownloaded v7.4.0 and burned it to
> a DVD.  I booted from that and used the flash install icon on the
> desktop to make a Knoppix USB stick.  I booted from that and it
> seemed to be fine.  Everything seemed to be fine except that it
> didn't see my 2 TB windows drive.  I didn't really think about that
> at the time.  Everything seemed to be ok.  Then I rebooted Windows
> Vista and the 2 TB drive wasn't there.  After a bit of
> investigation, I booted my old v7.0.5 USB stick and ran gparted.  My
> 2 TB drive now shows up as unallocated.
> 
> Since I didn't really do anything else, I'm guessing that the USB
> flash script somehow stepped on my HD partition table.  I didn't
> find any errors with gparted.  It just shows up unallocated.  I'm
> going to back up the entire drive using DD before I try to repair
> the partition table.

You really made me worry, but I double-checked the script (you may want
to look at it as well) /usr/bin/flash-knoppix.

>From the beginning, the variable $FLASH is filled with what the user
choses in the first dialogs, that variable is consistently used for all
disk operations, also partition-based ones by "${FLASH}1" and such. No
other disks are touched. So, I can rule out an error related to wrong
disk choice or the script accidentially overwriting a disk other than
the selected one.

In the mode "repartition the USB disk and erase all data" (with 2
warnings before it actually does something), the master boot record of
the chosen device is cleared:

 dd if=/dev/zero of="$FLASH" bs=4M count=1 >/dev/null 2>&1

this would be the only place where, when interrupted afterwards, the
script would leave the USB flash disk in an unpartitioned/unallocated
state. However, as you can see, the $FLASH variable is also used here
and contains only the disk you selected.

All other operations also go to that disk.

Now, there is one condition related to hardware problems that I can
think of, which could cause the wrong disk to be worked on. If you plug
in too many devices on the same USB bus, a "current overload" can happen
(look into dmesg!), which causes the USB port to be reset and all
devices get rescanned and renumbered. At that point, your 1TB disk could
take the place that was formerly used for the USB flash disk. Chances of
this happening in the few milliseconds between disk operations are very,
very low, though. The script assumes that you do NOT remove or replug
the disk that you had chosen at the beginning when proceeding.

I checked the flash installer several times with a 1TB and a 2TB disk
attached to a powered USB hub where also 4 USB sticks were
flash-knoppix'ed at the same time, and never had them influence any of
the harddisks. So I can rule out a systematic error.

> I would appreciate any advice on the best way to fix this.

If for some reason which I don't connect to flash-knoppix, the partition
table got overwritten, you can try to fix it with "testdisk" by scanning
the disk for lost partitions and adding them to a new partition table
(checking with the internal file browser), or at least rescue data to a
different volume.

Please let me know if you find an explanation for the disk being
changed.  I don't think that there is a systematic error in
flash-knoppix that could be involved.

Regards
-Klaus Knopper


-- 
To UNSUBSCRIBE, email to debian-knoppix-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: [🔎] 20140807220110.GB20052@knopper.net">https://lists.debian.org/[🔎] 20140807220110.GB20052@knopper.net


Reply to: