LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-24-2007, 07:56 AM   #1
pieper
LQ Newbie
 
Registered: Mar 2007
Location: St. Petersburg, Russia
Posts: 16

Rep: Reputation: 0
What are the proper disc permissions for ddrescue?


I am trying to rescue a 200 GB USB hard-drive on my mac using ddrescue. After many sleepless nights, I have found a ddrescue script that works for mac:

http://www.linuxquestions.org/questi...t=ddrescue+iso

ddrescue -v /dev/rdisk1 /myfolder/foo.dmg


In all my reading I remember seeing the advice to be careful about IO? (ISO?)settings and R/W permissions. I can't find those warnings and am now wondering if I need to change permissions or other settings.

typing:
ls -l /Volumes

reveals:
drwxr-xr-x 3 root admin 102 Mar 24 13:48 Samsung 186 GB

Can anyone tell me if my ddrescue script and permissions are correct. What are the IO? (ISO?) concerns?

...Also...

I am able to compile a .dmg/.iso on a working HD, but after starting ddrescue on the bad HD there is no action. All numbers remain at zero. I only left ddrescue running for about 5 or 10 minutes and remembered the above mentioned warnings.

I noticed many scripts for ddrescue that could be used on bad disks (i.e. for raw data recovery). Is there a better script for my situation?

If anyone could offer advice it would be greatly appreciated
 
Old 03-24-2007, 08:54 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
I don't have a mac, so I don't know where packages install documentation. On linux, there are help files in /usr/share/doc/packages/ddrescue/. One of them mentions dd_rhelp, which is a script that runs ddrescue and first tries to copy the entire disk, and if there are bad areas on the disk, goes back and retries them. Some areas may be impossible to rescue, but letting the script go on for a long time may maximize the data rescued.

Quote:
What is dd_rhelp ?
-----------------

dd_rhelp is a bash script that handles a very usefull program written in C by
Kurt Garloff which is called dd_rescue, it roughly act as the dd linux command
with the caracteristic to NOT stop when it falls on read/write errors.

This makes dd_rescue the best tool for recovering hard drive having bad
sectors. (dd_rescue can be found : http://www.garloff.de/kurt/linux/ddrescue )

But using it is quite time consuming. This is where dd_rhelp come to help.

In short, it'll use dd_rescue on your entire disc, but will try to gather the
maximum valid data before trying for ages on badsectors. So if you leave
dd_rhelp work for infinite time, it'll have the same effect as a simple
dd_rescue. But because you might not have this infinite time (this could
indeed take really long in some cases... ), dd_rhelp will jump over bad
sectors and rescue valid data. In the long run, it'll parse all your device
with dd_rescue.
You can Ctrl-C it whenever you want, and rerun-it at will, it'll resume it's
job as it depends on the log files dd_rescue creates.

In addition, progress will be shown in a ASCII picture of your device beeing
rescued.

As stated by Kurt Garloff for his dd_rescue program :
"Just one note: It does work. I unfortunately did not just create this program
for fun ..."

As it is for dd_rhelp, which has saved me YEARS on my hard drive.

If you have ddrescue, you should have dd_rhelp.

About the permissions, you need to be root or admin to read the device. If you do that, you should be OK.
The dd command reads the device rather than files in a mounted partition.

Last edited by jschiwal; 03-24-2007 at 08:55 AM.
 
Old 03-24-2007, 08:56 AM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
I'm sorry, I just realized that I was looking at dd_rescue instead of ddrescue. The package was named ddrescue, but they may be different programs.

I've noticed that there are more postings on the site from MAC users. Is this site becoming more popular with MAC users, are is the MAC gaining market share? Hmmm!

Last edited by jschiwal; 03-24-2007 at 09:03 AM.
 
Old 03-24-2007, 12:48 PM   #4
pieper
LQ Newbie
 
Registered: Mar 2007
Location: St. Petersburg, Russia
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jschiwal
I've noticed that there are more postings on the site from MAC users. Is this site becoming more popular with MAC users, are is the MAC gaining market share? Hmmm!
I love my Mac, but if I were back in the States with unlimited Internet access, I would have already downloaded and partitioned a copy of Linux. It is easy to find Linux help and material, but I have struggled to locate the same quality and number of resources for Mac's Unix. (Oh, that last comment will probably get me some hate mail.) It took several days for this dumb bunny to find out that Linux's /dev/disk1 is /dev/rdisk for my Mac's terminal. Speaking of which, is there a list of Linux to Mac (or vice versa)


Quote:
Originally Posted by jschiwal
I'm sorry, I just realized that I was looking at dd_rescue instead of ddrescue. The package was named ddrescue, but they may be different programs.
Thanks for the tip. I am aware that there is a difference. What that difference is - is not exactly clear.

Can you tell me if my permissions for the source disk are safe - or am I at risk of losing data?

drwxr-xr-x 3 root admin 102 Mar 24 13:48 Samsung 186 GB
 
Old 03-26-2007, 03:34 AM   #5
pieper
LQ Newbie
 
Registered: Mar 2007
Location: St. Petersburg, Russia
Posts: 16

Original Poster
Rep: Reputation: 0
Oh thank goodness! My troubles are over! A new enclosure did the trick and all my data is safe! For those having trouble with an ext. Hard-drive, try a new enclosure, even if your old one works with other HD's. My old enclosure worked with one of my HDs but stopped working with the other one. Go figure! I placed the failing HD in the freezer over night and then in a new box and she mounted right up. During the process of transferring that data to a healthy HD in that old enclosure there were a couple instances when that old box stopped.

The positive side to all this...I have learned that the terminal can be our friend and Unix isn't so scary after all. I found a copy of Knoppix 5.1.1 in a computer store today and loaded it onto my Powerbook's Virtual PC 7...now if I can only figure out how to make it recognize my mouse!
 
Old 03-26-2007, 04:41 AM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
One of my favorite webcasts is Security Now with Steve Gibson. He mentioned how some drives run very hot. Someone running his disk recovery utility ran it with the drive sitting in the refrigerator. A freezer may be taking things to far. Once at work, a baffle malfunctioned in our head end. The temperature dropped to around 20 below zero. The raid drives failed. After letting them warm up, we were able to run a utility that marked the drives as OK and the array worked.

The permissions on the samsung volume has the owner of root with full permissions and admin with read and execute permissions. That is probably the MAC standard so I wouldn't make any changes. On my /home partition for example, the owner and group are both root, but the subdirectories belong to the repective owners.

The dd command and ddrescue commands are usually used on the devices. I'm not familiar with MAC vernacular, but a volume looks like what I would call a partition. Sometimes it is used for a raid or lvm group.

While the package I looked at was dd_rescue, the documentation was in a directory named ddrescue, so I think that was what caused the confusion. The dd_rhelp script does look interesting. It was written to avoid the same problem that you were seeing.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Reading Files on a CD/DVD-ROM without proper permissions meb495 Linux - Newbie 9 02-03-2007 03:18 PM
proper permissions for /var ? rcorkum Slackware 3 12-08-2006 04:10 PM
Getting my fstab to give proper permissions Esmo2000 Linux - Newbie 3 11-10-2004 01:21 PM
Proper use of permissions ? wmcase Linux - General 4 02-04-2004 04:41 PM
'Proper' file and directory permissions etherdeath Linux - General 5 03-02-2003 04:24 AM


All times are GMT -5. The time now is 01:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration