An excuse to try Ubuntu

In my process of installing several different Linux distros over the last week or two, I found out a few things.

First, the idea of using LVM and having a separate partition for /home is great. I was able to wipe Linux Mint off my machines and put on Lubuntu with no problem at all. No data loss. All my user settings remained intact.

But… my partitions were a little wonky. And after installing Lubuntu on my desktop machine which is designed to boot in UEFI mode I was having some trouble.

Turns out that the newer PCs that shipped with Windows 8 use a different method of booting. No longer do they use the old PC Bios… but instead they use UEFI. With UEFI, you have a special partition on your hard drive (about 256MB) that contains the first-stage boot files. Macs have been using this for awhile.

Because this is so new, a lot of Linuxes are having trouble with it. I messed with the UEFI thing for quite awhile last night. I had the machine booting… but it would not do so without this weird error. So I set my machine for legacy boot. This tells it to boot using the old PC Bios way. That meant I could delete the EFI partition.

That’s also when I decided that my LVM volume groups needed to be renamed. Having them named “mint-vg” just would not do since I was no longer running Linux Mint. I figured, better sort this all out now rather than later. Since I had just done a fresh install, it was a good time to re-do it before I had too much time invested into it.

Unfortunately, in the process of renaming the volume group on my laptop… I rendered the machine unbootable. Yes, there are many ways I could have fixed that. But… I used it as an opportunity to make yet another change. I’d experienced Lubuntu for a day or two. I thought… hmm… maybe I should just load Ubuntu proper on these?

So… I wiped both machines again… and installed Ubuntu on them.

Parting thoughts on Lubuntu… I liked it a lot. It actually seemed quite a bit more polished than Linux Mint. And it’s probably way more my style than Ubuntu is. So if I get sick of Ubuntu, it will probably be the one I go back to.

So far, it seems to me that the biggest negative with Ubuntu is all the crapware they put on there. Stuff that gets in the way. Little “features” that are just annoying and make you think “how can I disable this” when you first encounter them.

Giving Lubuntu a whirl

I’ve been contemplating what to do about potentially messing up my Linux Mint installations by changing repositories for the MATE desktop environment. I was not having any trouble, but the idea that I totally strayed from the official accepted practices by adding a foreign repository bothered me.

I was also questioning if Linux Mint was really the best choice of distributions for me. Ubuntu is the most popular. So running something based on that (as Linux Mint is) seems like a smart idea. But I was contemplating running one of the other distros that I felt were probably even more closely tied to Ubuntu like Lubuntu or Xubuntu.

I settled on Lubuntu. So this morning I wiped Linux Mint off of both my machines and installed Lubuntu.

Lubuntu is light-weight, but still has a fair amount of polish. The main thing I care about is functionality and compatibility with the Ubuntu base. Unlike Linux Mint… Lubuntu uses only standard Ubuntu repositories. I think this is a big plus.

LVM and partitions

One thing to consider when installing Linux is hard drive partitions. The default for most Linux distributions is to have one big partition for root and a small swap partition. That’s it.

This is less than ideal. It’s particularly inconvenient for those that have a lot of user data and like to experiment with different varieties of Linux. With one’s user data being in the same partition as the OS… you end up having to backup and restore all your data whenever you want to wipe your OS and install something different.

It’s super nice to have a separate partition for /home where you park all your user data and settings. Then you can wipe /root anytime you want and install a new OS without your data being affected (of course you would never do that without some sort of backup, just in case).

This is why I chose to use LVM when installing Linux Mint. Logical Volume Manager (LVM) is a partitioning scheme with an abstraction layer that makes resizing partitions a pretty straight forward thing.

Unfortunately I had trouble with the Linux Mint installer. It would allow me to use LVM, but it would not allow me to configure the LVM via the installation interface. (I have since learned… it’s best to boot into a live Linux DVD and setup LVM before doing the install)

Anyway, so I installed Linux Mint into a single LVM volume on both my machines. I then tracked down an excellent article on how to resize LVM volumes and the file systems within them.

In order to do this I booted my machine off of a live Linux DVD, because you can’t resize these partitions while they are mounted. Once booted off the live DVD, I issued the command “sudo su” in order to gain root access (there is no password on a live DVD).

I was then able to use the following commands to make this all happen…

vgdisplay mint-vg

(displays the info for the volume group mint-vg. issuing the vgdisplay command without an argument will display all volume groups.)

lvdisplay /dev/mint-vg/root

(displays the info for the logical volume root in the volume group mint-vg. issuing the lvdisplay command without an argument will display all logical volumes.)

lvresize -L 500G /dev/mint-vg/root

(resizes the logical volume root in the volume group mint-vg to be 500GB.)

lvcreate -L 500G -n home mint-vg

(creates a logical volume named home in the volume group mint-vg with a size of 500GB.)

lvresize -l +100%FREE /dev/mint-vg/home

(resizes the logical volume home in the volume group mint-vg to use 100% of the space available in the volume group mint-vg.)

mke2fs -t ext4 /dev/mapper/mint-vg-home
(creates a new ext4 file system in the logical volume home in the volume group mint-vg.)

resize2fs /dev/mapper/mint-vg-root 500G

(resizes the file system on the logical volume root in the volume group mint-vg to a size of 500GB.)

resize2fs -p /dev/mapper/mint-vg-home

(resizes the file system on the logical volume home in the volume group mint-vg to take the maximum space available on the logical volume.)

e2fsck -f /dev/mapper/mint-vg-root

(checks the file system on the logical volume root in the volume group mint-vg for errors.)

I first shrunk my original /root file system using the resize2fs command. Then I shrunk the logical volume that contained it to match using lvresize. I then created a new logical volume for /home using lvcreate. Then I pumped it up to maximum size using “lvresize -l +100%FREE” which expands it to fill any remaining space in the volume group. I then created an ext4 file system in the new logical volume using mke2fs. I then used resize2fs with the -p parameter in order to expand it to fill all available space in the logical volume.

Now comes the fun part. How to actually make the swap? I found a great knowledge base article on the ubuntu web site that tells exactly how to do this.

The main nuggets I got from this article were two commands:

sudo rsync -aXS –exclude=’/*/.gvfs’ /home/. /media/home/.

(this command duplicates the /home directory while preserving ownership and permissions.)

cd / && sudo mv /home /old_home && sudo mkdir /home

(this actually does the swap by executing several commands in sequence.)

If you’re going to do this you should read the article. Because there are some /etc/fstab modifications that need to happen between steps.

Easy peasy.

New blog

About a week ago, I decided I needed to get more in touch with my geek roots. So I formatted the hard drives on my desktop machine and my laptop, and I installed Linux Mint 15 MATE edition.

I’ve created this blog in order to chronicle my experiences with Linux. There are two primary reasons for this. First, it’s possible that others who choose this path can benefit from what I’ve gone through. Second, if I ever need to wipe my hard drive and start over, this log of the things I ran into might come in very handy when I need to do it all over again.

I’m not new to Linux. Back before I bought my first Mac in 2002, I’d spent a number of years playing with Linux and FreeBSD. I loved FreeBSD! That was largely why I bought my first Mac. It was around that time when Mac OS X came out of the beta/test stage and became a usable operating system. It was based on FreeBSD and became a common topic for discussion in the FreeBSD chat rooms.

Anyway, fast-forward to last week… when I made an assessment of the things I would have to give up if I were to completely dump Windows. I was running Windows 8 on both my machines. But the only Windows software that I really relied on was Quicken and iTunes.

Lucky for me, I’ve recently spent a lot of time developing a custom budget spreadsheet that totally rules. It actually has enough functionality built into it that it can replace Quicken as my day-to-day financial tracker. Dumping Quicken has been on my to-do list for a very long time. So this was a fine opportunity.

Regarding iTunes. I initially tried the Linux music program that came with Linux Mint called Banshee. But it apparently could not handle the MP3 tags on about 500 of my songs. So after importing all my music there were roughly 500 tracks where it did not know the artist, the album, or the track number. Repairing that would be a pretty big job.

Then my wife came up with a brilliant idea. She suggested I create an account on her Windows 8 machine and import my music into iTunes there. Then I can use that account when I want to sync my iPod or stream to the Apple TV in the front room. Sweet! Problem solved!

I don’t actually need iTunes to play my music library on a day-to-day basis because I use Google Play Music. My entire music library has already been uploaded there (for free). I can play anything I own from any web browser or mobile android device (gotta love that).

I also have Oracle’s free VirtualBox software installed on both my Linux machines. And each one has a VM with Windows 7 installed. This is just in case I run into something I can’t do without Windows. Although I’m pretty sure I won’t have that need.

Communication in the modern age

I recently read a little article titled something like “Phone calls are rude”. The point of the article was that calling someone on the telephone demands immediate, undivided attention. Whereas other forms of communication we use today like instant messaging, text messaging, email, and many others do not. I find this to be an interesting topic.

Then a few weeks ago I was working on a fairly urgent project. I was waiting on a file from someone that worked for another agency. I emailed him to ask if he would please let me know just as soon as the file was available so I could do my thing. I then went to work from home for the afternoon because I was expecting a delivery.

Well, I never received notice the the file had been made available. So our deadline came and went and there was a fair amount of hardship caused as a result.

The following Monday I came into the office to find a voice mail from this person at the other agency. They had called my on the telephone to tell me that this necessary file was available. Gah! Had I received that message in a timely fashion, I could have met the deadline. But I did not receive the message until it was too late.

I don’t ever check my work voice mail from home. Compared to email… I almost never use the phone at work period. I might receive one phone call every couple of weeks if that. So checking my voicemail from home would never occur to me. Nothing important ever gets done that way anymore.

In addition to that… I made my request to this person via email. I can’t really avoid the blame for not getting the message. But when you ask a question in email, don’t you normally expect the response to come via email?