Sunday, 27 March 2011

Lessons Learned

I've learned a couple of valuable lessons this weekend and it's only Saturday!
  1. Always do you research properly and preferably before you make any system changes.
  2. The last thing that you changed is the most likely source of any new problems.
  3. Type carefully!
For no other reason than the desire to experiment, I decided to partition the hard-drive on my DELL laptop. It's something that I should have done when I installed Karmic at Christmas, but, to be honest, I didn't really know what I was doing so I just followed the guided installation and created a single partition. However, there are some advantages to partitioning a drive, not least that you can preserve user files and settings during upgrades:
"Setting up /home on a separate partition is beneficial because your settings, files, and desktop will be maintained if you upgrade, (re)install Ubuntu or another distro. This works because /home has a sub-folder for each user's settings and files which contain all the data & settings of that user." Source: Ubuntu Documentation
Doing some research (and applying a little logic), I realized that I couldn't re-size my existing partition without unmounting it first and, given that my partition was my whole drive, I couldn't unmount it anyway! Rather that keep searching for an answer, I convinced myself that the only way to partition the drive was a vanilla install of Lucid.

Actually, there's a much easier way to achieve the same result: the GParted Live CD.

Using the GParted Live CD facilitates the resizing (reduction) of the root partition in order to make space for either additional primary partitions (up to three additional partitions (four in total)) or an extended partition, which can house new logical partition(s) and the existing swap file. Then, using these instructions, it's a simple matter to migrate the /home directory to the new partition where its contents can reside safely. This simpler method has subsequently been applied (successfully) to my desktop without the drama of a complete rebuild!

Re-installing Lucid on the laptop also had some unintended consequences for Samba and I couldn't access my Ubuntu or Windows desktop shares from my laptop even though I could see them in the browser. My smb.conf file had been successfully restored to the laptop and a thorough check revealed no errors. My instinct told me that my Ubuntu desktop was the culprit but I'd already learned that it's better to be sure than to act on instinct! After several hours of trying to find the error I realized that:
  1. I had failed to restore my smbpasswd file on the laptop.
  2. I had mistyped the port number in my ufw rules (I'd typed 149 instead of 139).
Correcting these two errors restored Samba to rude health and did much to assuage my ill-temper!

Sources & References
Ubuntu Documentation Partitioning Home Moving
Gnome Partitioning Editor Sourceforge GParted Page
Dedoimedo GParted Full Tutorial

No comments:

Post a Comment