Chasing Linux mount point indirection

It can be a challenge to track down what mount point on a Fedora/RHEL Linux box belongs to which physical disk partition when there are several layers of indirection including Logical Volume manager, Encrypted Disks and UUIDs. Fortunately, the computer does it for us most of the time. But when I, as a human being, needed to step in and figure it out, google came to the rescue. Here are my old notes.

cat /etc/fstab (my transcription of the info):
 / is /dev/VolGroup00/LogVol00
 /home is /dev/mapper/luks-625f820f-1aba-45b3-aacd-4d17dcc9240a
 swap is /dev/mapper/luks-a9362b00-c1c6-470f-9b5b-4e062d96ff10

cat /etc/crypttab:
 luks-625f820f-1aba-45b3-aacd-4d17dcc9240a UUID=625f820f-1aba-45b3-aacd-4d17dcc9240a none

sudo blkid
 /dev/mapper/VolGroup00-LogVol02: UUID="625f820f-1aba-45b3-aacd-4d17dcc9240a" TYPE="crypt_LUKS"

sudo lvscan
 ACTIVE '/dev/VolGroup00/LogVol02' [363.09 GB] inherit

sudo pvscan
 PV /dev/sda2 VG VolGroup00 lvm2 [465.66 GB / 0 free]
 Total: 1 [465.66 GB] / in use: 1 [465.66 GB] / in no VG: 0 [0 ]

sudo fdisk -l
Device Boot      Start         End      Blocks   Id  System
/dev/sda2 14 60801 488279610 8e Linux LVM

I don’t like chasing down that many levels of indirection, so I normally try to simplify things on a desktop system by not using LVM.

Experiencing Android on an HTC EVO 4G LTE

In January, I joined the bandwagon and bought a smartphone. I’m frugal, so I went with https://ting.com/ for my provider, and I’m paying about $15 per month for 100 minutes, 100 text messages and 100 MB data, and I don’t get reamed if I go over those limits.

I would have bought an iPhone, since I’ve been using an iPod Touch for the past two years, but Ting only offers Android phones. So I purchased the HTC EVO 4G LTE, which is an improved version of the HTC One X, although it has the dumbest name ever. It’s a fantastic smartphone, has a fantastic screen, and it shopped with Ice Cream Sandwich — the first release of Android that I’ve liked. Now it’s been upgraded to Jelly Bean, which is better in subtle and worthwhile ways.

What’s better with iOS (iPhone and iPod Touch)?

  1. Screen orientation change doesn’t delete data. This is a major black-eye on Android. Every time the screen orientation changes, the app’s UI is destroyed, and unless the developer took special pains, all data is lost. I’ve lost plenty of data (usually paragraphs of notes that I’ve entered with a bluetooth keyboard) this way with my Android, whereas with iOS, it wasn’t a problem.
  2. Universal media control on lock screen. FF, Pause/Play. If Jelly Bean fixes this, then I haven’t seen the fix because HTC’s Sense UI took it away.
  3. Screen orientation lock so that when I’m laying on the couch, trying to read, it will stay in the correct screen rotation mode. As a workaround, I have an app that locks the orientation.
  4. Peripherals. You’ll find a wide range of cases, keyboards, and peripherals for Apple i-devices at Target, Wal-Mart, Best Buy and elsewhere. Not so much for Android devices. Bluetooth peripherals (speakers, headsets, etc.) offer Android somewhat equal footing.
  5. Integration. Our Honda Odyssey integrates beautifully with our iPod Touch, showing album artwork on the in-dash screen, and allowing browsing and selection of albums. With Android, I can play my music over bluetooth, and that’s about it.
  6. Publishers. Everyone publishes content for iTunes and iTunesU.
  7. Easier to manage app notifications — it’s all in once central place. Jelly Bean introduced this ability, but it’s not in one central place. I disable notifications from any and all games. It’s unacceptable for them to bother me, ever.
  8. Updates. With an Apple product, you get operating system updates for three years. Not so with most Android devices. You’re lucky to get one OS update. The solution would be to purchase a Google-branded phone like the excellent Nexus 4, and then you will get two years of OS updates.
  9. It ships with a note-taking app by default.

What’s better with Android?

  1. I can limit data usage for the entire phone, and prevent individual apps from using mobile data. Since I’m using Ting, this is a big deal.
  2. Hardware connectors are cheaper (HDMI output)
  3. Widgets
  4. Google integration and authentication is SO much less hassle.
  5. WiFi Analyzer — is it even possible on an iPhone?
  6. AppLock Pro allows me to hand my Android phone to my children, knowing that they can only access the apps that I’ve allowed. Apple’s guided access is almost as good, but doesn’t allow me to define a range of apps they are allowed to use — it’s on an instance-at-a-time basis.

What’s better with the HTC EVO 4G LTE compared to an iPhone or iPod Touch?

  1. The larger screen makes reading content a much more enjoyable experience compared to my iPod Touch 4th generation.
  2. The EVO 4G LTE allows 32GB storage to be inserted.
  3. The battery is more easily replaceable.

Lessons learned:

  1. Most apps are fantastic on Android, just like on iOS: mint.com, Gospel Library, Pandora, Gmail, Dropbox, Kindle reader, Google Earth.
  2. A purpose-built digital camera is still better. Although I love the camera on the EVO 4G LTE, my Canon PowerShot takes better pictures.
  3. Gmail eats long-typed emails — ones that I type with my bluetooth keyboard. So I don’t trust gmail for anything but reading, searching, and short replies.

Here are my most used and favorite apps for Android:

A final note about ting.com: Although they do voice roaming on Verizon’s network when no Sprint tower is available, they never do data roaming. This means that when I’m out-and-about at my city library, or shopping, I don’t have a data connection. For the price, I’m willing to live with it. For a more expensive plan, yet more affordable than Sprint or Verizon, it would have been ideal to purchase a $300 Nexus 4 and use T-mobile as my provider.

Software rot and maintenance

Software doesn’t exist in a vacuum — the environment and its inputs and outputs change over time. So it’s likely to break at some point and will require maintenance.

I’ve got a now-ancient static webgallery generator that I’ve tweaked and used for more than a decade. I enhanced it so that it creates animated gif thumbnails for movie files using a combination of transcode and mencoder. Recently, I added an MP4 movie file along with my photos. The web gallery generator chugged away longer than usual, and I gave it no notice — until it filled up my hard drive.

It wasn’t expecting to encounter an additional movie file format, and when it did, it went with the default of using ImageMagick to generate the thumbnail, instead of using my alternate solution for movie files — and ImageMagick filled up my hard drive with a giant temporary file.

So I edited the Perl-based web gallery program and added .mp4 and .m4v files to the list of special cases to be handled separately. It will work until the next time another new movie file format is encountered, and then I’ll need to maintain it again.

Nearly all software is that way — it must be maintained, or else it rots.

Ubuntu and how to disable advertising

Post-Fedora life with Ubuntu 12.04 has been good. I haven’t upgraded to 12.10 (I’m going to stick with a long-term-support release for now), but I’ve heard from people that refuse to upgrade due to the new advertising that shows up in search results. Apparently, Canonical 1) is trying to find ways of generating revenue, 2) made it very easy to disable the advertising. LWN.net explains what’s going on, and the Electronic Frontier Foundation explains how to disable the advertising.

http://lwn.net/Articles/528781/

https://www.eff.org/deeplinks/2012/10/privacy-ubuntu-1210-amazon-ads-and-data-leaks

The simple command to disable the advertising is:

sudo apt-get remove unity-lens-shopping

If one is concerned about this, it seems to me that one ought to also be concerned about online advertisers and about gmail sorting through one’s email.

 

Norton turns my computer into a snail

We’ve used Norton Online Family for well over a year in order to give our children’s accounts time and website restrictions. During that time, our five-year-old Vista computer became unbearably slow, and it’s been difficult to identify the culprit, since the I/O slowness is attributed to svchost.

My experience with other Norton consumer products has been poor, and so I guessed that by uninstalling their Online Family software, it might improve performance. Since uninstalling it, the computer feels at least twice as fast — for login and logout, for network file copies, etc.

I liked Norton Online Family’s functionality, but I couldn’t bear it’s performance hit to the user experience. Now I’m in the market for another solution. Do you have any recommendations?

Arstechnica: Use your phone as a document scanner

Arstechnica has an article about using a smartphone as a document scanner “in a pinch”. It’s fun to see the possibilities that technology opens up.

Seven years ago, I wanted to scan some journals for archival purposes. Using a traditional flatbed scanner would have taken far too long, and wouldn’t have worked well since the pages were bound. So I mounted my Olympus C-8080 digital camera on a tripod, added crude lighting from lamps, and quickly photographed the pages. It may not be perfect, but it’s better than nothing.

Content-centric networking with CCNx

This was an interesting topic to read about: Content-centric networking with CCNx:

Content-centric networking (CCN) is a novel approach to networking that abstracts away the specifics of the connection, and focuses on disseminating the content efficiently.

CCNx is the brainchild of PARC’s Van Jacobson, and if anyone is qualified to rethink core Internet protocols, Jacobson is.

 

The downside to goals

When I saw this article staring up at me from the kitchen table this evening, something inside “clicked”, and I thought, “Of course! It makes sense that goals can have a downside.”

A downside to goals? While important, goals can be dangerous if used improperly — by Michael De Groote, Deseret News:

Goals are pervasive in American culture. And the dark side of goals is just as pervasive. From the mortgage crisis to bank bailouts, government leaders struggle to solve problems caused by goals that went astray. And the solutions to these problems are goals also.

The point of the article is that goals, by nature, narrow our focus, and sometimes it is at the expense of important priorities like ethical behavior, cooperation and seeing the big picture.

The article concludes by listing ten ways to evaluate goals so as to avoid “dark side effects”.

Postfix on Ubuntu 12.04 with Comcast

After having had Ubuntu 12.04 installed for months, I finally moved my old Fedora services over to it, including Postfix. Here’s how I configured it.

I configured /etc/aliases so that local email destined for ‘root’ (including regularly scheduled system cron jobs) is delivered to my local account, instead of being sent to root@comcast.net (they don’t appreciate getting my SPAM):

root: myusername@localhost

I added the following to /etc/postfix/main.cf. Notice that I appended a “.NOT” to the relayhost. I did this initially so that I could send test email messages, and make sure message delivery was correct, before allowing email to go to my ISP. More on this later.

alias\_maps = hash:/etc/aliases
alias\_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = $myhostname, localhost.$mydomain, localhost, robinson-lin
relayhost = [smtp.comcast.net.NOT]:587
smtp\_sasl\_auth\_enable = yes
smtp\_sasl\_password\_maps = hash:/etc/postfix/sasl\_passwd
smtp\_sasl\_security\_options =
sender\_canonical\_maps = hash:/etc/postfix/sender\_canonical
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox\_command = /usr/bin/procmail -a "$EXTENSION"
mailbox\_size\_limit = 0
recipient\_delimiter = +
inet\_interfaces = loopback-only

I added the following to /etc/postfix/sasl\_passwd:

smtp.comcast.net MyUsername:MyPassword

I added the following to /etc/postfix/sender\_canonical:

jaredrob MyUsername@comcast.net

I ran the following commands:

  chmod o-r /etc/postfix/sasl_passwd
  postfix check
  postmap /etc/postfix/sasl\_passwd
  postmap /etc/postfix/sender\_canonical
  postalias /etc/aliases

Next, I tested my email configuration by sending test email messages (using ‘mutt’ or ‘mail’)…

  1. From my local linux account to my local linux account, to make sure local delivery worked and didn’t get sent to my ISP.
  2. From the local ‘root’ account to my local linux account.
  3. From the local ‘root’ account to my local ‘root’ account, to make sure it was forwarded to my local user account (remember /etc/aliases?)
  4. From my local account to an external account (gmail, etc.)
    1. I didn’t expect it to be delivered at this point. Remember the “.NOT” I added to my relay host? This way, I was able to see where outbound email was destined using “mailq”. This saved me grief because I found misconfigurations that would have lost the email.  I used ‘postsuper -d ALL’ to delete all test messages from the queue.
    2. When I knew delivery was destined for the correct machines, I removed the “.NOT” from main.cf, and ran “service postfix reload” (as root).
    3. Next, I sent email to an external email address, and made sure it was delivered

Then I configured and ran ‘fetchmail’ briefly (hitting CTRL-C after a few were downloaded), and made sure messages were delivered to my local account properly. I’ve been pleased using Ubuntu with postfix, fetchmail and procmail and archivemail. I often log in remotely using SSH and use mutt to read my email. I also use Google Mail. I’ve set up rules to forward some email to my ISP account, which get downloaded using fetchmal via cron job.

Why do I bother saving my email to my local machine? I like redundancy and backups, I like the speed of using a command line email reader, and I have ten years of email archived on my local machine. It’s been very useful to be able to search through that email for old software license keys, website passwords, email addresses and such.

Backpacking in the Uintahs

In July, my oldest son and I went backpacking into the Uintahs for three days, thanks to the “can-do” attitude from my father-in-law. It’s been twenty two years since I’ve been to the Uintahs, and I was nervous about my ability to hike nine miles, as well as for my nine-year old. We went on practice hikes to prepare. My old external frame backpack was still in mostly working condition, except that the mesh backing had become loose. Apparently, not even nylon lasts that long when “tight”. So I bought a used internal frame backpack and used it instead.

From everything I read, good quality socks were the most important part of backpacking comfort, so we bought morino wool socks. They kept our feet dry, comfortable and blister free. It took us nine hours to hike the beautiful trail, and it felt so good to make it to camp and to eat dinner.

We packed as light as we could, and instead of a camera, I brought my iPod. This was one of the times I wished I had a smartphone with more pixel density. I put it in a ziplock back to protect it from the elements, or from a leaky water container.

The second day, we did a day trip of eleven miles, attempting to reach the top of Mount Emmons at 13,440 feet. We climbed up the boulders of the mountain, and walked across the crest of the mountain. It was also a giant boulder field, above the timber line, and it’s amazing that anything grows there in such a harsh climate. Giant spiders were plentiful, and their webs were impressively strong. We avoided them when we could, and broke others, sending their inhabitants scurrying. The ground cover was a hardy, crunchy variety. The yellow flowers gave it a rugged beauty. We occasionally heard the bark of a dog from one of the lakes far below.
We reached about 13,000 feet and spotted a white, hairy mountain goat. My energenic brother-in-law, Dan, went ahead of us. We were out of breath in the thin air and stopped frequently. We communicated with Dan via radio. We ran out of time to make it to the top, unless we wanted to hike back in the dark or spend the night on the mountain, so we turned back. Dan passed us on the return trip, and we saw his head bobbing up and down on the boulders a mile or more ahead of us. Later, we noticed that we got sunburned more quickly than at lower altitudes.

At one point, Dan picked up a stack of layered sandstone rocks and carried them so as to slow himself down.

The last mile before we got back to camp, I felt like I could lay down in one of the few flat places, in the dirt, and go to sleep. We kept going and made it back to camp. We boiled water with my 20-year-old MSR whisperlite stove, and my in-laws boiled their water with a new alcohol stove. My son and I enjoyed rehydrated chicken and potatoes for dinner.

Amusingly, as tired as I was, I couldn’t sleep until nearly 3 A.M. because my Walrus backpacking tent was too hot. So I read from the scriptures on my iPod, and typed out some of our experiences on the iPod touch-screen keyboard while laying in my tent.

During our hike back to the trail head on the third day, we passed a forest ranger riding a horse, as well as an entire family riding their horses for a day trip. I was a bit jealous, since my back was in pain. For the last two miles, I carried my son’s pack in my arms, which counter balanced me so that there was no back pain. We were also able to keep up a quicker pace that way. Reaching the trail head felt great. Taking a shower forty five minutes later felt even better.

Our next adventure is to hike Mount Timpanogos.