Tag Archives: partition

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:

2014-01-11-l3-b7175-gdisk

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? 🙄

cfdisk: Somehow overlooked

ls vimwiki/ | shuf -n1 has again spoken again, and this time it has pointed out my error in leaving cfdisk out of the lineup nine months ago, when I traveled through the C section.

2014-07-14-6m47421-cfdisk

cfdisk uses ncurses to work as a disk partitioner with some graphical elements. I amuse myself by saying it always intended to look and behave like the original, clunky IBM fdisk utility, but got beaten to the name by fdisk. But they’re both from the util-linux package, so I don’t suppose it matters who claimed the name. 😉

I also imagine you probably know your way around cfdisk since it is included by default in just about any distro you could mention. I honestly can’t think of anything offhand that would split away cfdisk and force you to use only fdisk. Or parted.

A small curiosity: The Arch Wiki, which I hold with the same reverence that some religions afford their holy texts, suggests that recent versions of cfdisk don’t align the first partition correctly.

I can attest to seeing some partitions start off-center, which sometimes causes an error message when polling a drive’s partition layout, but it didn’t seem to cause any damage to my system, so I paid no attention to it.

I can’t find any other information on the problem right now, but a deeper scrape of the Intarnets is probably warranted. It may also be that by this date, the error has been ironed out, and the wiki just needs updating. Or maybe you’re reading this in the future, and it has already been fixed, and you’re wondering what I’m yammering about. O_o

Regardless, I will be honest in saying that cfdisk is my tool of choice, when building new systems or setting up USB drives. I appreciate fdisk for its precision and history, but I like my visual arrangements, thank you. 😉

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.

2014-02-22-lv-r1fz6-parted

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.

luksus: Step-by-step encryption

I got a link via e-mail to luksus, and as I am more and more a fan of data encryption these days, I made a point of including it here.

2013-12-27-lv-r1fz6-luksus-01 2013-12-27-lv-r1fz6-luksus-02

Results have been … satisfactory, although luksus is a script that I have a few persnickety complaints about.

What I’ve seen of luksus so far suggests that it will handle encryption of USB keys or partitions on external drives with a minimum of effort.

It comes armed with both AES and TrueCrypt support (provided they are installed on your system), and appears poised to add gnupg and a couple others.

Perhaps even better, the scripts are usable not only in Linux but with some *BSDs as well … and we all know how security-minded those guys and girls are.

(Yes, I have thought about jumping ship. Experimenting with *BSD is on my to-do list. … 😯 )

Is this necessarily better than doing it yourself with something like cryptsetup or ccrypt? That’s up to you.

My own complaints about luksus are strictly minor — the long wait while the drive is shredded, and some issues with naming a volume that triggered errors. And it seems the information supplied in the command are repeated later in the dialog windows.

I still trust and rely on gnupg over anything, and fully encrypted volumes still make me a little nervous. Of course most of my needs for encryption involve transmitting encrypted files across the Internet, which is only somewhat practical for luksus.

I’m willing to poke around with luksus a little more though; tools like this are more and more useful as time goes on.

file: Happy 40th Birthday!

Occasionally you might — or at least I do, from time to time — come across a file with no clear indication what it is or where it’s supposed to go.

The file tool is helpful a times like that. file attempts to figure out what mystery files are, by skimming through a series of tests and giving the first result that works.

2013-11-09-lv-r1fz6-file

As you can see in the example, my hnb notes file comes out as an XML text file, which is 100 percent correct. I can also ask for a mime type, which you see there.

file tries to match archives too, but also can dig through archives and check the contents. That might be a particularly useful tweak sometimes.

I see in the man pages that file can also look at drive partitions and tell you what the contents are. This might seem an odd chore for file, but remember, everything is a file.

So if you have a mystery partition on a drive and you’re not sure if it’s a leftover Windows installation or someone’s secret data stash, file might be able to give you a hint.

Other than that, and the fact that (according to the man page) the file tool in some form or another dates back November 1973, I can’t think of much else to say. Except maybe … Happy Birthday!

fdisk: One that’s not from coreutils

I have fdisk on my list of applications to include, and I suppose it warrants inclusion, even if I have a personal reason for writing about it. This is out of util-linux, not coreutils, which is a change … over the past few days, anyway. 🙄

Or maybe not. fdisk is a tool for “creating and manipulating partition tables,” which means two things — first, it doesn’t belong in coreutils 😉 ; and second, it has the potential to completely destroy your system if you use it wrong.

2013-11-06-lv-r1fz6-fdisk

Of course, you could say that about a lot of things. That doesn’t mean fdisk is something you should avoid. Live a little. Don’t be afraid to try something new. If you need a completely sterile, padded and antiseptic existence, I hear Windows 8.1 is a lot like a child’s pull toy. 😈

The easiest and probably most popular use for fdisk is checking what hard drives are connected to your computer. As you can see in the screenshot, if you tack on the -l flag, you’ll get a neatly formatted list of drives and partitions, along with sensitive and personal information for each.

fdisk can also manipulate or create partitions, and if you start it and aim it at a device label, you’ll have the option to delete, create, modify or adjust partitions on that device.

I suppose it should go without saying that you’ll need superuser permissions or root account access to do any real damage to your system. And for goodness sake and all that is holy, don’t use fdisk lightly. And don’t complain to me if you destroy your collection of family photos by tinkering with the partitions on your external drive.

There’s more you can do with fdisk, but I should probably admit that when it comes time to arrange partitions, on a new drive or at installation time. I usually rely on cfdisk, which is also part of util-linux.

I know there are hard-core Linux geeks out there who wouldn’t dream of using anything but fdisk to set up a drive, just like they wouldn’t dream of using anything but ed to edit a text file.

I just prefer the arrangement and the dialogs. It’s more intuitive for me.

So what’s my personal reason for including fdisk here? Well, you see, fdisk got something lately — in version 2.24 in Arch — that I really like. And if you looked at the screenshot you probably already know what it is. …

Color! :mrgreen:

P.S., sorry, Debian fans. You’re still stuck at 2.20 in Wheezy. …