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.

Problem solved

Our vehicle saga took another turn yesterday.

Shawna and I bought two 2-door 2012 Honda Civics about a year ago. We traded in our cars which had about 90k miles on both of them, effectively extending the life of our automobiles about 5 more years. In the process we moved from two fairly expensive cars to two economical ones.

It wasn’t too long before we realized… the two-door Civics were not big enough for a lot of things. Obviously we expected that to a certain extent. But we actually had to rent a truck just to move a few things from our apartment to our mini-storage unit.

So, in late December we traded the red Civic I had been driving for a 2013 Honda CR-V. I then switched over to driving the black Civic that Shawna had been previously driving because I have a 122 mile-per-day commute.

I immediately noticed that the black Civic had a problem that the red Civic did not. It manifested itself in the form of a rapid vibration in the steering wheel around 70-75 mph on the freeway. Since I mainly drive the freeway on my commute, this became severely annoying.

After a fair amount of trouble shooting at the Honda dealer, they concluded that the vibration was caused by either the poor pavement or was a characteristic of the tires (which are not covered under warranty).

Of course the only way determine if the problem was caused by the tires, would be to shell out $650 for new ones. And if that didn’t correct it, there seemed to be a strong likelihood that they would then blame the road… which would essentially be denying that there was a problem at all.

After already throwing over $500 down the toilet at Les Schwab for this problem, we decided to cut our losses and trade the car in. While not necessarily that great of a move financially, it didn’t turn out to be that bad.

We ended up with a new 2013 Honda Fit. Nice little car. Certainly a step below the Civic in some areas. But a lot more practical in others. For one, it’s a hatchback, where (unlike the Civic)… the fold-down feature of the rear seats actually is a functional advantage. It’s also a four-door. And it feels much roomier than the Civic.

Oddly the Fit is not rated as good as the Civic when it comes to gas mileage. But after buying four brand new Hondas this year, we are now committed to keeping the two we have until they crap out.

Call the Whaaaambulance

I tend to be a bit of a whiner. It just seems like sometimes it’s way easier to see the negatives vs the positives. Sort of like how the news tends to report way more negatives stories than it does positive ones. Or how typical conversations are often about what’s wrong with our government or the economy or how that Chinese restaurant messed up my order yesterday.

As a Christian, I like to consider what pleases God or what bothers him in our behavior. The journey of the Israelites in the desert with Moses was a picture of the Christian life. Out of a million Jews… only two entered into the promised land. Why? If you read through the story, those people experienced many awesome miracles from God, but they were largely ungrateful. They whined a lot. And that did not turn out well for them. They whined about not having food. Then, after God started providing food for them daily, they whined about the lack of variety in their diet. At one time God caused the earth to open up and swallow several thousand of them in one fell swoop. Because they wouldn’t stop whining. This is a big deal to God.

If one believes the Bible, one must conclude that things and circumstances in our life occur for a reason. One of God’s primary wishes for us is that we grow. This is way more important to him than our “comfort”. When we encounter things that we consider unpleasant, it’s often an opportunity for personal growth, specifically engineered by God for our benefit. What kind of people would we be if everything always went our way? Spoiled brats perhaps.

Do we really believe that God is in control? Then what exactly are we doing when we whine about our circumstances or problems in our life? We are essentially questioning the fairness of God. It’s like saying that we don’t approve of His handling of us or the affairs of our life.

In addition, consider how Christ suffered on His way to the cross. More than we can possibly imagine. After all, He was God. And He submitted Himself to the most humiliating suffering and death that was possible. At the hands of His own creation. He did this for us.

And we complain when we have a stomach ache.

New Diet Plan

Shawna and I started a new diet yesterday. This isn’t one of those “we’re going to eat healthier” diets. It’s a Medi-Fast diet. You eat six times a day. Five of those “meals” are provided by Medi-Fast. The sixth meal is a “lean and green” meal. It consists of 5-7oz of lean meat and a veggie. This meal you provide yourself.

Each of the Medi-Fast meals is 100 calories. And they are entirely interchangeable. There are about 70 different things you can choose from. They all have basically the same nutritional profile.

So what we’re talking about is basically around 800-1000 calories per day. They actually warn you against exercising during the first 3-4 weeks of the diet. And they give you measures to take if you suffer from headache or dizziness as a result of the low caloric intake.

The Medi-Fast meals are interesting. Many of them are simply powder that you mix with water and microwave. Two such meals I had yesterday were eggs (egg whites) and vegetarian sloppy joes. These were both surprisingly good.

The program also calls for drinking a gallon of water per day, or 1oz of water for every 2lbs of body weight, whichever is greater.

It’s certainly too early to draw any conclusions. Based on our experience with day one, we think this is something we can do. And with one month of Medi-Fast food coming in at over $600, we had already decided that this was a commitment we were determined to make.

I personally think that one of the bigger factors in the success of this program will be the almost complete removal of decision making from our diet. We totally don’t have to think about it.

Ship of Fools

This was written right after President Obama’s initial election. It’s doubly true now that he’s been re-elected, with half the nation in utter disbelief that anyone in their right mind would give this man a second term.

The danger to America is not Barack Obama, but a citizenry capable of entrusting a man like him with the Presidency. It will be far easier to limit and undo the follies of an Obama presidency than to restore the necessary common sense and good judgment to a depraved electorate willing to have such a man for their president. The problem is much deeper and far more serious than Mr. Obama, who is a mere symptom of what ails America. Blaming the prince of the fools should not blind anyone to the vast confederacy of fools that made him their prince. The Republic can survive a Barack Obama, who is, after all, merely a fool. It is less likely to survive a multitude of fools, such as those who made him their president.

~from a Czech newspaper

Life Changes

Today I accepted a new full-time programmer/analyst position with a wood products company in Eugene, and gave my two-week notice with my current employer.

Roughly three months ago my employer reduced my hours (and pay) by 40%. Otherwise known as a partial layoff. The reason given was dollars. Government budgets are tight everywhere and the particular services I am employed to support are not bringing in the revenue to justify the cost. And I was the last one in my group to be hired… so that made me the first to go.

If you count both of my stints with the ESD… I’ve worked there for a total of 9 years. That is far longer than I’ve been with any other programming job. Most of the people I work with have been there that whole time. My coworkers have been great. And no matter what else has happened… it’s the people I work with that made the ESD a great place to be. I’m definitely going to miss that.

So a new chapter is beginning. I’m moving from a government job back into the private sector. And this is not only a private sector job I’m taking, but it’s in a family-owned business. About as far from a government job as I’m likely to get.

I mentioned to my new boss today that I might experience a little “culture shock”. But I made sure he knew that I fully intend on stepping up to the plate and doing a good job for them. One of the notable things about my new boss so far… it’s obvious that he really *wants* me there. They are totally glad to get me. That’s a nice feeling.

Regarding the culture shock… at the ESD we are limited to 40-hour work weeks. At my new job, they are scheduling me for 48-hour weeks right off the bat. I will be one of two programmers… and the other guy typically puts in 50 hours a week. But the job is salary… so 48-hour weeks pay the same as 40-hour ones do.

They don’t award sick leave at my new job. They just figure if you’re sick, you’re sick. I guess with overtime being the norm, they assume you’ll make that up and it will still work out in their favor.

They are initially going to have me working four 10-hour days in the office, and one 8-hour day from home each week. In addition to the mandatory overtime, I will have a one-hour commute each way. That’s going to make for some long days. Each workday that I’m in the office will be about 12 hours long if you include the commute. I haven’t figured out how lunch will factor in. At least I will only have to do that four days a week.

I feel like I’m making a big leap. Not really sure what I’m getting myself into. Not sure how it will all work out. A lot of unknowns. But I have high hopes and a sense of adventure. I am feeling pretty good about a challenge. I think I will probably find out a few things about myself in the process.

My wife has also taken a new job. She has one day left to work on her current job before she starts on with the office of the state fire marshal (part of the state police). I will see if I can get her to blog a little about that.

Great C.S. Lewis quote

I posted a portion of this quote on Facebook today. Then I found myself wanting to read the context in which it was written. Well here it is!

“But there must be a real giving up of the self. You must throw it away “blindly” so to speak. Christ will indeed give you a real personality: but you must not go to Him for the sake of that. As long as your own personality is what you are bothering about you are not going to Him at all. The very first step is to try to forget about the self altogether. Your real, new self (which is Christ’s and also yours, and yours just because it is His) will not come as long as you are looking for it. It will come when you are looking for Him. Does that sound strange? The same principle holds, you know, for more everyday matters. Even in social life, you will never make a good impression on other people until you stop thinking about what sort of impression you are making. Even in literature and art, no man who bothers about originality will ever be original: whereas if you simply try to tell the truth (without caring twopence how often it has been told before) you will, nine times out of ten, become original without ever having noticed it. The principle runs through all life from top to bottom. Give up your self, and you will find your real self. Lose your life and you will save it. Submit to death, death of your ambitions and favourite wishes every day and death of your whole body in the end: submit with every fibre of your being, and you will find eternal life. Keep back nothing. Nothing that you have not given away will ever be really yours. Nothing in you that has not died will ever be raised from the dead. Look for yourself, and you will find in the long run only hatred, loneliness, despair, rage, ruin, and decay. But look for Christ and you will find Him, and with Him everything else thrown in.”

~C.S. Lewis, Mere Christianity