Restoring a drive image using dd

Issues related to applications and software problems and general support
Post Reply
lightman47
Posts: 1522
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Restoring a drive image using dd

Post by lightman47 » 2022/07/17 21:06:34

I've always had great success with dd, but I did something different this time: I created an ".iso" image of a friends' laptop Windows drive (all the included partitions) to my server. It took 2 days via wrireless but completed the 512GB image successfully. I bought her a bigger nmve drive (1TB) and today (twice) tried to dd this image to the new SSD. Each time, it wrote 32GB to the new drive, then errored complaining it was out of room. It is not. I've a sneaky suspicion that what's happening is that dd encounters the end of the 1st partition within the image and 'bombs'.

Am I correct? Is there a way around this without starting all over again? The laptop doesn't have an ethernet port; apparently that's the 'norm' now. :(

Thank you.
Edit:
Oh, i use "dd bs=1M status=progress if={image path/file) of=/dev/nmve0n1;sync".

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Restoring a drive image using dd

Post by TrevorH » 2022/07/17 22:34:06

It doesn't sound very likely to me. Can you write more than 32GB to it if your source "image" is /dev/zero?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

lightman47
Posts: 1522
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Re: Restoring a drive image using dd

Post by lightman47 » 2022/07/17 23:01:53

No - 32G is where it stops. (There goes my initial theory).

Starting to suspect a bad drive.

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Restoring a drive image using dd

Post by TrevorH » 2022/07/18 00:06:14

Yes, either malfunctioning or a fake. Or... it isn't the drive you think it is?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

lightman47
Posts: 1522
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Re: Restoring a drive image using dd

Post by lightman47 » 2022/07/19 22:40:52

New nvme drive - different brand - same issue. No space left on drive. Also lsblk shows it as 1TB at nmve0n1.

I think my .iso image is the problem. I 'shortcutted' and tried to dd the entire drive (device), rather than creating separate images for the multiple partitions. I did this because it seemed easier, and her new Dell Inspiron has no ethernet port and this all had to be done over wifi (48 hours for 512 GB).

I need to think if she really needs a bigger drive in her laptop.

EDIT:
You know what - I've been using a Fedora 35 Live thumb drive to do this. I wonder if there's some buffering quirk. Tomorrow I'm going to look for an old Centos 7 live key I think I have and try it again.

lightman47
Posts: 1522
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Re: Restoring a drive image using dd

Post by lightman47 » 2022/07/27 20:30:00

DUH! Nothing I could do would make this work! After relenting and just shrinking the partition in Windows on this new Dell Inspiron, then installing RHEL 9 on the space I made, I discover Dell encrypted the drive!!!! My original "copy" was gibberish! I did get RHEL9 dual booting just fine, but cannot access the Windows 10 installation (the entire point of this whole exercise) as it is encrypted.

I am 'about done' with this until she gets infected to where I need to 'back-door' a scan with linux. Then, I (as the purchaser) will get the key from Dell then work out a way into Windows from RHEL - there's a learning experience! Perhaps I'll get the key now and store it - just in case.

Thank you.

Post Reply