91 lines
6.4 KiB
Plaintext
91 lines
6.4 KiB
Plaintext
|
|
Episode: 11
|
||
|
|
Title: HPR0011: dd_rhelp
|
||
|
|
Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr0011/hpr0011.mp3
|
||
|
|
Transcribed: 2025-10-07 10:16:44
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
.
|
||
|
|
Hello and welcome to this episode of Hack and Public Radio with your host, Operator.
|
||
|
|
This episode is going to be over DD underscore rescue and DD underscore our help,
|
||
|
|
which is a helper script for DD rescue.
|
||
|
|
And DD underscore rescue is not to be confused with DD rescue.
|
||
|
|
So here, from here on out, when I say DD rescue, I'm referring to DD underscore rescue.
|
||
|
|
So first off, what state does a drive have to be in?
|
||
|
|
You have a drive that picked up by the BIOS first off.
|
||
|
|
It needs to be at least picked up by the BIOS and that something can talk to it.
|
||
|
|
Be it hopefully, if it's an NTFS partition, windows can at least mount the drive as a readable drive
|
||
|
|
and see the partitions.
|
||
|
|
Or secondly, you can use something like F is to be able to display inside of units Linux
|
||
|
|
what the partition information is and see if you can at least pull that much off of it.
|
||
|
|
So the setup I have is IDE zero or the first IDE is the CD-ROM and second unslave
|
||
|
|
is going to be the backup drive.
|
||
|
|
And then that lead the other IDE channel open to I put the backup drive that I'm going to drive.
|
||
|
|
I'm going to actually image the bad drive and then the drive that's known good that I'm going to image two,
|
||
|
|
which is going to be the same size or larger, that's going to be the secondary.
|
||
|
|
So this will allow you to once you've actually made a good image of the drive,
|
||
|
|
you can go ahead without rebooting anything and push that image straight on to your known good drive.
|
||
|
|
Along with this, I've got the laptop to IDE and also the SATA IDE converter plugged into that same chain.
|
||
|
|
So if I need to do any of that prior, then it'll all be set up good to go.
|
||
|
|
Also, you'll want to, if you can format the drive, you're going to put the image on to something Unix Linux compatible,
|
||
|
|
EXT3 or UFS, whatever.
|
||
|
|
This will work a little bit better as far as mounting it and then we'll have to worry about closing it or cross-platform stuff.
|
||
|
|
So the drive's picked up, you've got everything set up.
|
||
|
|
And the first thing you want to notice is check FDisk or whatever partition manager you want to use.
|
||
|
|
And look and see where your partition started and where they stopped and things like that.
|
||
|
|
So this way, if you have to, you can just back up from the beginning.
|
||
|
|
You can back up the actual partitions and master boot record and all that good stuff before you start to actually touch the disk.
|
||
|
|
Next thing is, it's going to take some time.
|
||
|
|
Just depending on how bad the drive is, where the bad parts are, how often they are, how slow it is, transfer rate, how big the drive is.
|
||
|
|
160 gig drive took at right at about three days to make an image of.
|
||
|
|
And probably it's a total of four days to once restoration and putting it on the new drive.
|
||
|
|
So, easiest thing, I use a live CD called G-Parted.
|
||
|
|
It's similar to a commercial version of partition magic.
|
||
|
|
And also a USB stick with a few noted items on there about different things where boot sectors are.
|
||
|
|
Then just notes I have on the USB stick.
|
||
|
|
And also, I have the DD underscore R help, which is also in the show note.
|
||
|
|
And this is what the cast is mainly going to be about.
|
||
|
|
The helper application for DD rescue called DD underscore R help.
|
||
|
|
Like I said, I had no problems running it off of G-Parted live distribution, off of a thumb drive.
|
||
|
|
Once you've verified that you're riding to the right disk and trying to read from the right bad disk or known disk with errors on it.
|
||
|
|
You'll see the basic command line options for DD underscore R help.
|
||
|
|
Just pretty much the same thing as DD rescue, except there's a few other switches for it.
|
||
|
|
The first thing is it will automatically create a log file.
|
||
|
|
And this log file is sort of kind of hard to read at first.
|
||
|
|
But essentially, if you read the documentation and the FAQ and everything for DD underscore R help,
|
||
|
|
it'll tell you exactly what it's doing, what it's doing in the log files.
|
||
|
|
And it'll be a little bit clearer, good, you know, halfway into it.
|
||
|
|
You'll understand how it works.
|
||
|
|
Mainly, you're going to look through FDISC and see how big the partition is or disk is that you're copying.
|
||
|
|
How many blocks it has total?
|
||
|
|
From there, you'll be able to read where DD rescue is at any given time and how much it's actually copied.
|
||
|
|
If it goes from one end to the disk to the other, it will show the image will show a full size of the actual disk.
|
||
|
|
Being as that, it's skipping over parts that it kind of fails at.
|
||
|
|
It's going to display kind of a false information that's, oh, my disk is completely backed up.
|
||
|
|
No, what you want to do is read the log files and look for a line called EOS in caps.
|
||
|
|
This will tell you where DD underscore R help is at how much it's, how many blocks it's copied or at least tried to copy,
|
||
|
|
and all that good stuff.
|
||
|
|
And after a while, you'll see something inside of the log and also from the actual command line, you'll see bar.
|
||
|
|
And it'll detects representation of where it's at on the disk.
|
||
|
|
At first, basically, you'll see a bunch of dots.
|
||
|
|
And as it goes over, they'll turn it to x's.
|
||
|
|
So the dots are not parsed.
|
||
|
|
Jump points are going to be stars.
|
||
|
|
And parsed is means parts that it's already tried to go over or has gone over.
|
||
|
|
And how it works, if you go to the documentation, it starts off, hits an error, skips a little bit,
|
||
|
|
and then once it's gone through the whole disk, it goes back and picks the biggest chunk that it missed.
|
||
|
|
Starts in the middle and goes from the middle to the left to the middle to the right, meaning from the middle reverse and from the middle forward.
|
||
|
|
And I will leave some, in the show notes, I'll leave some example of the bar output.
|
||
|
|
So you'll kind of see what it looks like further down the road.
|
||
|
|
Also, there's some other things I didn't have to do, tweak any settings.
|
||
|
|
But you can do things like disable or enable DMA to make things go faster or slower.
|
||
|
|
The whole idea of DD underscore our help is to make the process faster.
|
||
|
|
And instead of sitting there, then, for on the same, you know, 500 blocks, it's going to skip over those portions and come back to it later.
|
||
|
|
So this utilizes the time that it takes to run a full DD rescue scan or DD scan or copy.
|
||
|
|
Pretty much wraps up this episode of Packer Public Radio.
|
||
|
|
Anybody has any questions about the episode or any other previous episodes?
|
||
|
|
You can contact me from the website, and I will try and help you. That's like it.
|
||
|
|
Thank you for listening to Packer Public Radio.
|
||
|
|
We are sponsored by caro.net. So head on over to caro.nc for all the hopes and needs.
|
||
|
|
Thanks for watching.
|