Tuesday, January 7, 2014

Red Hat Enterprise Linux Server in Amazon Web Services won't boot after yum update


Happy New Year, fellow people trying to make things work.

Hopefully everyone is mostly succeeding despite the fact the war on entropy cannot be won.

Interesting problem this morning, in a quest to live a more portable life I just moved all my services from a home network to Amazon Web Services. Great deal on the Free Tier there, perfect thing to evict all your local services and get them in the cloud.

Problem is, I did the normal thing you'd expect to work after bringing up the Amazon instances - a simple 'yum update'.

yum did it's thing, packages were updated, and things looked just fine. You can't be sure your changes are good until you reboot though, and here's where the trouble started.

After a yum update on the stock RHEL 6 AMI, your AWS instance will fail to boot. You go to grab the system log from the instance and you see this most unhappy nugget at the bottom:

VFS: Cannot open root device "LABEL=_/" or unknown-block(0,0)

That's not a good moment. You're not alone though. An example with links to more info:

https://forums.aws.amazon.com/thread.jspa?messageID=477611&threadID=132185

So, root cause is that Amazon Web Services has to use custom kernels in order to deal with their storage infrastructure. Hey, that's totally understandable - I'm not sure how they'd implement it if not that way, and I'm not paying anything anyway so I am certainly not complaining.

But I'm still not booting, and that's not good.

So here's how you pull your instance back to the land of the living, courtesy of Alex Bell:

http://amazonserver.blogspot.com/2013/01/recover-broken-amazon-ec2-instance.html

The thing you need to change (assuming you followed Alex's instructions to mount the EBS volume) is /mnt/boot/grub/grub.conf - specifically deleting the first kernel stanza and leaving only the entry for the Amazon-specific "ec2-starter" etc kernel there so your instance will boot.

Finally, to stop this from ever happening again what you need to do is fire up ye ol' 'vi /etc/yum.conf' and add an 'exclude=kernel*' as the last line in the block of header lines so the kernel is never updated again automatically.

Anyone else seen this? Any other "hey I'm an AWS n00b" problems I should look for next?

Hope this helps someone.

Cheers!

Thursday, September 19, 2013

How to make your Android home screen useful (iphone -> android transition 4)

Common preamble: I'm looking to break my Apple iDevice addiction so I can get off the expensive hardware treadmill. So I'm transitioning to Android. I have a MacBookPro running 10.8.x as my main device. I'm currently on an iPhone 3GS after I sadly lost a pristine iPhone 5 in the woods, and my wonderful mother donated her used Samsung Galaxy S3 when she upgraded, so here we go.

One thing Apple does well is allow you to unlock the phone and get into the app you need with 2 taps maximum, when configured well. You've got your most used apps on the bottom available on all screens, then you can make folders to collect most-used apps of a similar type on your main screen, and you're just about guaranteed to be 2 taps from getting something done.

Android by default appeared to me to be a big pretty wasteland when I first turned it on. You can't fit too much on any screen and things are spread all over the place. You have to tap a ton to do anything. What gives? Apparently this is another part of the "just works" vs "you can configure everything" iphone vs android philosophy. And I don't mind that, I guess I'm just surprised that the defaults are so awful so much of the time, and this is an area I think the iphone gets right.

So how to fix it so you're back to 1-tap mostly, and 2-tap max for your apps? You need a "Launcher".

I read a bunch of reviews and settled on NovaLauncher. It does exactly what I need and isn't too difficult to configure.

I went hog-wild at first and configured something like 7 virtual screens etc, before I realized I was having to think a lot about where things were, at which point I went the other way and have just two screens now - one that is as efficient and dense as I can make it, and the other for "everything else".

I configured it for a grid of 5x8 icons (I'm on a relatively roomy galaxy S3 remember) along with a dock. I have dragged my most used single apps to the dock (mail, go sms pro, etc) so they are all there, then for the other icon spots I've added any of the apps I use to the launcher, then dragged them into 4-icon groupings by plopping them on to each other. I added a 1-row google search widget at the top so I can find anything quickly in a pinch, then a 2-row weather widget (which is pretty ridiculously inefficient but I like weather), and I still have access to 104 different apps with 2-taps maximum, and I can see all the icons so I don't have to think about it.

Not bad.

I know my app usage patterns change over time so I put apps I'm trying out, or infrequently use, or that are being kicked out in favor of new apps on the other "everything else" screen, and keep the main screen efficient. That's worked for me on the iphone for a few years so I can't see why it wouldn't work here.

You guys have better ways of organizing a screen for maximum getting-things-done-ness and I'm missing the boat on something? Clue me in if so. Cheers!

Android Mail - using email on Android can be awesome (iphone -> android transition 3)

Common preamble: I'm looking to break my Apple iDevice addiction so I can get off the expensive hardware treadmill. So I'm transitioning to Android. I have a MacBookPro running 10.8.x as my main device. I'm currently on an iPhone 3GS after I sadly lost a pristine iPhone 5 in the woods, and my wonderful mother donated her used Samsung Galaxy S3 when she upgraded, so here we go.

As mentioned in passing in the second post in this series I have a lot of email accounts, and over time they've all ended up hosted by google.

You'd think the default Android email app would be great then, or the gmail app would be good on Android, but for a couple reasons I believe they suck. The main reason is that they don't provide a unified inbox for all your accounts on a single screen. I had no idea this was a thing, having gotten used to the built-in iphone mail app, but apparently it is. And the default clients just don't get it. I'm not going to get one new mail in each of 5 clients and spend a lot of time thumbing into and out of the various inboxes - that's my main use case and it's horribly inefficient. Unified inbox is non-negotiable.

Search around the internets and you see lots of reference to K-9, but apparently that app has gone rogue with offshoots from old forks, a new "Kaiten" version, and updates to the K-9 app itself which apparently suck. So I stayed clear, but it may work for you.

The one I finally went with was MailDroid. Configured it up pretty easily (or as easily as it can be when you have all 5 of your google accounts configured for 2-factor authentication and you have to generate application-specific passwords, which you do so your account isn't easily attacked, right?), et voila, pretty configurable control over how each account works (using server folders where desired, how many mails to load etc) and a unified inbox.

MailDroid gets bonus points for allowing me to shrink fonts for real to get more info on the screen, for allowing me to indulge my college-days hacker self with a reverse video theme, and for allowing me to easily set a global signature and global connection settings.

Have you discovered a client better than MailDroid? Any tips or tricks if you are using MailDroid?

Tuesday, September 17, 2013

Android Contacts - importing them from iCloud (iphone -> android transition 2)

Common preamble: I'm looking to break my Apple iDevice addiction so I can get off the expensive hardware treadmill. So I'm transitioning to Android. I have a MacBookPro running 10.8.x as my main device. I'm currently on an iPhone 3GS after I sadly lost a pristine iPhone 5 in the woods, and my wonderful mother donated her used Samsung Galaxy S3 when she upgraded, so here we go.

Once I figured out the most basic thing outlined in the first android transition post, namely how to make it so I plug the phone in and it doesn't suck, then how to transfer files, I'm ready to get my data on there. Let's start with contacts

I'm going to assume you have about 4 different google apps accounts set up, because you're a smooth operator too, so you're fine with google storing your contacts. But right now they're all in icloud, because when you have a mac and an iphone, that's just what you do, right?

What you need to do is figure out a way to get the Contacts app on your mac to have a connection to both your google contacts storage area, and the icloud.

That's not an obvious thing to do, but you can add a "CardDAV" provider to Contacts, pointing at your google account following these instructions here: http://android.appstorm.net/how-to/synchronization/keep-android-and-ios-in-sync-part1-data-email-contacts-and-calendar/

Then by selecting all the cards in your "All iCloud" area and dropping them on to the "All Google" area, you'll force Contacts to essentially freak out, work super hard, but transmit them all to google successfully whereupon they will slowly trickle over on to your android phone in a background sync.

This worked with me with 960 cards (each one of them a dear friend).

Anyone know any better ways, or does this work for ya'll too?

Android File Transfer Fun (iphone -> android transition 1)

Common preamble: I'm looking to break my Apple iDevice addiction so I can get off the expensive hardware treadmill. So I'm transitioning to Android. I have a MacBookPro running 10.8.x as my main device. I'm currently on an iPhone 3GS after I sadly lost a pristine iPhone 5 in the woods, and my wonderful mother donated her used Samsung Galaxy S3 when she upgraded, so here we go.

First issue: Connecting the phone to your computer sucks out of the box.

Android File Transfer is all sorts of bouncing in the doc and annoying. The phone itself is pretty adamant that you need to download some sort of "Kies" syncing program.

For both of these, my take is, don't do it.

Android File Transfer is pretty annoying but useful in a pinch. So you can use it when needed but have it STFU when not needed by following these lovely instructions from Nicole Reid - https://cooltrainer.org/2012/12/21/taming-android-file-transfer-on-mac-os-x/

Kies appears to just all around suck and I should have known that because it was what the manufacturer wants you to use, and those always suck don't they? Uninstalling it is a pain apparently but the internet comes to the rescue again. I used the instructions for the Terminal at the bottom of the page, just like you will, naturally.

AirDroid seems to be a reasonable app going forward (and also satisfies the "Find My iPhone" use case) but what other things do you guys use for Android file transfer / backup to get your files on and off the machine?

And is there anything like CameraSync from iOS-land exist for Android so my priceless data (photos, videos) are backed up reliably by default, but not just too google?

Sunday, July 24, 2011

Tomato on a WRT54G limited to 25 or so Mbps with QoS - use a faster router for higher speeds

This is a very specific post, if you couldn't already tell by the title - just a tidbit for anyone else curious and trying to make all the junk surrounding them in the world work for them instead of frustrate them.

If you have an internet connection of 25Mbps or less down, and you are using the wonderful tomato firmware on the works-pretty-good linksys/cisco WRT54G, you've been having a great time, things work wonderfully and they will continue to work wonderfully.

However, if you like me use Comcast high-speed internet and your area gets the infrastructure upgrade from DOCSIS 2 to DOCSIS 3 you'll find that you have 50Mbps of bandwidth available, and you might opt for that plan.

At that point you'll realize that tomato running QoS on a WRT54G can't keep up with more than 25Mbps so you won't get all the speed you want.

Never fear though, the works-pretty-well and slightly-newer WRT310N can handle it, and the almost-as-pretty but just-as-functional DD-WRT firmware does the job nicely if you follow the instructions well.

And just for another random tidbit from my life of trying to make things work today, if for any reason you attempt to use a Thule Rapid rail / aero cross bar with their Prologue bike rack, you'll need four more grade 8 1/4" washers per bike rack to get the bolts secure on the aero bar, but the instructions aren't aware of that and they don't give you the extra washers. Great rack, bad instructions, bad testing, Thule. Shame!

Cheers

Sunday, June 26, 2011

Open links from external applications in a new window in Google Chrome on Mac OS X

I love tabbed browsing. I switched to Firefox way back in the day partially because Firefox allowed tabbed browsing. I recently switched to Google Chrome, which also has tabbed browsing.

I also love virtual desktops. I switched to Linux on the desktop way back in the day partially because it supported virtual desktops. I currently use Mac OS X which has "Spaces", so I continue to have virtual desktops.

However, when you combine the two, you potentially have a problem. If you have a web browser open, but it is not on your current virtual desktop, and you click on a link in a different application (a newsreader, perhaps), do you want that external link to open in a new tab in an existing browser window on a different space, or do you want it to open a new browser window on your current space, and open the link in a new tab on that new window?

Turns out lots of people prefer the second option - they want a new window on their current space with the link opened in it. Now, adults may disagree, and Firefox as well as Safari have a preference setting which allows you to change the behavior to either of those options. Everyone's happy.

Except Google Chrome users. Chrome always opens external links in the most recently used browser window, where ever it is.

This causes some people to be upset, example: http://www.google.com/support/forum/p/Chrome/thread?tid=1eb2eb870ba29e97&hl=en


I was also upset. I am a programmer though, and I can make the computer do what I want normally. So I made it do what I want.

1) Download this AppleScript bundle, and unpack it in ~/Library/Scripts/
2) Double-click it (to register it with Launch Services)
3) Open Safari and go to the General tab in the Preferences, and set your app as the default browser.
4) Share and enjoy

A fair bit of credit for making this work goes to Pepjin de Vos - http://pepijndevos.nl/2010/05/open-external-links-in-running-browser/ - I repurposed his idea/script to implement my workaround here.