Category Archives: ubuntu

cure cancer with leftover azure credits

An azure window grid, reflecting clouds. Perfect fit isn't it?Maybe you have some Azure credits lying from a Visual Studio subscription you have from work, waiting to be spent on cool and nifty experiments, but don’t end up actually using them.
How about spending some of those dollars on cancer research? Or help find a cure against Zika? Fighting AIDS maybe?

Enter the World Community Grid, a vast grid computing network running on the Open Source BOINC client software, started as a philanthropic initiative by IBM.
Sounds good right?

All you need to do is create a WCG account, spin up a Linux machine on Azure, install the BOINC headless client on it and link it to your account. In about half an hour you’ll be computing cancer markers, folding genes or fighting some horrible disease. Well, the software will be doing that really, which is even better.

Here we go, step by step.

1. Setup your Azure Linux machine, I chose an Ubuntu 16 LTS machine. I pick the classic VM because its way easier to setup.
Depending on the type of machine you’ll have more compute power and thus turning out more results. Try a few out and see how you can maximize your Azure credits.

2. Once provisioned, log in using PUTTY or your favorite SSH client. Now it’s time to update the Linux packages and then install the BOINC client:

sudo apt-get update
sudo apt-get install boinc-client

3. Setup auto startup of the BOINC client, so if your machine reboots, you don’t have to go in and start it up yourself (automate all the things remember):

sudo /etc/init.d/boinc-client restart

4. Get your BOINC authentication key so you can hook up the client to your account:

boinccmd --lookup_account https://www.worldcommunitygrid.org

5. Now use the key to attach your selected projects from WCG:

boinccmd --project_attach https://www.worldcommunitygrid.org

Of course you want to check what’s going on, so you can check the BOINC client’s state like this:

boinccmd --get_state

This should give you a list of the tasks and their state. It might take a while before they start kicking in, but you’ll see results coming in after a day or so on the WGC website under your contribution history.

That’s about it. Your client is all set up. All you need to do is keep those VM’s running in the cloud, which normally takes non effort at all. Neat.

There are more boinccmd command line switches in the documentation if you’d need to troubleshoot or find out more.

What’s next? Well, you can set up more than 1 machine if you like, or a heavier one and see what gives you more bang for your buck.  You can also join my World Computing Grid team called “Team Azure” and see how many cloud bucks we can burn. It’ll be effortless fun, I promise! ;)

Credit goes to Joel Christian’s headless Ubuntu installation guide. His guide made my quest to setup BOINC on an Azure Ubuntu box a lot easier.

Photo by Dan, cc-licensed.

getting a wordpress linux box up in 5 minutes (*)

diving

If you’ve ever went to the trouble of setting up WordPress on a Windows machine yourself, going through a PHP, MySQL and phpMyAdmin installation, then sort through all the IIS crap you run into you’ll love TurnKey Linux virtual appliances (aka pre-installed virtual machine boxes).

You can for example download a WordPress appliance which has all the stuff mentioned above pre-installed, launch it in VMWare Player, go through a 5 minute config et voilà! You have your very own virtual Ubuntu box up and running with a fully functioning fresh WordPress install on it. You can even flex your 1337 Linux command line skillz through “Shell in a box” which simulates a shell window in your browser. Or you can use SFTP/SSH. Wickedness indeed.

There’s more fun to be had though. Lot’s of other cool appliance are available containing tons of Open Source Software to be messed with. There’s a LAMP stack, one for Drupal, Ruby (how hip!) etc. Not quite geeky enough for ya? Well alright, go ahead then, get one of those appliances and upload it to Amazon EC2 and be all “in the cloud”. Cause they can do that you know. Oh yeah.

Don’t know if it’s a good idea though. Security wise and all.

(*) If you have VMWare Player installed and already downloaded the zip file of course. :)

Photo by MissMaze, cc-licensed.

still a windows geek

Originally this post was called “I’m a Windows geek”, and was about how I installed Ubuntu after not being able to reinstall Windows XP because something was making the hardware detection lock up. Using Ubuntu I did manage to get through the hardware detection, and eventually diagnosed the problem to be able to reinstall the Redmond OS.

I spent a few days in Ubuntu back then, as it was the only running OS on my machine, and I thought that was a good time to find out if I could do everything I did on my Windows machine. At first I was impressed. Ubuntu installed without a glitch, basic software was installed and the UI was slick. Problem was I had to find replacement Linux tools for all the stuff I was used to in Windows and then I started noticing I’ve gotten quite used to the WinWorld apparently.

Little things ended up being very frustrating though. Shortcuts that work different in FireFox, mouse wheels that didn’t work at all… A lot didn’t feel intuitive coming from an MS system.

Eventually I managed to reinstall XP, and I totally gave up on the Ubuntu setup. A number of months ago I retried the Ubuntu path, upgraded it to the latest version and give it another shot. I Just noticed that it has been a few months again since I even booted it…

No matter how much Linux pwnz the Windows OS according to some, when you’re used to it, you kind of expect the same features. It sucks having to give up your favourite programs for alternatives that aren’t quite the same. Some of them are in essence equally good, but it doesn’t have to be that different to start sucking compared to what you’re used to.

WinAmp for instance totally rocks. I haven’t seen anything quite as good on Linux (or on Windows for that matter). Maybe I’m wrong though. I haven’t spent quite as much time searching for software tools on Linux than I have on Windows, I have to admit that. But luckily things are getting better at that front. Since I used a lot of FOSS software, and a lot of that is being ported over both platforms, I don’t have to stop using my beloved FireFox, GIMP, Open Office or VLC, which is great. So migrating is becoming a lot easier because of this, but not quite easy just yet.

One other huge frustration is that in Linux some things simply don’t work. ATI video cards anyone? Dual head displays? In fact, one of the differences between Windows and Linux in my eyes is this:

On Windows I’m surprised if a new piece of hardware I got doesn’t work.
On Linux I’m surprised (and happy) if it does.

I’ve gotten used to my OS to just work for me. I don’t feel like spending most of my time figuring out how to get something basic to work. It can be fun digging into configuration files and advanced settings if you have the time to do so, but in most cases I just want to run Setup.exe > Next > Next > Done and start using the damn app. By using Ubuntu I rediscovered how easy it can be to setup a Windows system.

So I guess I’m still a Windows geek for now.
Vista here I come? Oh crap…

Photo by Andrew Mason, cc-licensed

how to fix GRUB problems

After replacing a dead power supply I found out my GRUB boot menu refused to start the selected OS.
It just spat out this horrifying message:

Grub Error 21: Selected disk does not exist

After some Google-ing and asking some questions in the #grub IRC channel I downloaded a tool called SuperGrubDisk, wrote it to an oldskool floppy disk and managed to boot Windows and Ubuntu once again.

Now I at least knew my system wasn’t completely screwed, and it was just GRUB acting up for some reason. Well the reason was actually that during the initial installation my hard drive was recognized as hd1 instead of hd0. For some reason this had now changed after unplugging and replugging cables to replace the power supply. Thanks to SuperGrubDisk I managed to figure out this was the problem.

Using info on their wiki I figured out the GRUB configuration file is located in /boot/grub/menu.lst, and can be edited with any text editor. After manually changing the HD settings, all is well again.
So hurray for open source, and configuration files in plain text format!

While I was in there, I also changed the default startup OS and shortened the default 10 seconds to five. I must have thought about doing that for ages, but never got around to it.

finding out where software is installed on ubuntu

The Infamy of a Story Never Told by Felipe Morin
Pic by Felipe Morin, cc-licensed

For someone not accustomed to the Unix file system hierarchy you might have a hard time figuring out where the heck that package manager installed software you just selected. That is when it doesn’t occur automatically in your Ubuntu Application menu in the first place. Well there is a simply way to figure that out without having to look through all those mysterious usr, var and etc folders.

  1. Open up your Synaptic Package manager.
  2. Search and select the package you want to know the installation folder of.
  3. Right click it, and select Properties.
  4. Go to the Installed files tab of the property window.
  5. There you have it, all installed files and there location on your disk.

Now you can manually browse to it and run it by double clicking the binary.
If you want to add a shortcut or launcher to your Applications menu for the newly installed app, you can do this by right clicking the Applications menu, and selecting “Edit menus”.
Step by step details on how to add a new entry can be found on ubuntugeek.com.