Compare commits

..

2 Commits

Author SHA1 Message Date
ydreniv 866b7553d9 feat(blog): Add ddrescue article 2024-12-12 16:03:37 +00:00
ydreniv f71b843053 fix(ideas): Udate the ideas page 2024-12-12 13:52:24 +00:00
2 changed files with 97 additions and 8 deletions

View File

@ -0,0 +1,74 @@
+++
title = "Introduction to ddrescue"
date = "2024-12-11"
updated = "2024-12-11"
[extra]
authors = ["Ydreniv"]
+++
Lets suppose one of your friends come to you with a computer issue.
Theyve 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 its 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
youre looking for still exists.
Its merely hard to access.
Its 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 friends disk on its deathbed, youd 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 youve selected.
And, crucially, it can store its status in a file, meaning that if you stop
the process, youll 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.
Im 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 disks sectors, except
for 47 of them.
I let it run for at least 50 hours I guess (I havent counted) over multiple
sessions.
I could probably try to make more passes, to eventually recover the full disk,
but Im not sure its worth it (and even possible).
Its reassuring to know that Ive now safeguarded most of the data.
Now that I have a mostly complete image, Ive started trying to read them.
Unfortunately, the missing blocks do prevent me from simply mounting the
resulting image.
So Ive 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 shouldnt be further data loss.
So if youre confronted with data recovery, I recommend giving `ddrescue` a
look. Its quite a useful tool !

View File

@ -2,7 +2,7 @@
title = "Ideas" title = "Ideas"
template = "ideas.html" template = "ideas.html"
date = "2022-11-01" date = "2022-11-01"
updated = "2024-12-09" updated = "2024-12-12"
extra = { "theme" = "ideas.css" } extra = { "theme" = "ideas.css" }
+++ +++
@ -17,9 +17,12 @@ extra = { "theme" = "ideas.css" }
I'm not sure such a list would be truly useful, but it would be nice to have 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. it, as I currently lack such an overview.
* Take a look at [IndieWeb](https://indieweb.org/) * 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) * Learn more about [Microformats](https://indieweb.org/microformats)
([Microformats](https://microformats.org/wiki/microformats2)) ([Microformats](https://microformats.org/wiki/microformats2))
* `h-card` and `h-entry` have been implemented here. * `h-card` and `h-entry` have been implemented here. (`h-card` might not be
implemented in every page.)
* To be implemented on my other static websites * To be implemented on my other static websites
* Learn about [Micropub](https://indieweb.org/Micropub) * Learn about [Micropub](https://indieweb.org/Micropub)
* Learn about [Webmention](https://indieweb.org/Webmention) * Learn about [Webmention](https://indieweb.org/Webmention)
@ -36,6 +39,7 @@ extra = { "theme" = "ideas.css" }
* A * A
[/feeds](https://marcus.io/blog/making-rss-more-visible-again-with-slash-feeds) page. [/feeds](https://marcus.io/blog/making-rss-more-visible-again-with-slash-feeds) page.
* A standard Zola development base for my websites * A standard Zola development base for my websites
* Im not sure this would really be useful.
* [Documentation about * [Documentation about
self-hosting](https://unknown-artist-selfhost.frama.io/selfhost-wiki/) self-hosting](https://unknown-artist-selfhost.frama.io/selfhost-wiki/)
* A `/uses` page, explaining how this website works (Zola, IndieWeb etc) * A `/uses` page, explaining how this website works (Zola, IndieWeb etc)
@ -48,13 +52,10 @@ extra = { "theme" = "ideas.css" }
* A page using <span style="font-family: 'Comic Sans'">Comic Sans</span>. * A page using <span style="font-family: 'Comic Sans'">Comic Sans</span>.
* A CLI-like page (green on black). * 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 * Buttons for my various websites
* Make website responsive :
* [~ydreniv](#)
* [Minis](https://minis.kestrels-and-roses.rocks)
### Miscellaneous ### Miscellaneous
@ -113,3 +114,17 @@ extra = { "theme" = "ideas.css" }
Docker reference ! Docker reference !
</section> </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>