Tag Archives: hdd

gdisk: A familiar face

I’ll try to keep this one quick; I am already short on time this weekend because of personal obligations. But I also think gdisk is something that resembles fdisk enough (and even perhaps cfdisk and some other partition tools) that mentioning it at all is a rehash of sorts.

Anyway, feast thine eyes:


gdisk, for what I have seen, just about matches fdisk keypress for keypress, with the major difference being its relative comfort in working with the newer generation of hard drives that use GUID partition tables and not MBR style.

Wikipedia tells me the changeover took place sometime around 2009, and so it doesn’t surprise me that I use it so rarely. The newest, most powerful machine I have in the house right now is 8 years old, and I’m wondering if it isn’t time for me to upgrade that. …

I wouldn’t want to fall behind on the times, now would I? 🙄

photorec: Taught me something new today

I just had a very, very illuminating session with photorec, which might be strangely named considering what it can do, but is still a great console application.

photorec is part of the testdisk suite (or at least it is in Arch), but it doesn’t just recover photos. It can scrape through a drive and recover almost anything.

And from almost any filesystem, I might add, although you’ll need to know beforehand what the filesystem is.


photorec is menu driven for the most part, requires elevated privileges (which is good), and as far as I can tell in my experiences with it, does a great job yanking files from the jaws of death.

Now, why did I say “illuminating” earlier? Well, in one of my test runs this morning I grabbed a leftover flash drive that I hadn’t used in a while, ran dd over it for a few seconds, repartitioned it, dumped a couple of text files on it, deleted them, and then sent photorec to work.

Originally the drive had been formatted in ext4, but I repartitioned it to hold a vfat partition, just because I wanted to see what photorec would do with a non-Unix drive.

photorec found the original text files I dropped there a few minutes earlier, then kept scrounging and found music files I had on the drive before I repartitioned and reformatted it. I kid you not. 😯

And … they played perfectly in mocp. 😯

Until this morning I assumed that data files from completely different file systems on drives that had been repartitioned and reformatted … would be irretrievable. How wrong I was. 😳

I know enough to realize that without letting dd run its course over the whole drive, that data was still exposed. But I honestly thought since they weren’t listed in file table or were in a completely different filesystem, they wouldn’t be so easily brought back.

But there you have it. photorec taught me something new today, and I am wiser for it. Now please excuse me while I rig an entire laptop to run dban over every drive I own. … 😕

parted: The forgotten partition tool

Maybe it’s just me, but when I need access to disk partitions, I have a tendency to either run for fdisk or cfdisk. parted just never comes to mind.

I will list that as a flaw in my character, since I have no reason to doubt that parted is just as effective and powerful as its counterparts.


Unfortunately there’s not much I can show about parted in action, lest I scramble my hard drive so badly as to require Clonezilla to repair it.

And while I like you all, I’m not ready for that kind of commitment. 😛

As far as how parted compares to fdisk, or for that matter to cfdisk, I don’t see much that differs. The man pages suggest they both are capable of manipulating or creating partitions. Obviously they both have their own styles.

And of course if you distill the Internet and decant the same question from it, you get a mish-mosh of opinions and unhelpful posts decrying one or the other.

So I leave it to you to decide which you prefer. The fact that you have a choice at all is what matters.