LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-12-2016, 01:36 PM   #1
GNewbie
Member
 
Registered: Sep 2005
Distribution: (U/K/X)buntu 6.1 (newer box) / D*mn Small Linux (older box)
Posts: 318

Rep: Reputation: 31
ddrescue problem


Hi All,

I'm trying to esstentially clone my home partition on a drive that will no longer mount due to errors. I'm using ddrescue on systemrescuecd.

I want to copy /dev/hda7 (home drive) to /dev/hdb3 (an ext4 partition on a usb hard drive).

The following code includes my command and the error I received.

Code:
root@sysresccd /root % ddrescue -d -r3 /dev/sda7 /dev/sdb3/hdbackup.img /dev/sdb3/hdbackup.log
ddrescue: Mapfile '/dev/sdb3/hdbackup.log' is not writable.
root@sysresccd /root %
Can anyone guide me in the right direction?

TIA...
 
Old 10-12-2016, 01:41 PM   #2
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-30
Posts: 5,290

Rep: Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916
this path seems wrong:
/dev/sdb3/hdbackup.log

should be something like:
/home/gnewbie/hdbackup.log
 
Old 10-12-2016, 01:43 PM   #3
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 7,231

Rep: Reputation: Disabled
/dev/sdb3 is partition, not filesystem.
 
Old 10-12-2016, 02:14 PM   #4
GNewbie
Member
 
Registered: Sep 2005
Distribution: (U/K/X)buntu 6.1 (newer box) / D*mn Small Linux (older box)
Posts: 318

Original Poster
Rep: Reputation: 31
Hi All,

Based on your feedback, I used

Code:
mkfs -t ext4 /dev/sdb3
to create a filesystem (after I unmounted sdb3) and then I remounted sdb3 with

Code:
mount /dev/sdb3 /mnt/usb-storage
I then reran the code and came up with the exact same error.

Code:
root@sysresccd /root % ddrescue -d -r3 /dev/sda7 /dev/sdb3/hdbackup.img /dev/sdb3/hdbackup.log
ddrescue: Mapfile '/dev/sdb3/hdbackup.log' is not writable.
root@sysresccd /root %
When I navigate to the /dev/sdb3 direction, it lists "lost+found/" and that's it.

How do I set up sdb3 in order for me to be able to write to it? Do I need to manually create directories on it, enable write privileges on it (if they aren't already), and the input the new path into my ddresuce command?

TIA...
 
Old 10-12-2016, 02:23 PM   #5
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-30
Posts: 5,290

Rep: Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916
Quote:
Originally Posted by GNewbie View Post
Hi All,

Based on your feedback, I used

Code:
mkfs -t ext4 /dev/sdb3
not sure where you got that advice ? (i think it pretty much deletes everything on the partition)
Quote:
Originally Posted by GNewbie View Post

to create a filesystem (after I unmounted sdb3) and then I remounted sdb3 with

Code:
mount /dev/sdb3 /mnt/usb-storage
I then reran the code and came up with the exact same error.

Code:
root@sysresccd /root % ddrescue -d -r3 /dev/sda7 /dev/sdb3/hdbackup.img /dev/sdb3/hdbackup.log
ddrescue: Mapfile '/dev/sdb3/hdbackup.log' is not writable.
root@sysresccd /root %
When I navigate to the /dev/sdb3 direction, it lists "lost+found/" and that's it.

How do I set up sdb3 in order for me to be able to write to it? Do I need to manually create directories on it, enable write privileges on it (if they aren't already), and the input the new path into my ddresuce command?

TIA...
this is probably what you want:
Code:
ddrescue -d -r3 /dev/sda7 /dev/sdb3/hdbackup.img /mnt/usb-storage/hdbackup.log
should you be playing with destructive tools like dd if you dont know how to swim yet ?
 
Old 10-12-2016, 04:10 PM   #6
GNewbie
Member
 
Registered: Sep 2005
Distribution: (U/K/X)buntu 6.1 (newer box) / D*mn Small Linux (older box)
Posts: 318

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by schneidz View Post
not sure where you got that advice ? (i think it pretty much deletes everything on the partition) this is probably what you want:
Code:
ddrescue -d -r3 /dev/sda7 /dev/sdb3/hdbackup.img /mnt/usb-storage/hdbackup.log
should you be playing with destructive tools like dd if you dont know how to swim yet ?
Hi schneidz,

Thanks for the response. sdb is brand new partition, so I wasn't worried about deleting anything on it or messing it up.

While you are correct about me not knowing how to "swim," the /home drive I'm trying to copy isn't critically important (but it would be nice to have access to a few files on it, most of it was fortunately backed up) and I'm pretty confident that the command, if wrong, would only torque hdb3 which is fine since it is empty and I could easily start over.

I presume that this...

Code:
/mnt/usb-storage/hdbackup.log
...will put the file hdbackup.log in the /mnt/usb-storage/ directory.

If true, this is not intuitive to me. But now that I think through it, /mnt/usb-storage/ **is** sdb3 (once mounted) from the standpoint of the livecd I'm using, so I think it makes sense now.

Is that about right?

BTW, thanks for the warning on dd. I know I'm over my head and I appreciate the help I get here to do something that would be extremely difficult for me to do without said help.

TIA...
 
Old 10-12-2016, 08:09 PM   #7
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-30
Posts: 5,290

Rep: Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916
Quote:
Originally Posted by GNewbie View Post
...
I presume that this...

Code:
/mnt/usb-storage/hdbackup.log
...will put the file hdbackup.log in the /mnt/usb-storage/ directory.

If true, this is not intuitive to me. But now that I think through it, /mnt/usb-storage/ **is** sdb3 (once mounted) from the standpoint of the livecd I'm using, so I think it makes sense now.

Is that about right?

...
yup, thats about rite.
this mite be worth skimming thru:
http://www.linuxquestions.org/questi...ommand-362506/

Last edited by schneidz; 10-12-2016 at 08:13 PM.
 
  


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
ddrescue RAID Toasterman Linux - Newbie 2 03-13-2015 05:35 PM
ddrescue help jhilgeman Linux - Software 2 02-13-2014 06:55 PM
ddrescue , -i and -o flags should be together ? raven4d Linux - Software 2 01-21-2013 11:06 AM
ddrescue? serialportme Linux - Newbie 1 07-12-2012 12:50 AM
Slow ddrescue recovery problem (slow reads? excessive retries?) mventimi Linux - General 4 09-22-2010 07:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:45 PM.

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
Open Source Consulting | Domain Registration