Monday 26 March 2012

Oh for one kernel that does everything.

I am generally very happy with Centos 6.2 as an OS for the little Lenovo Ideapad. Everything seems to work, I even have a virtual machine to run FC16 running on top of it.

A net-book that is powerful enough to run virtual machines? Yep!

I also tried to make a virtual machine to try to get the Windows 7 that was the native OS originally. I sized everything down a bit but in particular made a 'Compaq diagnostics' type partition to hold the recovery copy of Winows 7 that I had previously used with great success to restore Windows to the machine after the first foray with Fedora Core 16. In the case of the 'bare metal' restore there was the magic reset button on the machine to press. I guessed that making the special partition bootable in the virtual machine would have the same effect. I tried but just got a frozen screen with not even the hint that anything was going on.

The licence that came with Windows 7 indicated that running under a virtual machine was permitted but without any practical path being apparent to remove its role as the primary OS. Oh well, looks like the only thing I will every be able to do with the copy of Windows I have paid for is to restore it to the PC when I finally come to sell it. I would hope by that time however most people will have come to realise how much better a PC is when running Linux so the need to restore a by then out of date Windows OS should not even arise.

The only gripe that I have with CentOS 6.2 is that it steadfastly refuses to work with my 3G modem stick. I have a MF112 stick from Three that works flawlessly with every version of Mint and Ubuntu I have tried and even an old Fedora 14.  The modem is seen but the connection collapses with a -110 error. Very annoying.

As a little experiment I put a Fedora Core 16 kernel onto the system as an extra boot option. It works (mostly) - in that the 3G modem works (which proves that all the NetworkManager/ModemManager userland side is good in CentOS) but the dratted Wifi does not. There are also some issues with sleep mode not working and SELinux wanting to scan the whole filesystem upon ny return to CentOS  just in case the alien kernel had been up to anything naughty! These issues may be resolveable by going further down the 'Frankenstien' route than just having alien kernel images and modules but I did not really want to end up with an unmaintainable mess!

In spite of the rough edges being able to take a kernel from a newer distribution and being able to demonstrate that particular behaviours are only to do with the kernel version - 3G working, Wifi not, means that the bugs can be reported to their respective kernel maintainers.

In both directions the bugs are annoying. As I mentioned my 3G modem works just fine in Fedora 14 which is a couple of years old now. The support code for it should have made it into CentOS 6.2 surely?

The particular WiFi hardware that the Ideapad uses not working with the latest Fedora and Ubuntu releases is even more worrying as it represents a regression failure. That is to say a feature that was working suddenly breaks just because a new release of software has come out. Regression errors make us look bad. Unless the hardware concerned is truly archaic there really is no excuse for hardware to work in one kernel release and break in the next.

Wednesday 14 March 2012

More on the Ideapad

Ok, the saga of the Lenovo Ideapad, part 2.

I have had this rather nifty netbook for nearly a month now. I know that because the AV software is starting to bitch about the free trial running out.

Stopping the bitching is going to cost me £40 a year! That is a large proportion of what this little computer cost, and for fixing things that should not have been a problem in the first place. I will pass on that I think. It means I will not be able to ever connect Windows to the Internet again but that is a small loss. There is nothing I do on-line that Linux cannot do for me already.

You may recall that after my first experience in putting Linux on the system I admitted defeat and restored Windows again? This was just because I could not get Linux to see the WiFi. An annoying bug in that the driver seemed to be loaded but adamant that the interface was disabled.

Partly because I wanted to see if the wifi was still working I reinstalled the Windows by putting the special hidden service partition back on and pressing the special 'recovery' reset switch the Ideapad is equipped with. This rebuilt the rest of the partitions and returned the computer to the same state it first arrived in. A handy trick that if I ever want to sell the machine on to someone who cannot be convinced that Linux is a better choice.

At first the WiFi refused to work for Windows too! Then I discovered that there are two distinct ways to disable the WiFi, a slider switch which I did know about and a Fn key combo which I did not. Once I had used this keyboard combination the WiFi started working in Windows much to my relief.

This left me in the position where Windows once again had taken over the whole disk with no room for Linux. With 300GB of space this is just crazy. My previous netbook worked just fine with 16GB internal disk and a 16GB SD card so 300GB is a big step up and plenty of room to keep a small Windows partition for the occasional 'only works on Windows' job. I found that Windows now comes with a tool for partition editing so I used this to shrink the big windows partition down to just 40GB. This is where the weirdness started. The old DOS compatible partition table was laid out with a small Windows boot partition as sda1, then the big Windows partition as sda2 then an extended area as sda3, then the special hidden partition as sda4. As the area of the disk for extended partitions was only in the area of disk covered by sda3 it was not clear to me how the new freed space would be treated. Windows seems happy that it now has an extra partition but using the tool has left me in a position where Linux no longer accepts that the disk has a valid MSDOS (i.e. primary) partition table!

Booting Linux from a USB key and using the gparted tool gives more information. Some of the partitions are seen but backup copies of the table are not in the places they should be etc. Windows itself seems to work normally but using the provided repartitioning tool seems to leave the disk in a mess when it comes to introducing new resident OSes. I wonder if this is deliberate or just incompetent? Just a warning about using the Windows own tools to do resizing, you could end up with something of no use to anything but Windows!

As the main partition table is not there anymore I am not even sure that the recover to factory settings option will work without re-creating the original partition table by hand.

The WiFi support in Fedora Core 16 is a bit of a mystery still. When booting from the DVD the wireless is recognised and in use for fetching updates during the install. Changing to a console and using the lsmod command confirms the particular driver modules in use:

ath9k
mac80211
ath9k_common
ath9k_hw
cfg80211
rfkill

The odd thing is that when the installed OS is booted the WiFi stack no longer works - we are back to the 'WiFi is disabled' gripe.

I then tried a different tack. What I really need is something as close as possible to RHEL that I can carry round with me. So I tried the Centos 6.2 live DVD - it saw the WiFi first time.

By this time my months free trial of AV had just about run out so it was time to say goodbye to Windows forever and do a complete re-install. With the whole disk given over to Centos with 4GB of memory as standard it will be possible to run virtual machines to get Windows to run later I hope. Centos also has the advantage in that it stays with the Gnome 2 user interface for now. Gnome 3 may look very pretty for this tablet age but I prefer a bit of simplicity.

Centos has a big advantage in that it is binary compatible with Red Hat Enterprise Linux. All the packages are built from the same Open Source source-code that Red Hat uses. This means that although you will be a little behind the 'bleeding edge' of what is new and funky in Linux you will at least have skills that directly transfer into the workplace.

Will I miss Windows? Not at all, it turned out that the ONLY thing I was using on a regular basis was the Google Chrome browser, which is also available, and looks and works virtually the same, on Linux. Why put up with all the downsides of Windows just to be a platform underlying a browser.