bug-ddrescue
[Top][All Lists]
Advanced

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

Re: [Bug-ddrescue] Small suggestion regarding the tutorial (in the onlin


From: Scott Dwyer
Subject: Re: [Bug-ddrescue] Small suggestion regarding the tutorial (in the online doc)
Date: Tue, 08 Oct 2013 20:12:34 -0400
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8

On 10/8/2013 3:44 PM, Iphone Recovery Online Info wrote:
One thing you may want to do is as follows: now we need to provide --force in order to allow writing to a device and not a file. In such cases, you may query the model number and serial number like smartctl does, and print them to the console, and ask for a last confirmation from the user ("Please check the model and serial numbers on the hard disks, and press Y if they are correct"). I'm not sure how can you do that in a device-independent manner though. You can find some C code to start with here: http://stackoverflow.com/questions/2432759/usb-drive-serial-number-under-linux-c


Antonio,
IF you decide to do something like this (press Y if they are correct), I have a suggestion and a request.

Suggestion:
Along with the model and serial number, also list the size in human readable form along with actual bytes (like the first line of an "fdisk -l /dev/sda" command would return).

Request:
IF you do this, PLEASE include an option flag to bypass it, for those of us that may call ddrescue from another program.

I just did a quick test on the SCSI version from that stackoverflow link, and while it seemed to work at first, putting to the test with a USB adapter did not give the proper serial number of the actual drive. Unless you can work some magic, the easiest way might be to make external calls to programs like hdparm and smartctl (after seeing if they exist first) and process the output to get the model/serial number. You would be stuck relying on an outside program, but they would be likely to give proper results as they have been around awhile.

Thanks,
Scott



reply via email to

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