-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ Add blog post for partition recovery
- Loading branch information
1 parent
e138377
commit 099db12
Showing
6 changed files
with
44 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
layout: layouts/post.html | ||
title: 💾 Recovering Files from a Corrupt Linux Partition | ||
meta: | ||
desc: How to recover files from a corrupt Linux partition | ||
tag: | ||
date: 2022-11-18 | ||
intro: | ||
title: Recovering Files from a Corrupt Linux Partition | ||
emoji: 💾 | ||
desc: How to recover files from a corrupt Linux partition | ||
--- | ||
|
||
A few days ago, I encountered a strange issue with my Windows computer. After restarting, I noticed that my Linux partition had been corrupted and was now a “Sun” type partition. I was at a loss and wasn’t sure how to fully recover the partition's filesystem structure. | ||
|
||
I decided to take a step back and try to recover my files instead. Here’s how I went about it: | ||
|
||
1. I used the `dd` command to copy the corrupt partition onto an external SSD for recovery purposes. | ||
|
||
2. I then used `mke2fs` to search for superblocks backups within the partition (these are essentially scattered throughout the partition). | ||
|
||
3. I used `fsck -b` to attempt a recovery using a superblock backup. | ||
|
||
Unfortunately, I couldn’t recover the full filesystem folder structure. But, after running `fsck`, I noticed a ton of numbered folders appear in the ext4’s “Lost + Found” folder. I was able to search for folders from there and eventually locate the files I was looking for. | ||
|
||
The biggest takeaway from this experience is to make partition table backups. For GPT, use `gdisk --backup=backup.txt` to backup and `gdisk --load-backup=backup.txt` to recover. This way, you’ll be able to restore your partition table in the event of a corrupt partition. | ||
|
||
I’m glad I was able to recover my files and learn a few new commands along the way. Always remember to keep a backup of your partition table to avoid any potential data loss. 📁 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,8 @@ | |
|
||
.prose a { | ||
@apply underline font-bold; | ||
} | ||
|
||
.prose ol li::marker{ | ||
@apply font-bold; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters