How to fix “No bootable device” after Ubuntu installation

Monday, April 22nd, 2013

When installing Ubuntu on a disk partitioned with a GUID partition table (GPT), the Ubuntu installer doesn’t set the boot flag correctly on the partitions, and on computers with older bioses (like my Intel ICH9 board), the BIOS will not recognize the disk as bootable and will refuse to start the boot loader, claiming that “No bootable device found”.

The solution is to set the boot flag on the boot partition (the real one in the GPT) as well as on the “protective MBR partition”:

  1. Start your computer with the Ubuntu live CD again, and select “try Ubuntu before installing”
  2. When the Ubuntu desktop loads, open the dash and start “gparted”
  3. When gparted starts, select your boot drive and from that select your boot partition – usually the first Linux partition on the drive, and right click it and select “flags” in the menu. In the flags dialog check “boot”.
  4. Open the dash again and start “terminal”
  5. In the terminal type “sudo fdisk /dev/sda” (or whatever your boot drive is). You’d get a bunch of warning about the disk using a GPT scheme – ignore them. type “a” to set the bootable flag and choose partition “1”. Finally type “w” to write out your changes.

Now its safe to reboot and your old computer should have no problem starting the boot loader now.

Nvidia Optimus on Ubuntu 12.04

Sunday, February 19th, 2012

Nvidia Optimus is a neat solution to the problem of power consumption vs. 3D performance in notebook computers – the computer comes with two graphics chips, an “integrated graphics package” – the Intel GMA embedded graphics and a “discrete graphics package” – the Nvidia chip. The setup works by running your normal windowing UI on the integrated graphics, only powering on the discrete graphics when you want to play a 3D game or something like that.

Recently I had the fortune to work on a Lenovo T420 laptop(1) that has this setup, and it works very well on MS-Windows with the Nvidia Optimus driver – you get battry life around 10 hours with the 9 cell battery.

Unfortunately I spend most of my day in Linux and because Nvidia does not support Optimus on Linux, you have the poor choice of either running everything on the Nvidia chip – decreasing battery life to around 4 hours if you’re careful, or disabling the Nvidia chip completely.

The solution comes from the Bumblebee project – a software suite to handle the switching between the Nvidia discrete graphics and the embedded Intel chip.

The setup is pretty simple to understand (though I suspect under the hood there are many problems to be solved): A service runs and waits for users to ask for 3D accelerated graphics. When a user starts a program using the special command optirun, the service loads the Nvidia driver, starts an X server using the discrete graphics (with the display disconnected from the actual screen) and runs the specified program on that “background” X server. Then it copies the visuals from the program that is rendered using the discrete graphics to a window on the main X server. When the program terminates, the service closes the secondary X server, removes the driver and powers down the graphics card – putting us back into the ~10 hours battery life.

The Bumblebee software had some problems in the past, but the current version – 3.0 – looks very good. There are a few seconds of delay when you launch the application (setting up the driver and X takes some time), but performance is about what you’d expect when running directly on the hardware. All this without any configuration – that is if you are running on the stable Ubuntu version.

As I can’t leave well enough alone, and whenever someone says “alpha”, I say – “I wants”, I’m running the current Ubuntu 12.04 alpha (which is not so bad – due to be released in a couple of months, it works very well). And of course Bumblebee doesn’t work properly here.

So this is what I had to do to get it running:

(more…)


  1. with an amazing 1600×900 screen, what they call “HD+”. Truly a work of art []

Installing Consolas TrueType Font for Linux

Saturday, October 22nd, 2011

This is a short “how to” article on how to get and install the new Microsoft Consolas Monotype font – this is a very nice programmer font and as described in Dan Benjamin’s “Top 10 Programming Fonts” it is highly recommended for use in your programmer’s editor or IDE (As a side note, his top selection, Inconsolata is also very nice and I highly recommend it if you don’t feel like using Microsoft created software and/or aren’t interested in performing the steps below which may or may not be legally problematic).

The main problem with using Consolas on your Linux workstation, is that this font is provided by Microsoft, and while if you are running MS-Windows (or even Mac OS-X) it may already be installed – as it is bundled with many Microsoft products, us in the Linux world have no easy (and legal) way to get to use Consolas in our code editing. Unlike Microsoft Core Fonts for the Web Consolas is not available for download – probably for the same reason the core fonts packages were pulled. But as Consolas is bundled with many Microsoft products, some are available for free download for anyone, we can use that to get us some nifty Consolas prettiness in our day to day Linux computing.

(more…)

How to set up a Warcraft 2 LAN party

Friday, February 25th, 2011

Another article in the “I need to write this for myself and what better place then on my blog” series:

If you are familiar with the old (but great) Warcraft 2 game, then you know its a great multiplayer game but unfortunately you need a “Battle.net server” to play and even if the Blizzard servers were up (and for this old game, they’re not though there are a few 3rd party free servers) – you probably don’t want to have all the party goers connect up to an external server.

So how to run a Warcraft 2 LAN party?

(more…)

Running VirtualBox on Ubuntu 11.04 Natty alpha

Wednesday, February 16th, 2011

I’m using the current Ubuntu alpha – 11.04 as my desktop OS on my laptop, and on the same laptop I sometimes need to run VirtualBox to access an MS-Windows environment.

In the current Natty alpha this doesn’t work well. I have VirtualBox 4.0 installed from Oracle’s repository, but it doesn’t manage to compile the kernel module it needs – probably because of the “RC” nature of the current Natty’s kernel (2.6.38-rc4) as of this writing.

I’ve seen many posts on the internet about running Ubuntu 11.04 as a guest in VirtualBox, but couldn’t find anyone talking about my problem, which is the opposite – running VirtualBox on Ubuntu 11.04. So here’s how to get this thing working:

  1. Install VirtualBox 4.0 (from Oracle’s repository)
  2. Install the kernel headers package for Ubuntu: sudo apt-get install linux-headers
  3. Edit the headers’ Makefile to declare the same version as the uname command: run uname -r and note the suffix after the version number, for example mine says “2.6.38-3-generic“, so I am interested in “-3-generic“. Edit the Makefile using sudo gedit /usr/src/linux-headers-<version>-3-generic/Makefile , and the fourth line should say something like “EXTRAVERSION = -rc4“. Change the value (in this case “-rc4“) to what you found out from uname.
  4. add autoconf.h to the linux include directory, because it is missing for some reason:
    cd /usr/src/linux-headers-<version>-3-generic/include/linux
    sudo ln -s ../generated/autoconf.h

Now you can run sudo /etc/init.d/vboxdrv setup and it should complete successfuly and allow you to start VirtualBox.

Enhanced by Zemanta

A New Fedora Release – Worse Than Ever?

Wednesday, May 19th, 2010

[Regarding the title – well, probably not]
I’ve migrated from Ubuntu 10.04 to Fedora 13 on my laptop (because Ubuntu 10.04 was released to the public, so its not interesting to run it anymore 😉 ) and I’ve just finished listening to The Linux Action Show review of Fedora 13 and I wanted to relate to that and to my experience of using Fedora.

The Linux Action Show review is useful, and good, but its not really fair – Chris and Bryan ranted on a lot of things that do not work well for Fedora, such as not a lot of applications pre-installed and some new and immature applications being introduced, Flash being hard to install, codecs missing and obscure instructions on Fedora’s wiki pages on how to address these issues, and more.

The thing is, is that all those comments are fair when looking at an operating system that is geared towards the general public – like Ubuntu – but Bryan and Chris themselves mentioned that Fedora is not aimed at that crowd but is meant for power users and developers (the debate about what is the target audience for Fedora is raging – I think the best description I heard so far, is from Máirín Duffy – heading Fedora’s design team – where in an interview she said “Fedora is aimed at people who want to work on Fedora).

(more…)

Another Mac-styled update for Ubuntu – Window buttons to the left!

Sunday, March 7th, 2010

As we’ve know for quite a long time now, Ubuntu is aiming to look and behave as much like Mac as possible(1) – we’ve already seen the Growl-like on screen notifications (which are rather cool) and here is the next major user interface change:

In Ubuntu 10.04 – due to be released on late April of this year – the window buttons (close, maximize,minimize) will be on the left side of the window! See here for the branding screenshots.

(more…)


  1. within 2 years Mark Shuttleworth said in 2008, so he’s clearly running out of time []

15 years in the making

Tuesday, February 9th, 2010

One of the most annoying issues with Linux’s graphical system (and any UN*X), is that if you have some keys setup for switching the keyboard layout – when using two or more keyboard layouts, such as for writing English and Hebrew – then that key combination cannot be used in any other keyboard shortcut.

Its most annoyingly present when setting the keyboard layout switching command to ALT+SHIFT (like in MS-Windows), then you can’t do any keyboard shortcut that has ALT+SHIFT in it – such as ALT+SHIFT+TAB to move to the previous window.

Well, finally there is a solution! As detailed in FreeDesktop.org’s Bugzilla and Ubuntu’s Launchpad , and thanks to Ilya Murav’jov we now have a patch to solve this ancient X11 problem.

(more…)


Spam prevention powered by Akismet