I created a todo for myself after I mapped out my external hard drive partitioning scheme. My todos involved
- select quality partitioning scheme
- check the drive for errors (examine the health of the drive
- partitioning the drive into 4 correctly sized (accurately sized with rounded numbers, like 300gb exactly not more not less) in gparted
- labeling each of the four partitions using only CLI
- encrypting my first partition via TrueCrypt
- putting appropriate data on respective partitions
- checking to see that data is accessible on different computers and different OSEs (an important check because of some filesystem incompatibilities)
Here’s how I did it.
The Most Important Step: Mapping Out Partitioning Scheme
This was by far the most complex step. My partitioning scheme (the sequence, sizing, and/or filesystem on each) may change later and this is only my external drive; my internal drive will be as or more complex, but with proper planning “complexity” transforms and evolves delightfully into elegance and peace of mind.
That’s precisely why I wanted to put so much time into planning this. I have partitioned and used easily over a dozen hard drives (internals, externals, on desktops and laptops). And I never really massivley planned out the exact size, the exact filesystem, the intended usage of each partition, and how I would partition it. In fact few people do that. Most people, as I did in the past, merely dump their data on a drive. Occasionally people may add another partition to install an operating system or to have a different type of data but it’s rarely heavily planned.
That is ludicrous. Not planning your partitions is like building a house without a blueprint and without any plans of the rooms. Most people just “build a bedroom” and then a “bathroom” and they forget that the other parts of the disk are related. This might seem incredibly meticulous (and it is), but properly planning your partitioning of your hard disk results in
- elegance (I have exact round numbers for partition size and the sequence of the partitions corresponds to their usage level mostly)
- peace of mind and easy read/write of data (all the data and health of disk has been immaculately named with cross-platform and cross-filesystem naming (no capiTaLiZations, no spaces) in practically every file or directory)
- efficiency (in planning out the partitions of my drive I NEVER run into “out of space” errors
Most people run out of space on their hds/partitions because they fail to properly plan.
I have a certified coaching degree and am writing a book on productivity. I know my stuff when it comes to being organized and productive and that means for digital things, too (the most important thing and the most scientifically advanced thing with which to be organized, imho)!
So I scoured forums. I posted my partitioning scheme ideas to multiple forums (I got an earful from some geezer who was bent on not using partitions. While partition-usage is opinion. I consider it superior, more efficient, and infinitely more practical. Anyways, he thought I was being read when I told him that he was giving advice to feed his ego and that his advice was completely antithetical to what I was doing (partitioning a drive!). I fortunately found a friend on a forum who had indeed 16 partitions over 3 terabytes of data. While that was excessive, that was a helpful breakthrough.
I also encountered an idiot who suggested running linux via emultion from windows! Preposterous because linux is the superior OS adn thus emulating it from an inferior OS would be like taking fresh Tilappia fish to some fast-food place and having them sear-fry it (removing all the quality). So I run linux in linux.
I learned some valuable things regarding access speed and read/write speed on the hardware mechanics of the disk drives.
I also learned that first partition (located on the outer sectors of the drive) is accessed more quickly than subsequent partitions. Useful information.
I also got some fantastic ideas for setting up multiple drives on my own rig (but this post is about partitioning one drive).
All in all, the forums were most rewarding when I found the person with 16 partitions (I didn’t know how many drives that covered) as, while excessive and not as organized as my setup, that validated having multiple partitions.
On that note….
Why Multiple Partitions
Feel free to read wiki’s excellent pros and cons of partitions, but my version is simply that partioning:
- makes OS re-installation cinch. What normally take hours and hours of backing up data, getting everything off the drive, then reinstalling (and formatting) you can do in 20 minutes because you just re-install on the OS partition and all other data (and partitions) are untouched! NOT doing that is just ludicrous, inefficient, wasting time, and silly non-existent planning
- healthy hard disks. Wikipedia says that more partitions may lead to fragmentation, but think about it this way. If I have my data, programs, and OS(es), all on different partitions, I can more fequently back up one of those, reformat, check the drive, fix sectors, if necessary because of the flexibility of partitions!
- it keeps like data together. Why would I ever want something more or less immutable (unless I’m working and learning about the OS) on the same partition as my files that I change, delete, modify, and relocate on a regular basis at times with some files? You wouldn’t. Partitioning makes sense, saves time (with reinstallations), is MUCH more organized (if planned correctly) and leads to healthier drives because you’re more cognizant of the partitions and their sector health and simply being more capable of reformatting, checking, and fixing hard disk health!
The Partitioning Scheme
Without further ado (will explain later) here’s the scheme I decided (and note, after using this for a few months it’s highly likely I’ll have ideas for another partitioning, encryption, sequence, filesystem, partition_size arrangement in the future)
- 1TB300i, NTFS, primary, “internal”
- 2TB200e, NTFS, logical of extended, “external”
- 3TB300r, NTFS, logical of extended, “random”
- 4TB100l, ext4, primary, “linux”
I still have 31gb unused, 10 of which I can optionally use for a swap partition with the linux partition.
If the second and third partitions had been primary partitions (totally four), I wouldn’t have the option of adding another partition (extended nor primary) so with this setup I still can use that 30gb (which is unlikely) for a primary or extended partition. If I encounter snags with using the two logicals as part of an extended, I will at least find that out. But unless I know precisely what each partition will be used for (and I know what partition 1,2, and 4 will be used for, but 3rd partition is just space for whatever I decide, for now), I don’t like using all 4/4 primary partitions. If I know exactly what every partition will be used for (and I do with 3/4 partitions on this) then it’s okay to use all four primaries,but this way I have some flexibility built into this partitioning sequence.
EDIT: The above scheme is great, but the first partition is ONLY for data, like the second partition (I would never put an OS on the first two partitions) so really those should be extended and the “random” third partition should be primary so I an optionally install an os on it if I want.
My intitial scheme has no problems as long as I don’t install an OS on partitions 2 and 3. So redoing the scheme to
1TB300i, NTFS, logical of extended, “internal”
2TB200e, NTFS, logical of extended, “external”
3TB300r, NTFS, primary “random”
4TB100l, ext4, primary, “linux”
Might be of interest later as the first two partitions I could write data to and install OSes optionally on the third and fourth partition.
But again, I’ve upliftingly executed the principle of “stick to the plan (if modifications need to be made, note them and utilize for next partitioning) and that has saved me from getting distracted in this admittedly highly meticulous and scientifically-planned partitioning project!
Check the Health of the Drive
This was pretty simple.
I formatted the drive using disk utility (a ubuntu accessory).
Then I checked for errors in gparted
Note how gparted provides all the informational details of precisely what it is doing (this was very useful and helpful for learning more CLI commands because it shows you the actual command its running! Programs like gparted are great because they don’t try to conceal what’s occurring at the CLI level).
Partitioning in gparted
I knew I wanted to use ubuntu and specifically gparted (next time I will use CLI only). gparted is very bug-free, very simple and just awesome to use for partioning. It was an excellent choice of applications to do the partitioning; it’s elegant, reliable, fast, and informative (it tells you all the commands, which are command-line-executable).
Basically I’ll just let the pictures do the explaining.
The labels are incorrect, which is fine because I manually relabel the drives using CLI in the next step. Note the size of each drive is EXACTLY the solid number (300gb, 200gb, 300gb, 100gb). Not more not less.
This was accomplished simply by making the drive size (must be in megabytes in gparted) mathematically accurate.
A 300gb hard drive is not 300,000 mb, but rather 300*1024 = 307200 mb. Entering that number into the drive size ensures you get an accurate amount. (I can’t stand people who have disgustingly proportioned drives that lack rounded numbers. Unrounded number drive sizes is usually the result of lack of planning or lack of knowledge on basic datablock sizes (of terabytes, gigabytes, megabytes) and the like.
I used my learnings on labeling from the cli to accomplish this.
For the fourth partition (linux) I used
e2label /dev/sdb4 4TB100l
To properly rename that partition.
I checked all the labels to make sure they were accurate as well.
Remember that a different command is required for a different filesystem.
(FYI: That program I’m using to show the terminal on half screen is called Guake. It’s fantastic for popping in and out of CLI quickly. I highly recommend it).
Again, after properly learning the CLI labelling commands, this part look less than two minutes.
Encrypting with Truecrypt
I was going to include this as is but had a better solution.
mac cuasing problems (as always)
Because of my great dislike for apple computers hardware and software I wanted to avoid using apple stuff at all (and I basically did). I started to truecrypt my first partition of 300gb on the netbook and it was encrypting at 9mb/s and would take 7 hours. Not too bad if I was going to go to sleep, but I had more work to do! So I did the encryption on the desktop (which unfortunately, until my own rig is built, is a problem-causing mac). But truecrypt is cross-platform and identical in windows, mac, or linux so I justified doing the encryption on the desktop.
Then tuxtera stopped working ( a plugin to read NTFS filesystems). Macs are such a truly fail operating system for anyone moderately to greatly interested in computers. Linux uses a file system different from windows. That’s fine because linux is awesome and more core and has been around longer (especially when considering its derivations from unix) for longer than windows and mac. As far as I’m concerned, linux can have any filesystem it wants. macos hasn’t been around for that long at all and it’s already trying to have it’s own unique problem-causing filesystem (hfs). Whenever you try to do something with hardware or software, the mac’s “uniqueness” (more like noxiously infuriating, dumb, and cult-like) lack of intelligence and lack of standardization put into the mac hardware and software botches things up. I cannot wait until I have sold my mac hardware (I will never purcahse anything from apple ever again; no ipods, (a funny australia company made a poop picker-upper ipood, but apple sued them. The ipood would have been more useful than any ipod), no ishuffle’s (sandisk’s clip looks way better and dell, archos, or blackberry have great looking tablets), no imacs, no “i” anything nor macbooks. Check out my full post on how deeply wrong, infuriating, and most toxically, cult-like, apple is (and why I’m completely boycotting, for my own sanity and benefit) all of their hardware products.
So succinctly, using a mac temporarily snafued in a small isolated way, my extremely meticulously mapped out process because the Truecrypt version on mac can’t truecrypt in ntfs, so I had to truecrypt in FAT which I can and will fix later. And this extension stopped working, preventing from writing to NTFS filesystem drives on the mac. As usual, the mac caused problems. I have considered using the slow netbook encryption times instead of dealing with mac lunacy, unfairness, and anguish.
Instead I stuck to my original plan (which has been a huge lesson: stick the original plan despite obstacles or roadblocks). Sticking to the plan enabled me to devise more ideas for the next time I partition (anywhere from a few weeks to months or year from now).
And I completely redid the entire partitioning, labeling, and truecrypted ALL from my beloved netbook (and didn’t involve toxic apple hardware at all in those steps). Grand! Encryption went as planned. Plus, after a fresh reboot, netbook was cranking away encryption at 18mb/s. Very solid.
The details of how to do this encryption are spelled out fully here.
For this specific setup I did partition (not volume), hidden volume, AES on the external, and Serpent on the internal volume.
That may sound cryptic (haha pun somewhat intended), but you can learn what all that means on the guide (link above).
Copying the Data to Specific Partitions
internal files went to 1TB300i, ntfs, encrypted
external files 2TB200e, ntfs,
nothing in 3TB300r
nothing yet in 4TB100l
Ensuring the Data is Cross-OS, Cross-computer Compatible
Don’t know what to say about this. I just plugged the drive in and ensured all the partition labels were identical and that the data on each partition (partitiosn 1 and 2 at least) was accessible. If you don’t know how to do that then you really should not be reading this guide and should visit a “For Dummies Introduction to Computers” book or wear a warning label on your forehead that says “Computer Illeterate. Dangerous and Toxic Around Computers” to forewarn people of your stupidity (after all, it’s better that people flee and hide their sensitive data from you than you actually messing it up).
So that’s it.
A Word on Understanding Primary/Extended/Logical Partitions
The difference between primary, extended, and logical partitions, to say the least, greatly confused me for awhile. Fortunaetely, that obfuscation has been replaced with clarity! The diagrams and photos below were most helpfully conducive to me understanding the difference and arrangement of primary, extended, and logical partitions, so I have included them here, as they may prove instructive, didactic, and illustrative to you, as well. Here’s what you need to know. When you partition a drive you have the option of choosing the new partition to be primary or extended.
Primary partitions are partitions
- from which you can boot an OS
- automatically get assigned to a device location
- partitioning them must involve the assignment of a filesystem (ntfs, ext4, FAT32, and the like)
- have a maximum number of 4 (you can only have 4 primary partitions on any given single hard disk)
- have unlimited count per hard disk (there’s no 4 maximum, like with primary partitions)
- do not get automatically assigned a device location (nor drive letter in windows)
- do NOT get formatted with a filesystem (filesystems are assigned later)
Here’s a very helpful diagram from gparted.
This is an example partitioning scheme I made. No one would (if they had a modicum of sanity) ever really do this scheme because the filesystems and their respective sizes and arrangement are illogical (ext4 needs a linux_swap partition and some of the partition sizes are unresourcefully small or large). However, it does what it’s supposed to do: illustrate the three types of partitions. This partitioning is obviously different from the well-thought sequence filesystem, and 4 partition sizes I utilized in my Full Monty: Partitioning tutorial post.
Now I made this overly complicated to illustrate the different partitioning types:
- Partition 1, NTFS, Primary, 300GB, 1/4 Primary
- Partition 2, NTFS, Primary, 200GB, 2/4 Primary
- Partition 3 (called #5 in diagram), No filesystem, Extended, 300GB, (NOTE: Takes the Place of a primary partition! Counts as 3/4 primary partition)!
- Partition3-1 (called Partition #6), Logical Partition of partition 3 (the extended partition), 29.29GB, ext2
- Partition3-1 (called partition #7 in gparted, idiotically), Logical partition of Partition 3, NTFS, 39.06GB
- Partition3-3 (called partition # 8), Logical Partition of Partition 3), 97.65GB, linux-swap (it would be idiotic to make the swap partition larger than the linux ext2/3/4 partition but this is just illustrative of primary, extended, and logical partitions.
- Partition3-4 (called partition #9), Logical partition of Partition 3, NTFS, 134GB.
- Partition 4 (actually called partition #4 in gparted), ext4, 100GB, Primary Partition 4/4
This screen capture was the clutch most helpful display of the arrangement of primary, extended, and logical partitions. After seeing this, I instantly understand the interrelationship between the three kinds of hard drive partitions.
This is in reference to this partitioning scheme (the good one that I devised for my own needs and interests of internal, external, random (possibly scratchdisk), and a possible external linux installation partitioning needs).
Okay so from diagram one you can see that 3 of the 4 primary partition “slots” are taken up. One of those four is indeed by an extended partition (confusing! (at first)). Then within that extended partition there are two logical partitions both of NTFS filesystem format, totalling to 500GB. Then the 1st and last partitions are both primary in, respectively, NTFS and ext4 filesystem format. Jolly good! If you don’t understand the difference of primary, extended, and logical file systems by now, there’s nothing else I can do; reread this sub-section and look at the diagrams. The full explanation is there!
Notes and Analysis
AFAIK, This partitioning scheme has 3 bootable partitions (the three primaries), 1 extended and 4 logical parititions within that one extended partition. Is it true that if you use an extended partition, it (nor any of its logical partitions can be booted from)?
What about linux-swap. I couldn’t do an extended partition and make one logical ext4 and the other logical linux-swap? So using linux ext4 (primary) and linux-swap (primary) would take up two of the four primary parititions?
Temporary Snags and Obastacles
- Mac OS. As said before, I wanted to use desktop mac (faster encryption and copying) but hit a huge snag when Tuxtera stopped working (the NTFS read/write extension for rubbish mac) and when truecrypt only allowed for FAT filesystem (instead of NTFS) again due to mac being a rubbish, infuriatingly immutable OS (the stark contrast of linux, which is fast, efficient, and quality). Work-around: I redid the partitioning and labeling and then ecrypted on netbook. Worked marvelously and had it encrypted overnight but the encryption speed dwindled to ~5mb/s and the nthe drive disconnected. Frustrating. So my solution was to then redo the partitioning scheme and relabel and then truecrypt on mac (disagreeable with FAT filesystem, but this would be the best solution for now and in few months could repartition with faster linux-based computer other than netbook, which I love and is marvelous but not ideal for mass-data encryption).
- Server-side Cloud Updating (Dropbox). Preparing my core sensitive data involved changing the file names of over 1,900 documents I had from school (papers, notes, finals, tests, handouts, and more). I hadn’t touched those in a very long time (over 5 years) and only used them for memories and very rarely reference and most of my incessant learning is autodidactically these days, so it made sense to eliminate odd characters (# . , ‘ ! ) from those file names which cause tremendous problems in copying data especially between different filesystems. So I successfully, smoothly and magnificently did that in the efficient speed and awesome coding of ubuntu with some VERY handy open-source apps (worked better with that setup than any other OS by FAR). Great, but then I had changed the filenames and folder locations of over 1,900 files PLUS another couple thousand files so dropbox temporarily thought I had deleted those. My usage dropped from over 80gb to under 70gb. This, understandably, scared, horrified, and momentarily perplexed me, forcing me to utilize restraint in not defenstrating something important (like my cat or something, I would never defenstrate my computer (although I might defenstrate the mac). Solution: I deactivated dropbox and new that I had my dropbox files EXACTLY the way I wanted them on my local linux drive. So I hurriedly copied those to my double-backup drive (double phew!) and then, having that certainty, safety and security, I could then worry about making sure the correct data (which was local) got synced properly to dropbox. Lesson Learned: When changing a lot (like over 1,000) file locations and/or names, it’s best to deactivate any cloud or syncing service you have because the syncing service will temporarily think those were deleted and data-loss might occur. Cloud services are ideal for changing <100 files a time. Any more than that and it gets a bit unnerving. Worst case scenario is I will have to wipe my server-side data and just upload the local (correct data), which isn’t too bad (just takes time), and that’s only if dropbox has difficulty noticing I didn’t delete those files, but just changed names and location. All in all, I’m certain data loss has and will not occur so that temporary snag, while highly unnerving, got resolved.
I realized the data I encrypted will be inaccessible by anyone. That elated me at first. But then I thought about what if I died? NSA and DOD likely wouldn’t be able to even access my files. (Many of the files are vmint or video media internals of my own self-vids and video journals). I intend to share a lot of those on youtube (not that anyone watches them, but it’s rewarding for me to at least have them up/out their accessible). But I died, NO ONE could access them! I thought about if I had some script or some lock tied into my heart so if my heart stopped beating (assuming cryogenics don’t get invented in my lifetime) for more than 24 hours, my password would be released and someone could look at the encrypted files (it’s highly unlikely that anyone would have an interest in those files), but the fact that if I died with them encrypted, would mean absolutely no one would ever see the (years of) work I’d done was slightly, well, meta, deep, harrowing, and illuminating at the same time.
I guess it galvanized me to get those vids up. I was so focused on concealing and encrypting them because of oppression, emotional rape, and emotional abuse from toxic people in my past. If that chaotic injustice hadn’t occurred, would I be as itnerested in encrypting? Probably not. But until I can get to a safer place in life, with those toxic people succesffully “deleted with over-writing zeroes!” from my life, I’ll be selective about what vids and posts I upload and enjoy the safety of my encrypted files. I envisioned dying and scribbling my password somewhere, but what would be more efficient would be to post the vids I want to post and share that so at least I have that worry eliminated and in the meanwhile, enjoy my vids and files in encrypted safety.
First off, when and and if I update this again, I want to be sure to likely do EVERYTHING with CLI (including the partitioning that I did in gparted) and likely will adjust the partitions. For my next repartitioning (if ever will likely be in a few months for the external drive), I may increase the linux partition and make it the second partition, depending on the usage of it (and include a swap) and I might have more envisioned and specific purpose for the “random” partition.
I tried to include as many steps and photos I thought relevant or helpful. If you have any questions feel free to email me at
vernekreska [at] gmail.com
It’s unlikely I will recieve your email, but if I do get it and it’s questions/comments are interesting or helpful, I may respond directly and/or include your questions/comments in the second version of this.