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

Re: dd - proper use or more suitable program



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sat, Nov 12, 2016 at 01:25:50PM -0600, Richard Owlett wrote:
> On 11/12/2016 12:26 PM, Pascal Hambourg wrote:
> >Le 12/11/2016 à 18:22, Richard Owlett a écrit :
> >>
> >>>>ddrescue /dev/sda /mnt/defective_drive.img
> >>>>/mnt/defective_drive.log
> >(...)
> >>Can this be run as a user, or are root permissions required.
> >
> >Unless the user has read permission on the raw device, it must be
> >run as root.
> 
> I have a STRONG suspicion that by "raw device" you refer to the
> defective device which is enumerated as /dev/sdc . *ALL*
> documentation and tutorials I found make a *MAJOR POINT* of *NOT*
> mounting the defective device. "Permissions" therefor are a murky
> issue.

In this case, the permissions on /dev/sdc were meant (as opposed
to the permissions on the files whithin the file system in /dev/sdc,
which don't count in this case)

> Point of fact, the specific physical defective object
> predates me having more than casual interest in *nix.

Yes: I remember there's a DOS file system in the disk in question,
so no permissions in there anyway. But as stated above, this doesn't
matter, because you're looking at the container: access to that
is ruled by the permissions on the device file, i.e. /dev/sdc.

> There's a reason I asked for "hand holding" and specifically asked
> for tolerance.
> In a "user to user" support enviroment ther is an expectation of
> querent doing his due diligence. I tried. I failed. M'aidez s'il
> vous plait.

In a nutshell: you mount your *new* disk to a directory of your
choice (let's say /mnt). Possibly your OS is set up to do that
for you: it'll typically end then somewhere in /media/blah (for
some suitable value of "blah"). Let's use /mnt as a placeholder.

Then you insert you defective disk, which (let's say) appears
as /dev/sdc. Make sure the OS doesn't mount it automatically,
otherwise unmount yourself.

Then you do

  dd if=/dev/sdc of=/mnt/my-disk-backup bs=4096 count=1000000

(this is over-simplified: you'll probably use ddrescue instead
of dd, or at least use the option 'noerror').

An image of your disk will hopefully appear on 'my-disk-backup'.
You need read access to /dev/sdc and write access to the directory
/mnt (either by doing sudo, I'd do that or by other means).

Those steps are a rough sketch. Many details already flew back
and forth in this thread, so I didn't want to bloat the thing
too much. Feel free to ask where things are unclear.

Regards
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlgngikACgkQBcgs9XrR2kYjmACeJyeAvYCCrcfx2UuSglH7Dnvb
eg0An14EEu9c0jwQTcjF5/4bNCm9qHTV
=c2+e
-----END PGP SIGNATURE-----


Reply to: