Tuesday, September 4, 2007

GParted - Hard Disk Partitioning for total Idiots

Before I convert to a permanent Ubuntu install, I bought myself an external hard drive to back-up my data (better safe than sorry, right?). After spending almost 2 weeks converting music file formats, I’ve transferred all my personal data and backed-up my hard drive. But in order to do all that, I had to partition the external drive into a section for my Windows files and one for my personal documents with an Ubuntu-compatible file system.

Explanation & minor computer-drama under the cut.

While I could choose a file system that both systems could recognize, I decided against it. I’m keeping Windows on my computer “just in case”. Once this install is complete, I have no intention of logging on to Windows unless absolutely necessary. (Even now when I need to get to Windows to prepare for the conversion, I have to talk myself into it because I just do not want to leave Ubuntu). Also, the Ubuntu file system allows for permissions and several other features. If I allow Windows to have read-write access to the Ubuntu partition, these features don’t work. This puts me at a minimum of 3 partitions on the external HD.

I’ve never done anything like this before but Ubuntu users have written multiple guides to explain partitioning and how to back-up your data to newbies like me. The ones I found most helpful are here and here (link).

Ubuntu has the great application called “GParted” which lets you re-size and create partitions of many different file types. Once I got it going (see next paragraph), the partitioning took no time at all. The application was very easy to figure out and understand with an exception explained below. Once the external drive was partitioned, it was just restart the computer, transfer the personal files and viola! Done.

My main sticking point was due to the fact that the instructions do not explicitly state you have to download and install a package called “ntfsprogs” through Synaptic. I know this maybe obvious to some more experienced users but for someone who’d never used a Linux system until a month ago (like me), it kind needs to be spelled out. “Ntfsprogs” allows GParted to manipulate Windows file systems (“ntfs”). If you try to do it with the plain old Gparted, the application just doesn’t let you. The “Re-size” and “Create” options are grayed out. I spun my wheels for a day or so trying to figure out why my computer wouldn’t let me do anything with windows partitions, why the instructions just assumed you could and how could I possibly be misunderstanding the seemingly easy-peasy instructions. During some on-line reading into the problem, I ran across a great table with a breakdown of what packages for GParted are needed to manipulate what file systems. After installing the extra package, shrinking the windows partition and creating the ubuntu ones took no time at all.

My second problem took much less time to figure out and I have no idea if it is typical or not. After GParted created the partitions, I attempted to transfer my personal data to the Ubuntu partition. Frustratingly, I kept getting errors stating I didn’t have permission to write data to the partitions I had just created! This is fairly easy to correct. Via the Ubuntu help forums, I found a command line instruction that opens Nautilus as the root user (read: all powerful, can-do-anything user). Then, all I had to do was go to “media/drivename” --> “Properties” --> “Permissions” tab. I changed the “Others” option to “Create & Delete Files”. Then, I got out of root as quickly as possible*. It took 5 minutes to solve and 10 to research the problem in the help forums.

The next step: Find a disk defragmenter that lets me control which folders get defragmented. Apparently, defragmenting Wubi files in Windows is a VERY BAD IDEA. Of course, the Windows-provided defragmenter does not have this option.

*If you don’t have much experience with Linux (like me), I don’t think you should access the system as root unless absolutely necessary. One of the features of Ubuntu is that you can claim temporary root permissions with the command “sudo”. My personal stance with root permissions is do what I need to do and then get out of root before I screw something up.

No comments: