How Can I Copy Files From An Unmounted Disk?

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
User avatar
abrogard
Level 3
Level 3
Posts: 140
Joined: Mon Nov 14, 2016 5:44 pm

Re: How Can I Copy Files From An Unmounted Disk?

Post by abrogard »

I can see it.

sdc it shows up as in lsblk.

So now onto copying the data partition from the bad disk onto this.
With ddrescue, I think.

Anyone got any advice on that before I start?

:)
User avatar
ineuw
Level 5
Level 5
Posts: 825
Joined: Sun Nov 13, 2016 12:27 am
Location: Montreal, Canada

Re: How Can I Copy Files From An Unmounted Disk?

Post by ineuw »

Format it first?
Desktop: Linux Mint Cinnamon 21.3 English Edge - Desktop: Linux Mint Cinnamon 21.3 French
Laptop: Linux Mint Cinnamon 21.3 English - as of 24-04-15
User avatar
abrogard
Level 3
Level 3
Posts: 140
Joined: Mon Nov 14, 2016 5:44 pm

Re: How Can I Copy Files From An Unmounted Disk?

Post by abrogard »

That's exactly the kind of suggestion I'm looking for - you put a question mark as though you're not certain but just making a tentative suggestion but I reckon you're probably a bit tongue in cheek. right?

I'm planning to follow the technibble.com "guide to ddrescue" and it doesn't mention formatting, etc... I guess I should have assumed it from where it says 'be sure you are in the folder you intend to..... blah blah..'

But in my defence there's so much text and I'm trying to find only the bit that pertains to me...

So how do I partition and format? I was thinking ddrescue will partition to suit what I'm asking it to image: one partition, the main, data, partition off the bad drive..

And if it's doing the partitioning and then imaging there'd be no point me formatting because it all would get overwrit, wouldn't it?

But then again how can I be in that folder if it isn't created first?

But then again how can it image into an established folder which is in an established partition and has its own format?

The confusion of a novice.

So, yes, please, anyone, everyone, tell me what to do from the basics onwards... at this stage I'm very naive.

:)
User avatar
ineuw
Level 5
Level 5
Posts: 825
Joined: Sun Nov 13, 2016 12:27 am
Location: Montreal, Canada

Re: How Can I Copy Files From An Unmounted Disk?

Post by ineuw »

Not formatting means that you are planning to mirror the old disk to the new. In that case whether it's formatted or not, it doesn't matter. But, I would not do that because I am concerned about mirroring the problem as well. I would partition the new drive like the old and copy the contents.

On the other and have you also tried to switch the SATA hardware connections / cables first??
Desktop: Linux Mint Cinnamon 21.3 English Edge - Desktop: Linux Mint Cinnamon 21.3 French
Laptop: Linux Mint Cinnamon 21.3 English - as of 24-04-15
User avatar
abrogard
Level 3
Level 3
Posts: 140
Joined: Mon Nov 14, 2016 5:44 pm

Re: How Can I Copy Files From An Unmounted Disk?

Post by abrogard »

Thanks for coming back. Yes, I don't want to mirror. The disk is not important. It was a system disk but I never got finished trying to restore my preferred working set which I lost after the previous win10 crash. I can accept losing this one, too.

Just a few thousand files I'd like to get. .pdf and .cr2

So reading technibble's guide it suggests doing just that so I'm hoping to follow their instructions to do it.

I think maybe switching SATA connections is what got my new disk recognised.

But switching SATA connections on that bad disk does not good at all, on either of my machines.

So I partition 'like the old' - i.e. whatever I read as the partitions on the old in gparted I make the same partitions on the new?

And then I do the ddrescue thing and aim it at that corresponding partition on the new drive? Don't need to format anything?

p.s. is there any way you know of that I could do a quick one-line command, maybe, right now to check ahead of time if this copy routine is going to work?
User avatar
ineuw
Level 5
Level 5
Posts: 825
Joined: Sun Nov 13, 2016 12:27 am
Location: Montreal, Canada

Re: How Can I Copy Files From An Unmounted Disk?

Post by ineuw »

I am not familiar with ddrescue. First decide on how you are partitioning the disk. In my mid at least create 1 partition at the beginning. Try without formatting and it will let you know.

Just remembered that if you create a partition, it must be the first on the disk. In that case you might as well format it.
Desktop: Linux Mint Cinnamon 21.3 English Edge - Desktop: Linux Mint Cinnamon 21.3 French
Laptop: Linux Mint Cinnamon 21.3 English - as of 24-04-15
User avatar
abrogard
Level 3
Level 3
Posts: 140
Joined: Mon Nov 14, 2016 5:44 pm

Re: How Can I Copy Files From An Unmounted Disk?

Post by abrogard »

Right, well I've done that. Created one 1.8T partition on the new drive.

I'm about ready to issue the ddrescue command that should start copying from the bad to the new.

There's just one thing: the author of the guide has tailored the command for the log file to go to a usb stick.

He says you need a 'third drive' for the log file. It can't be on the source, nor on the destination. So for him that's three drives: source, destination, his usb stick for the log file.

That's because he's working off 'Parted Magic' which I think is a tool like winPE. And he can't keep the logfile there. I think he's doing that because he's working on a Windows machine. He's helping Win users out mainly.

But I'm working off a Linux Mint machine.

So I have three drives: my Linux drive, the bad drive and the new drive. I need to alter his command line to refer to my home linux drive.

Can anyone advise from their knowledge of Linux commands how I'd do that?

Here is his command line: (with my drive letters in there)

ddrescue -d -f -r3 /dev/sdb /dev/sdc /media /PNY_usb/rescue.logfile

It is that bit from /media onwards that I am not sure about.

i have the ddrescue manual just downloaded and i'll get into it and see if I can find the answer but I thought I might as well ask while I'm here... and i'll be away a few hours now, too...
User avatar
ineuw
Level 5
Level 5
Posts: 825
Joined: Sun Nov 13, 2016 12:27 am
Location: Montreal, Canada

Re: How Can I Copy Files From An Unmounted Disk?

Post by ineuw »

Just do it. If the command is wrong it'll let you know.
Desktop: Linux Mint Cinnamon 21.3 English Edge - Desktop: Linux Mint Cinnamon 21.3 French
Laptop: Linux Mint Cinnamon 21.3 English - as of 24-04-15
Locked

Return to “Beginner Questions”