Get in touch:
01524 851 877
07718 896 553

Ubuntu On Lenovo Thinkpad X201 (Blank Screen Problem)

Posted on Apr 26 2010

Just got myself one of these and had a few problems getting Ubuntu to even boot from a USB stick on it. Although it sounded like everything was going smoothly the screen was blank for some reason.

A quick google about brought up this bug:

Launchpad Bug Report

The solution to the problem is in comment #8 on there. Basically you need to use the following boot option to get the display working correctly

xforcevesa i915.modeset=0
Just stick this in at the bootloader and it should be fine. When Ubuntu is fully installed just put the same line into /etc/default/grub to make the change permanent.

Ubuntu 9.10 Sound Problems And Script Solution

Posted on Jan 05 2010

I have been having a problem recently with my desktop PC where the sound would work perfectly through the speakers but as soon as I plugged in my headphones the volume decided to gradually fade down over 10 seconds to nothing. After this I would get no sound at all.

This hasn;t really been a big problem until very recently as I have decided to use my headphones a bit more to give my girlfriend a bit of peace and quiet. Obviously the problem needed fixing.

After a bit of messing around I managed to totally disable my sound card by accident. After doing this I stumbled across this nice little script.

This script did a brilliant job for me of detecting my sound card and configuring it perfectly in a matter of seconds with a little bit of user interaction from myself. I would highly recommend this script for anyone that is having sound issues.

Texmaker High CPU Usage And Slow Typing On Ubuntu 9.04

Posted on Oct 29 2009

I have been using Kile for a while for my LaTeX editing needs but after getting a new netbook (running Ubuntu 9.04 netbook remix), and not wanting to install the KDE libs I decided to switch back to texmaker.

I installed it and loaded up a document to start doing a bit of work in it and the typing was extremely slow. I also noticed that the CPU usage shot up whenever I was typing. I tried the same on my desktop with the same results.

I did a bit of searching and it appears this is a known bug.

The only workaround I can find is to use the following command to run texmaker.

texmaker -graphicssystem raster
This seems to work but isn’t ideal. I would quite like to know what actually causes this. Of course there is every possibility that this will be gone in 9.10. I will find out soon when I upgrade but the Ubuntu server traffic is ridiculous today with it being the release day so I think I’ll leave it a while before I do any upgrades.

Running Scripts At Startup On Ubuntu

Posted on Jun 05 2009

With a lot of the boxes I set up I write at least one custom script that needs to be run at boot time to configure a bunch of stuff for one reason or another.

The scripts themselves are irrelevant but making sure they run when the machine boots is obviously important.

It is a simple process but I often forget the command so it’s going on here. Create the script you want to run and plonk it into /etc/init.d/.

Now make the script executable.

chmod +x /etc/init.d/script.sh
Now that is done you need to inform the system that you have a new script that you want to be run on startup. On Ubuntu this is done as follows.

update-rc.d script.sh defaults
The defaults argument puts a link to the scripts start procedure at run levels 2, 3, 4 and 5. It also puts a link to the scripts stop procedure at run levels 0, 1 and 6. For more information on how to configure this more finely look at man(8) update-rc.d.

Fix For “Missing Operating System” Message – Ubuntu On Flash Drive

Posted on May 17 2009

As described in my previous blog post I had a problem getting USB on a flash drive to boot due to the PC simply saying “Missing Operating System” when it tried to boot from the device.

I found a fix for this that basically involved wiping the flash disk using fdisk. Creating a new partition and using usb-create again. The solution is explained step by step below :

The first step is to load fdisk. To do this you need the following simple command :

sudo fdisk /dev/sdg
Obviously you need to point it to the correct dev file where the USB flash disk is located. In my case it was /dev/sdg.

Once fdisk has loaded you need to delete the partition that is on the disk. This can be done by typing ‘d’ and then hitting enter. (If you want to check at any time what the state of the partition table is on the disk you can type ‘p’ and hit enter.)

This hasn’t actually deleted the partition yet. In order to write the changes to the drive you need to type w and hit enter. (Beware this will effectively wipe the drive so make sure you definitely have the right disk…)

So now you have a nice blank USB drive to use. Of course it now needs a partition to be able to write the Ubuntu image in when you run usb-creator. Start up gparted and right click on the unallocated partition. (Again, make sure you have the right drive selected in the top right hand corner of gparted or you could wipe off a hard disk by mistake.) Click on new and select Fat32 for the file system type. Write these changes to the USB drive and you are are set.

Now all that is left to do is fire up usb-creator, write the Ubuntu system to teh flash drive and stick it into the PC you wish to load and boot it up. Simples…

Ubuntu On A USB Flash Drive

Posted on May 17 2009

Over the years I have played around a few times getting either a Linux distribution or FreeBSD to run from a flash drive for a number of reasons. Last night I had the need to do so again to install Ubuntu on to a machine without a CD drive of any kind installed.

Before I started messing around setting up the MBR etc I decided to do a google search to see if others had done this and written a nice tutorial. To my surprise I found that ubuntu has a package named ‘usb-creator’ available that automates the process for you.

All you have to do is download a Ubuntu iso and it can mount it, prepare your flash drive and install it for you.

I also found out there are a number of tools now available to automate the process for different Linux distributions as well as BSD. The ones I have come across so far are :

UNetBootin
Live USB Creator
iostick.sh (Shell Script)

Despite these tools however I installed Ubuntu to the stick using usb-creator and when I went to boot it I got “Missing Operating System” displayed on the host PC. I am in the process of trying to rectify this at the moment so if and when I find a work around I will post the results here.

Building A Kernel In Ubuntu

Posted on May 01 2008

As I mentioned in a previous blog entry, I have started using Ubuntu for pretty much all of my Linux needs over the past few years. However, up until now all of my kernel development work has been done using other distros.

Yesterday I decided to start doing some kernel development in Ubuntu for a project I am working on. The kernel compilation process is a bit different to the traditional method and this post simply lists how to compile a kernel using the Ubuntu tools. Please note that a lot of the commands listed hereafter will need to be executed as root.

First of all you need to grab the source of the kernel version you wish to compile. For me this is the Mobile IP version of the kernel from The Nautilus6 working group. This should be done from the directory in which you want the source directory to be, usually this would be /usr/src.

#cd /usr/src
#apt-get source linux-image-2.6.22-10-mip6
This should grab all of the source for you and put it in the directory /usr/src/linux-source-2.6.22-2.6.22.

Often it is a good idea to use the configuration file from the currently running kernel as a base for the kernel you are going to build. This should ease the transition from a stock kernel to one you have customised. This is done as follows :

#cp /boot/config-`uname -r` ./.configNow you are ready to start configuring your kernel.

#make menuconfigThis will bring up an ncurses based menu system that will allow you to configure your kernel options. If you prefer a more graphical environment in which to perform the configuration you can use the following :

#make xconfigNote that if you are using xconfig you should run it with either `gksudo` or `kdesudo` rather than just `sudo`. Although this shouldn’t be an issue in this case it is a good habit to get into as described here.

Once you have decided what configuration options you want for your kernel you are ready to build it. This is done using the following two commands.

#make-kpkg clean
#fakeroot make-kpkg --initrd --append-to-version=-your_kernel_name
kernel_image kernel_headers
The string after `–append-to-version`can be anything you want to distinguish this kernel from the others on the system.. Note that it must begin with a `-` and must not contain any whitespace.

Now you might want to go grab a coffee as this compilation will take quite a while, obviously the amount of time is dependent on your machine spec and your kernel configuration.

Once the compilation has successfully completed you should find two new .deb files in /usr/src. The name of these will vary depending on which kernel source you are using and what you appended to the kernel name. On my build they are named :

linux-headers-2.6.22.9-custom_2.6.22.9-custom-10.00.Custom_i386.deb
linux-image-2.6.22.9-custom_2.6.22.9-custom-10.00.Custom_i386.deb
All that is left to do now is to install these files using dpkg :

#dpkg -i linux-headers-2.6.22.9-custom_2.6.22.9-custom-10.00.Custom_i386.deb
#dpkg -i linux-image-2.6.22.9-custom_2.6.22.9-custom-10.00.Custom_i386.deb
Your new kernel should now be installed and ready to go if all the above steps went smoothly so just restart your machine and you should be running your home built kernel. To check this is the case once the machine has restarted just do the following in a terminal.

#uname -rThis should display to you the name of your home built kernel and you are ready to start experimenting with different configurations or why not start hacking about with the code and see what happens :)

This blog entry went on for a bit longer than i anticipated so for the impatient here is a quick fire list of commands for compiling the kernel in Ubuntu (change names in dpkg commands as necessary) :)

#cd /usr/src
#apt-get source linux-image-2.6.22-10-mip6
#cp /boot/config-`uname -r` ./.config
#make menuconfig
#make-kpkg clean
#fakeroot make-kpkg --initrd --append-to-version=-your_kernel_name
kernel_image kernel_headers
#dpkg -i linux-headers-2.6.22.9-custom_2.6.22.9-custom-10.00.Custom_i386.deb
#dpkg -i linux-image-2.6.22.9-custom_2.6.22.9-custom-10.00.Custom_i386.deb
Hope you found this useful and good luck with your new kernel.

Ubuntu 8.04 Beta Released

Posted on Mar 22 2008

Ubuntu ImageThe team over at Ubuntu have released the latest beta of Ubuntu 8.04 (Hardy Heron). There are lots of upgrades to the existing software packages including the following :

  • Xorg 7.3
  • Linux kernel 2.6.24
  • GNOME 2.22
  • PolicyKit
  • PulseAudio
  • Firefox 3 Beta 4
  • Transmission BitTorrent Client
  • Wubi


This is the best release yet for ‘converting’ windows users to the world of open source software using Wubi to enable it to be easily installed and used as a dual boot system without any complicated partitioning needed. This is a great way to try Linux without having to compromise the integrity of your windows partition in any way.

I will be upgrading to 8.04 on all of my machines as soon as it goes to stable. I have been totally converted to Ubuntu for my desktop OS over the past year. As an avid Linux user for the past 6 or 7 years using a myriad of different distributions. College Linux whilst I was on the development team there before it was dissolved, Debian for years, a bit of Gentoo mixed in as well but none have come close to Ubuntu for ease of usability and I will continue using it as my primary desktop OS for the foreseeable future.