LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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-16-2020, 05:59 PM   #1
comcastuser
Member
 
Registered: May 2004
Posts: 189

Rep: Reputation: 22
ddrescue 1tb drive to 2tb drive?


I have a dying MBR-based 1tb drive with 4 partitions (system recovery, Windows, some unknown one and a 2mb spare) that I want to move to a new 2tb drive.

How would I pull this off? Would I just do

ddrescue -vv -d -r 3 /dev/sdx /backupfile.img ~/backup.log

and then

ddrescue -vv -f /backupfile.img /dev/sdx ~/restore.log?

?

What would I do next to make sure it will boot on the Windows laptop?
 
Old 10-16-2020, 11:18 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,140

Rep: Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123
Why not directly disk to disk ?.

As for getting Windows to behave, simply point the BIOS to it - or remove the first (dodgy) disk.
 
1 members found this post helpful.
Old 10-17-2020, 01:00 AM   #3
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,837
Blog Entries: 1

Rep: Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071
Quote:
Originally Posted by syg00 View Post
Why not directly disk to disk ?
Directly is the only way I've ever used ddrescue.
 
Old 10-17-2020, 10:44 AM   #4
comcastuser
Member
 
Registered: May 2004
Posts: 189

Original Poster
Rep: Reputation: 22
Quote:
Originally Posted by syg00 View Post
Why not directly disk to disk ?.

As for getting Windows to behave, simply point the BIOS to it - or remove the first (dodgy) disk.
I'd have to have a second enclosure, which I don't want to wait for. And I want an image backup, too. How do I point the bios to it? Bios is supposed to see the partitions right off, correct?
 
Old 10-17-2020, 12:37 PM   #5
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,988

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
I would make the initial disk image with clonezilla instead of using dd:

https://clonezilla.org/clonezilla-live-doc.php

And also restore using clonezilla as well. When setting up the options in clonezilla, just be sure to select the option to copy the bootloader. I've always found clonezilla to be easier to use and much faster that using dd utilities.
 
Old 10-17-2020, 05:04 PM   #6
comcastuser
Member
 
Registered: May 2004
Posts: 189

Original Poster
Rep: Reputation: 22
Quote:
Originally Posted by kilgoretrout View Post
I would make the initial disk image with clonezilla instead of using dd:

https://clonezilla.org/clonezilla-live-doc.php

And also restore using clonezilla as well. When setting up the options in clonezilla, just be sure to select the option to copy the bootloader. I've always found clonezilla to be easier to use and much faster that using dd utilities.
Okay, will it work on the resulting dd image file? I've already created the dd image file of that disk and would not want to try to draw data off that dying drive again.
 
Old 10-18-2020, 08:31 AM   #7
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,988

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
Quote:
Okay, will it work on the resulting dd image file?
I doubt it but I don't know for sure as I haven't researched it. If you've already imaged the drive with dd, I would continue with dd to write to your new drive. The image that you created should have the included the bootloader and your new drive should boot. Give it a try; you've got nothing to lose. It will either boot or it won't. If not, you may be able to use some windows tool to restore the bootloader. If successful, your windows OS will only see 1TB of your 2TB drive. You can correct that by using a partitioning tool like gparted to enlarge existing partition(s). How you do that will depend on your partition layout and your needs.

If nothing works with your dd image, and you have either a Western Digital or Seagate hard drive as either your old or new drive, both have imaging utilities on their websites for free that can image your drive. These utilities are stripped down versions of Acronis TrueImage which is an excellent imaging application for windows.
 
Old 10-19-2020, 01:11 AM   #8
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,837
Blog Entries: 1

Rep: Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071
Quote:
Originally Posted by comcastuser View Post
Bios is supposed to see the partitions right off, correct?
BIOS only sees disks, not partitions. With an eSATA connection it might take some BIOS futzing to make seeing the disk happen. I never boot with a USB connected disk, so I'm not sure what to expect the BIOS to find or report, but probably it should be found unless the PC is truly ancient.

If the 2TB happens to be a 2.5" SSD, an "enclosure" isn't required, just a dongle, like this.
 
Old 10-20-2020, 05:23 PM   #9
comcastuser
Member
 
Registered: May 2004
Posts: 189

Original Poster
Rep: Reputation: 22
It appears that I made some mistake with ddrescue on my first try with imaging my drive. ddrescue created a perfectly functional copy of my failing 4-partition 1tb MBR'd drive onto the 2tb backup on my last attempt.

sudo ddrescue -vv -d -r 3 /dev/sdx laptopwindows.img ~/ddrescue-laptopwindows.log

then

sudo ddrescue -vv -f laptopwindows.img /dev/sdx ~/restorewindows.log

Then gparted to format the remaining 1tb partition and it booted right up in my laptop!
 
Old 10-20-2020, 07:16 PM   #10
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Quote:
Originally Posted by comcastuser View Post

Then gparted to format the remaining 1tb partition and it booted right up in my laptop!
I believe ddrescue probably performs the same as dd in that it copies bit by bit everything from the source to the destination. What you likely ended up with before the gparted step was an exact copy of the original disk, partition sizes, etc. and no access to the remainder of the 2TB drive.

I have seen that same effect many times when using dd to copy the live boot image to a USB stick. An 8GB stick looks like ~2GB because that was the size of the iso.

If you don't want the hassles of recovering the hidden portion of your drives you should use something like clonezilla or equivalent. Those only copy the data and restore the partitions without making the new drive look exactly like the old drive.
Saves a lot of copy time and headaches in repartitioning. I remember using a norton utility that did the same, and when doing the restore you had the option to resize the partitions during the restore.
 
  


Reply



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
Most efficient way to back up, then sync, one 2TB drive to another 2TB drive (ubuntu) eco_bach Linux - Newbie 3 01-09-2017 05:01 PM
[SOLVED] I have a SSD a 500GB drive and a 2TB drive and want to move Ubuntu from 500GB to SSD greatormesby Linux - Newbie 12 07-06-2015 09:58 AM
ddrescue running slow after 1TB turkvu Linux - Software 7 09-16-2013 07:41 PM
Hard drive upgrade from 1TB to 2TB carneyc Linux - Hardware 4 06-16-2011 10:04 AM
Why is my 3.1TB array only showing up as 1.2TB? BrianK Linux - General 4 06-13-2006 10:32 PM

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

All times are GMT -5. The time now is 01:27 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