Build DKMS modules for specific kernel

After upgrading my kernel, somehow DKMS missed to build the NVidia stub modules for the NVidia-binary driver. A oneliner can solve this:

$ sudo /usr/lib/dkms/dkms_autoinstaller start 3.5.0-23-generic

Linaro embedded toolchain on Ubuntu 64-Bit

Linaro provides a specialized toolchain for embedded (bare metal) development. But after installing, I could not execute the binary:

$ gcc-arm-none-eabi-4_7-2012q4/bin/arm-none-eabi-gcc
-bash: gcc-arm-none-eabi-4_7-2012q4/bin/arm-none-eabi-gcc: No such file or directory

Also ldd claims its not dynamically linked:

$ ldd gcc-arm-none-eabi-4_7-2012q4/bin/arm-none-eabi-gcc
 not a dynamic executable

The truth is: it is dynamically linked, but against 32-Bit libraries. And since I have not yet installed any 32-Bit library, ldd doesn’t work properly. According to the readme, you should install the 32-Bit variant of libc and libncurses. Since Ubuntu is Multi-Arch, you can easily install those libs:

sudo apt-get install libc6:i386 libncurses5:i386

Now you should be able to run the Linaro toolchain on 64-Bit variants of Ubuntu.

Ubuntu: Bash prompt with Git branch

On several Git Video Tutorials people have these nice colored Git specific Bash prompts. When you are starting to work with Git, you realize that its really helpful to have the branch name around all the time. There easy and also many complex bash prompts out there, e.g. fully customizeable Git prompt scripts, one short scriptone script with functions or just a simple PS1 line.

I created one out of all of these. It shows a standard Ubuntu prompt on non Git directories, and an altered prompt inside git repositories. Inside a Git repository it shows the relative path to the Git’s root directory.

Git bash prompt

Git bash prompt

I created a Gish for it. Simple get it using curl and source it from your ~/.bashrc file:

curl https://gist.github.com/raw/4699573/git_bash_prompt.sh -o ~/.git_bash_prompt.sh
echo ". ~/.git_bash_prompt.sh" >> ~/.bashrc

Pinocc.io Wireless!

Pinoccio scout

Pinoccio scout

There’s a new project building an Arduino compatible micro controller board, called Pinocco. Pinoccio aims to be wireless like the protagonist in the children’s novel Pinoccio. Unlike many other Arduino wannabes the Pinoccio maker try to go the whole mile: The hardware runs on LiPo battery for several days, they extend the board API in order to support easy mesh networking (you wan’t many of them!) and there will be even a message broker API for the board, a MQTT based web service to publish (sensor) data to the web with a RESTful API. The only downside is the price: Starting at 49$ (including battery), its not the cheapest Arduino-like micro controller. But IMHO, given that they engineering things right, its a fair price. I looked a bit deeper at the product, and these points convinced me this is going to be a great product: Read more »

Ubuntu: Flash Galaxy Nexus with Google Firmware

Jelly Bean Logo

Android Jelly Bean logo

Some days ago I realized that Galaxy Nexus was shipped with different Firmware’s from Samsung and Google (see this post on xda). And because my Phone has Samsung’s Firmware, my Android Version is still on Jelly Bean 4.1.2. This how-to shows how to do this on Ubuntu. This procedure will clean your phone, you need to backup all data before you start! (photos, videos, music, sms…)

Install the Android utility fastboot

This utility usually comes with Android Developer Tools. But in this package only a 32-Bit version is available. Since Ubuntu 12.10 you can get fastboot directly from the repository (there are PPA’s for other Ubuntu versions, see this blog post):

$ sudo apt-get install android-tools-fastboot

Read more »

Ubuntu 12.10 and Windows 8 with Secure Boot mode

Installing Ubuntu 12.10 on a Samsung Series 9 Notebook has some pitfalls. My goal was to install Ubuntu 12.10 along Windows 8 while using Secure Boot too.

The first challenge is booting from an USB flash drive. You need to enter your BIOS by pressing F2 while booting the system. Change to the “Boot” tab, enter the sub menu “Boot Device Priority”  and move “USB HDD” in front of “SATA HDD” (using F5). Then, curiously, you also need to disable the “Fast BIOS Mode” (tab “Advanced”). You can also use F10 to select the boot device, but “Fast BIOS Mode” still needs to be disabled. Installing Ubuntu should then work as usually.

Even thought Ubuntu 12.10 supports Secure Boot, on my system, the first boot after the installation failed with this Error:

Secure Boot

Image failed to verify with *ACCESS DENIED*.
Press any key to continue.

Read more »

Switching Windows 7 and Ubuntu to UEFI

UEFI Logo

UEFI Logo

After upgrading my hard disk on my Laptop I planned to switch to a GPT (GUID Partition Table). But since I’ve a Windows 7 installation as well I had to switch to UEFI boot mode because Windows 7 does not support booting from GPT using the old BIOS/MBR bootmanager/bootloader (You can find a good Q&A about GPT support of Windows at MSDN). Luckily my old HP Elitebook 8530w already includes an UEFI enabled BIOS (without Secure Boot). It supports (like many others) the old boot mode as well as the new UEFI boot mode. By selecting the “UEFI” entry in the boot menu one can make sure that the UEFI boot mode is enabled. After reading some documentation (especially the once from Roderick W. Smith) I decided to use the rEFInd boot manager and the kernel provided EFI stub bootloader (part of the mainline kernel since 3.3.0). I’m using Ubuntu 12.10 which comes with Linux 3.5 and enabled EFI stub bootloader in the stock kernel… Read more »

Secure Boot implementation of Ubuntu 12.10 (Quantal Quetzal)

Ubuntu 12.10 supports UEFI secure boot. I did some research in order to understand the actual implementation on Ubuntu and would like to share my findings. Since Windows 8 requires secure boot, most new Computer contain Microsoft’s Platform Key. Microsoft allows to sign own binaries with this Platform Key. As outlined in the Canonical blog post Ubuntu 12.10 uses a signed version of the EFI application Shim (to maintain the chain of trust) and Grub2 as its default boot manager.

Canonicals version of the Shim EFI application

Ubuntu’s 12.10 Shim EFI application is a early version of Shim which don’t has any support for MOKs (Machine Owner Keys). Shim was made by Matthew Garrett. He wrote two blog posts how Shim works, but because Ubuntu uses an older version not all of his description apply to Ubuntu’s Shim. Matthew Garrett also published its own Microsoft-signed version of Shim. Ubuntu however doesn’t use this signed version. Read more »

Samsung Series 9 13.3″ Ultrabook (NP900X3D) Review

Samsung NP900X3D

Samsung NP900X3D

This week I got myself a Christmas gift: A shiny Samsung Series 9 Ultrabook (or Notebook, what they call it). My device came with a Sandisk SSD U100 128GB, 4GB Memory, HM75 Chipset and the Intel Core i5 3317U Processor. The device looks very nice and feels solid. I like the non reflecting screen very much, the resolution of 1600×900 feels right for the screen size (13.3″) with default DPI settings. Finger prints don’t remain on the outside of the device, but you can make them out on the keyboard. The lid shuts very well, but its a bit hard to get a grip on it to open again. The track pad is big, scrolling using multitouch gestures is very nice to use. Sometimes the track pad fires a click when I just try to move the cursor… Nevertheless, really solid hardware!

Windows 8 and some additional Software was preinstalled. After clicking through the Installer my PC was ready for the first real boot test: Boot time is really incredible, something more than 4 seconds after pressing the power button and the lock screen is visible. Well, it takes another two second to access the desktop, but still, very fast! Since I never worked with Windows 8 so far, I was happy that Samsung provided a nice Quick Start leaflets, so I know now how to access and name the new Windows 8 menues 😉 Read more »

Convert MBR partition table to GPT (Ubuntu)

Since I have some big disks I started using GUID partition table (GPT). However, Ubuntu (12.10 in my case) installed itself using a oldschool MBR partition table (or MS-DOS partition table). There are ways to create a GPT while installing, but I missed that point… So I asked myself is it possible to convert the MBR partition table to a GUID partition table? Yes, and its quite easy…

In order to use GPT with nowadays BIOS there need to be a BIOS boot partition. However there are two prerequisites which you should check before converting: There need to be space between the MBR and the first partition (most  modern partition utilities start the first partition on the 1 MiB boundary):

$ sudo fdisk -l /dev/sda
....
Device    Boot    Start          End     Blocks  Id  System
/dev/sda1 *        2048    117186559   58592256  83  Linux

As you can see, my partition table meet this requirement. We use this partition to store the BIOS boot partition in it (Note: It should also work with a BIOS boot partition at another place, I never tried that).

Second, GRUB need to be 1.97~beta1 or newer. Check this by issuing

$ grub-install --version

If your system meets this requirements you’re ready to go. First backup the old MBR (and all important data, if you have any on the system in question), just in case anything goes wrong

sudo dd if=/dev/sda of=/root/sda-mbr.dd bs=512 count=1

Now it’s time for gdisk, the GPT equivalent to fdisk for the old partition tables. Starting this utility on a system with the old MBR partition table converts this automatically: Read more »