Compare commits
No commits in common. "866b7553d9bc882348189c06355950391cc7c531" and "3d18a4080686ed1aad8e80f3dbbf6e2e7c448178" have entirely different histories.
866b7553d9
...
3d18a40806
|
@ -1,74 +0,0 @@
|
|||
+++
|
||||
title = "Introduction to ddrescue"
|
||||
date = "2024-12-11"
|
||||
updated = "2024-12-11"
|
||||
[extra]
|
||||
authors = ["Ydreniv"]
|
||||
+++
|
||||
|
||||
Let’s suppose one of your friends come to you with a computer issue.
|
||||
They’ve got a failing hard drive, and want to recover the data stored on their
|
||||
device.
|
||||
They are quite worried, as they have important files on it, and it’s their
|
||||
only copy.
|
||||
Of course, this would never happen to you, because you keep multiple encrypted
|
||||
backups of all your data, in multiple place.
|
||||
Only a worldwide apocalypse would get you a dataloss.
|
||||
So this definitely could *only* happen to a friend, or a family member, but
|
||||
not you.
|
||||
It would be preposterous to think otherwise.
|
||||
|
||||
So anyway, you want to copy the hard-drive.
|
||||
You quickly plug it in your computer, mount it and open the file explorer.
|
||||
But the mount takes a long time, accessing the files is very slow, and copying
|
||||
them does not always work.
|
||||
Plus, the [SMART](https://wiki.archlinux.org/title/S.M.A.R.T.) statistics show
|
||||
that this drive has *issues*.
|
||||
How do you extract the important data then ?
|
||||
By the look of it, the vast majority of the drive sectors are fine, so what
|
||||
you’re looking for still exists.
|
||||
It’s merely hard to access.
|
||||
It’s only a hardware problem.
|
||||
|
||||
If you manage to image the drive, you can then either use it as a mounted
|
||||
file, or burn it to another drive.
|
||||
You could use good old `dd`.
|
||||
Maybe this would work.
|
||||
But here, with your friend’s disk on its deathbed, you’d like a tool adapted
|
||||
for this situation.
|
||||
Here comes…
|
||||
**[ddrescue](https://www.gnu.org/software/ddrescue/)**.
|
||||
|
||||
`ddrescue` operates on unmounted devices, and will copy a device block by
|
||||
block.
|
||||
Even better, it has error handling integrated.
|
||||
When it cannot read a block, it will either retry or pass it, depending on the
|
||||
options you’ve selected.
|
||||
And, crucially, it can store its status in a file, meaning that if you stop
|
||||
the process, you’ll be able to resume it later.
|
||||
This way, you can quickly recover all easily available blocks, while still
|
||||
retaining the ability to do several passes on the failing ones.
|
||||
|
||||
I’m still a novice in `ddrescue`, so read the [Archlinux wiki
|
||||
page](https://wiki.archlinux.org/title/Disk_cloning#Using_ddrescue) to get
|
||||
specific instructions.
|
||||
The Archlinux wiki is overall pretty good, and is one of my main source of
|
||||
help on Linux, even with other distributions.
|
||||
In my experiment, it has been able to recover all the disk’s sectors, except
|
||||
for 47 of them.
|
||||
I let it run for at least 50 hours I guess (I haven’t counted) over multiple
|
||||
sessions.
|
||||
I could probably try to make more passes, to eventually recover the full disk,
|
||||
but I’m not sure it’s worth it (and even possible).
|
||||
|
||||
It’s reassuring to know that I’ve now safeguarded most of the data.
|
||||
Now that I have a mostly complete image, I’ve started trying to read them.
|
||||
Unfortunately, the missing blocks do prevent me from simply mounting the
|
||||
resulting image.
|
||||
So I’ve still gotta do some work to actually get what I wanted (copying the
|
||||
files to another drive), but at least I know that the current image is safe,
|
||||
and that there shouldn’t be further data loss.
|
||||
|
||||
So if you’re confronted with data recovery, I recommend giving `ddrescue` a
|
||||
look. It’s quite a useful tool !
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
title = "Ideas"
|
||||
template = "ideas.html"
|
||||
date = "2022-11-01"
|
||||
updated = "2024-12-12"
|
||||
updated = "2024-12-09"
|
||||
extra = { "theme" = "ideas.css" }
|
||||
+++
|
||||
|
||||
|
@ -17,12 +17,9 @@ extra = { "theme" = "ideas.css" }
|
|||
I'm not sure such a list would be truly useful, but it would be nice to have
|
||||
it, as I currently lack such an overview.
|
||||
* Take a look at [IndieWeb](https://indieweb.org/)
|
||||
* This is quite an open-ended task, a bit "unachievable".
|
||||
* I rather need to determine the specific features I want to implement.
|
||||
* Learn more about [Microformats](https://indieweb.org/microformats)
|
||||
([Microformats](https://microformats.org/wiki/microformats2))
|
||||
* `h-card` and `h-entry` have been implemented here. (`h-card` might not be
|
||||
implemented in every page.)
|
||||
* `h-card` and `h-entry` have been implemented here.
|
||||
* To be implemented on my other static websites
|
||||
* Learn about [Micropub](https://indieweb.org/Micropub)
|
||||
* Learn about [Webmention](https://indieweb.org/Webmention)
|
||||
|
@ -39,7 +36,6 @@ extra = { "theme" = "ideas.css" }
|
|||
* A
|
||||
[/feeds](https://marcus.io/blog/making-rss-more-visible-again-with-slash-feeds) page.
|
||||
* A standard Zola development base for my websites
|
||||
* I’m not sure this would really be useful.
|
||||
* [Documentation about
|
||||
self-hosting](https://unknown-artist-selfhost.frama.io/selfhost-wiki/)
|
||||
* A `/uses` page, explaining how this website works (Zola, IndieWeb etc)
|
||||
|
@ -52,10 +48,13 @@ extra = { "theme" = "ideas.css" }
|
|||
|
||||
* A page using <span style="font-family: 'Comic Sans'">Comic Sans</span>.
|
||||
* A CLI-like page (green on black).
|
||||
* A page with all kinds of blinkies, 80x15 buttons and the like. I'm already
|
||||
collecting some in the footer of this site, but I'd like a page with the
|
||||
ones I make and the other cool I find.
|
||||
* [Web Badges World](https://web.badges.world/) has some nice stuff.
|
||||
* [SH2/Buttons](https://sh2.us/buttons) too
|
||||
* Done [here](@/buttons.md)
|
||||
* Buttons for my various websites
|
||||
* Make website responsive :
|
||||
* [~ydreniv](#)
|
||||
* [Minis](https://minis.kestrels-and-roses.rocks)
|
||||
|
||||
### Miscellaneous
|
||||
|
||||
|
@ -114,17 +113,3 @@ extra = { "theme" = "ideas.css" }
|
|||
Docker reference !
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<section>
|
||||
|
||||
## Done
|
||||
|
||||
* A page with all kinds of blinkies, 80x15 buttons and the like. I'm already
|
||||
collecting some in the footer of this site, but I'd like a page with the
|
||||
ones I make and the other cool I find.
|
||||
* [Web Badges World](https://web.badges.world/) has some nice stuff.
|
||||
* [SH2/Buttons](https://sh2.us/buttons) too
|
||||
* Done [here](@/buttons.md)
|
||||
|
||||
</section>
|
||||
|
|
Loading…
Reference in New Issue