bug-ddrescue
[Top][All Lists]
Advanced

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

Re: [Bug-ddrescue] Handling drives that have broken partition table?


From: Scott Dwyer
Subject: Re: [Bug-ddrescue] Handling drives that have broken partition table?
Date: Sun, 7 Feb 2016 15:17:32 -0500
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1

I would like to add some information that is specific to Linux. When Linux detects a drive it will try to read data the it deems important, such as sector 0 and then seemingly information about every partition that is listed in the partition table and who knows what other data it thinks it needs. If there are read errors in any of this data it can cause Linux to lock up for several seconds or longer, but then it will give up. But Linux can still deal with a drive with bad sectors in any of those areas. You can still read from a drive that has a bad sector 0.

The issue happens because one or more of the sectors is bad in a way that causes the drive to go into device fault. When a drive goes into device fault, it will not respond to any commands until it is power cycled (technically the drive will respond with an error with a bit set indicating a device fault). And Linux seems to get stupid when a drive is in device fault. Even passthrough commands will return data of all zeros with no error reported. This is why it appears that a drive seems to disappear and needs to be power cycled to be found again. So if any of the data that Linux thinks it needs when it first sees a drive reads a sector that causes a device fault, the drive can never be read by normal means like ddrescue.

There is a way to hide (disable) a drive at the boot of Linux so that it is not read at all, but this makes it so the drive does not show up at all and therefore is not an option for any normal access operations. So there are a couple possibilities. The first is that someone figures out how to keep Linux from reading the data that it needs when it detects a drive while still keeping it available as a device. The second option is to figure out how to access a drive that is hidden (disabled). Good luck :)

On 2/6/2016 10:15 PM, Paul Daniels wrote:
Sorry, I should have been more specific about the particular situation that arises.

When sector-0/partition-table is physically damaged and non-recoverable it sometimes causes the drive to "offline" itself when you try to read it, as such you can never recover these drives with ddrescue+linux because linux will attempt to read that partition table each time you power the drive up.

What would be nice is if there was an overlay facility/magic in linux where, if you already had a copy of the data in that area (or even just fake), you could make linux read the partition/data from the image/clone and switch to the real drive for other areas.

Hope that clears matters up.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]