Linux on Dell Laptops – Don’t Press the MediaDirect Button

I’ve been pulling late nights at work on and off for around 4 or 5 days. Last night was one such night. Upgrades and updates dragged into the night with me waiting on standby to go in and do my thing. My thing started around 2 hours later than planned and I got to bed pretty late. Straight from the computer screen I found it hard to get to sleep and it took maybe another hour to get to sleep. 3 hours later, with the work continuing, somebody triggered our monitoring system and I blearily stumbled out of bed to attend to the triggered alarm and see what the fuss was about. Unsteady on my feet I reached in the dark for the the power button on my stupidly large and heavy Dell XPS M1710 laptop, overbalanced slightly and instead pushed what felt like a smaller button, but the machine powered on all the same.

What I got instead of the Grub bootloader and Ubuntu’s pretty usplash boot screen was something light blue in colour and Windows like, telling me it was scanning for media files, then a Grub boot error appeared behind it, which looks pretty weird in a Windows environment.

Thankfully, somebody else beat me to the monitoring alert but what they didn’t do while dealing with the alert was recover my laptop’s partition layout and all of my files. That would have been hard for them to be honest as my laptop’s filesystem isn’t monitored by work’s monitoring system as you might expect, so perhaps they could be forgiven.

Now, someone had told me that they made the same mistake doing almost exactly the same thing, blundering around, all half-asleep in the dark. I won’t say who that is, it wouldn’t be fair, though the person in question happened to be at a developer summit for a very popular Linux distribution at the time and the following morning, had one of the company employees, who worked on the development of the kind of low-level tools used when dealing with this kind of thing to take a look. MediaDirect had destroyed his partition table, thankfully however, the dev was able to do all sorts of crazy shit and put his partition table back how it was before. I don’t have a dev who can do crazy partition table shit and neither do you.

Put simply, the Dell MediaDirect button, when used to power on your machine will delete any non-Windows (FAT or NTFS) partitions and replace them with a Windows partition which is like an instant-on media player, similar to the instant-on Linux system you can get on some Dells. That’s even though I completely blew away the entire pre-installed Windows OS, including the pre-installed MediaDirect partition, repartitioned and installed my own operating system. MediaDirect is installed in a protected part of the disk, called the Host-Protected Area (HPA), which can’t easily be wiped by you or I, but in any case, it’s too late, my partitions are fragged. When booted into Ubuntu, the MediaDirect button starts your media player of choice, that’s Rhythmbox for me, Banshee always falls over on importing my music collection. Sadly I assume the instant-on Linux feature won’t delete Windows partitions…

Thankfully, I rsynced my home directory to my new HP server about a week and a half ago and I haven’t really created/edited/downloaded any new files in that time, I’ve just done a lot of console work. My Firefox bookmarks are synced with Foxmarks, all of my personal mail is done over IMAP on my own remote mail server and all of my files, minus a few small edits, are on the home server.

This story has 2 morals:

  1. Make backups more often than you already do. If you do none, then just doing it once will be better than nothing. My having backups, despite being a sysadmin, is more to do with the good fortune of having just purchased a home server and rsyncing my files to it so I could sync my laptops against it, rather than against each other and then have various versions of the sames files; and so I could play my music files without having to carry the heavy laptop around the house, than it does about good planning and regular backups. Do a backup today or do it tomorrow if you can’t do it today.
  2. Don’t press the MediaDirect button when you want to power on your Dell laptop which has Linux installed. I believe the problem doesn’t exist when Linux is pre-installed, Dell thought of this at that point, but it doesn’t help you if you purchased a Windows laptop and installed Linux either in a dual-boot, or as the only OS.

I don’t yet know of a way to disable the MediaDirect button’s action, but I do have some good news. I managed to recover my partition layout while I was writing this post. I was searching Google for ‘Ubuntu Dell MediaDirect’, which seems to be so common that Google Suggest suggests it and I came across this Ubuntu Forums thread and used the second set of instructions in this post to recover my partition table. Essentially, you boot from an Ubuntu live CD, modify your apt-sources.list and install testdisk, tap Proceed a few times until it shows you your original partition layout and then you save it. Thank fuck for the guy that wrote teskdisk, the guy who wrote the forum post and the guy who told him how to do it. Major kudos to those guys, I now hand that knowledge over to you in case you should ever need it. I just have to find a way of turning off that insane MediaDirect power on function.

Thankfully, in my middle-of-the-night blind stupour, I had the presence of mind to power the machine off as soon as I realised that it was doing something bad that I didn’t understand, even though I was still too half-asleep to understand why I thought it might be bad. That bit of instinctive reaction stopped MediaDirect writing files over the top of my existing files, even though it ate the partition table. Had I left it much longer, I might not have so many files left.

More details about HPA here. Testdisk home page here for all your partition recovery needs. How much would you have to pay for the equivalent Windows tool? Free Software saves lives, for me at least.

Thoughts on the Nokia N96

…Or the Nokia N96 for Sony Ericsson owners.

I’ve had a Nokia N96 for about 4 or 5 weeks now and I thought I’d share some feelings on it. My last 3 phones have all been Sony Ericssons and I was very happy with them, but I wanted a phone that was a bit more capable, had more storage, good web connectivity and an established eco-system of 3rd party apps. The last Nokia I had was a monochrome screen 8310 back in 2003.

First of all the edited highlights:

  • Symbian S60 3rd Edition Operating System
  • 16 GB Flash storage.
  • 5 MP camera.
  • Native BBC iPlayer application.
  • Wireless LAN.
  • 7.2 Mb HSDPA 3G connectivity.
  • GPS maps
  • Built in FM and Internet radio receiver and DVB-H digital TV receiver.
  • USB Mass Storage device mode (ie it shows up as a USB disk on your computer which works on Linux).
  • The keypad slides out from under the display, there is a multimedia control keypad which slides out from the other end and puts the display in landscape mode.

After using it for 5 weeks my opinions in quick bullet point form are:

  • Horrible keypad, feels nasty and either I can type faster with 2 thumbs than it can detect or the keypad design makes it easy to miss keys (the alphanumeric keys are in rows of 3, with a single piece of plastic per row of keys).
  • Battery life is 2 to 3 days without making any calls and with bluetooth and wireless off. My Sony Ericssons lasted around 6 to 7 days, though this is a smart phone and they weren’t.
  • If you make around 45 mins to an hour of calls after a full charge, your battery life is almost gone.
  • The phone bleeps only once when your battery is going, it doesn’t vibrate even in silent mode, which means most of the time you won’t realise before your phone switches off.
  • It’s a bit large but not overly so, it’s not uncomfortable to carry.
  • The keypad lock is unlocked when you slide the keypad out, which happens quite easily in your pocket, that said, I’ve not made any accidental calls I don’t think.
  • If your battery goes, it seems to reset your alarms to how they were set the last time your phone switched off. I overslept for work by an hour yesterday as a result.
  • Silent mode doesn’t vibrate by default.
  • Meeting mode beeps when you get a call or message and doesn’t vibrate. There isn’t a quiet mode which vibrates and rings and sounds your message alert quieter than in normal mode.
  • When viewing the main screen, the right hand control key, usually back or exit, is dedicated to the iPlayer which means if you press it once too often when navigating back from the sub-menus you start iPlayer and it goes away for a few seconds before asking you to select a connection to the Internet, you have to exit that and then exit the iPlayer. I would much prefer to dedicate this button to some other tool as the iPlayer already has an icon on the main screen and an entry in the applications list.
  • Viewing your call log, then calling somebody from the list and ending the call dumps you back at the main screen but leaves the call log open in the background, seems an unnecessary waste of memory. I don’t need it after making my call or sending a message.
  • The interface or applications aren’t particularly fast, it feels pretty sluggish at times.
  • The web browser freezes the phone for around 30 seconds or so when rendering some pages.
  • The handset crashes occasionally, about once every week on average. About 4 or 5 times in the first 2 weeks, but none in the last 3 weeks.
  • Email seems to work well from my own mail server, which never did on my last Sony Ericsson.
  • The network selection tool seems a little clunky and the iPlayer doesn’t always seem to use the one you selected.
  • You need to use a wireless LAN connection to stream programmes using iPlayer, though you can use the 3G connection to browse programmes using iPlayer, it will just tell you to use wireless LAN when you want to watch or listen to something.
  • Clicking the red ‘end-call’ button in any application take you back to the main screen without closing the application you were using. This is a double-edged sword I’m not used to after 3 Sony Ericssons. It’s an unnecessary memory hog and quite often, if you check the open applications by going into the menu screen, choose options and then show the open applications, you will find a few open unnecessarily, on the other hand, it means you can flip around between applications without starting them each time you want to go back to one.
  • The space button and predictive text’s ‘change word’ button are switched compared to Sony Ericssons. I’m almost used to this already.
  • You can’t lock the phone with Menu * like you can on most phones.
  • The wireless network scanning tool, once running, is constantly scanning unless you turn it off again. Not sure if this is a good thing or a waste of battery. It’s visually irritating. Turning off scanning doesn’t seem to disconnect your WLAN connection as that’s another option. That seems to be a good idea.
  • The wireless LAN supports WEP, WPA, WPA2 and will see your hidden network if you punch in your SSID manually, though it seemed to forget it later on and I had to put it in again. I ended up making my WLAN visible instead of entering the SSID every time.
  • The backlight behind the buttons below the screen ‘breathes’ periodically to let you know the handset is still on, in the same way an Apple notebook does when it’s suspended. I quite like this and while I wonder if it’s a waste of precious battery, you can turn it off though it’s the only way of knowing the battery hasn’t gone without pressing buttons every few minutes.
  • Haven’t really used the camera much, it seems ok.
  • Haven’t used the maps. I should look at whether it contains a route planner or not and whether it would be of any use in assisting the Open Street Map project.
  • You don’t have to record your own voice commands for voice activated dialling. I just connected my bluetooth earpiece, pressed the button on the earpiece, waited for the beep and said the name or the person I wanted to call. Don’t know how it decides which number to call if you have more than one number for a contact.
  • The phone came with episodes of Top Gear, Dr Who and The Mighty Boosh, in formats optimised for playback on the phone and on a TV using the TV out cable. That’s pretty cool. I deleted Dr Who straight away 😉
  • I haven’t tried the TV out.
  • It came with a car charger. Which is pretty cool. Probably because you need to charge it up every 2 days.
  • I installed an Ogg player called OggPlay and an SSH client called midpssh. OggPlay has crashed the phone a few times and you can’t run things like top in midpssh because the machine I’m SSHed into says my terminal isn’t wide enough. I haven’t tried it with the screen in portrait mode.
  • I didn’t know until 30 seconds ago that there is as version of PuTTY, the popular Windows SSH client for Symbian phones. I’ll have to try that.
  • The bundled ear phones work with OggPlay as you would expect, but none of the integrated multimedia controls, either on the handset or on the earphone cables work with it. You are restricted to using alphanumeric keypad buttons to control the application.
  • The built in media player doesn’t support Ogg and all of my music is in Ogg Vorbis format. I knew this in advance, so it was no surprise.
  • Of course, decoding Ogg files on a device that doesn’t support Ogg canes your battery life as it has to be done in software on your device’s processor, but I think I did get 3 hours playback from a fresh charge which is similar to my sadly defunct Cowon iAudio X5 MP3 player, which did support Ogg.
  • There is a tool to autoconfigure your phone’s network settings. Don’t know whether this is specific to my network provider.
  • Configuring the phone’s settings seems a bit convoluted. I spend a lot of time searching for certain settings and then can’t find them again later.
  • There are some decent games on the phone, but most of them seem to be time limited demos.
  • General navigation is ok but navigating any kind of menu requires far more clicks than seems to be necessary, either that or I’m too used to the Sony Ericsson way. When constructing a new SMS messages for example, choosing the recipient is unnecessarily arduous and it doesn’t give you a list of recent recipients.
  • There is a built in PDF viewer, word processor, spreadsheet and presentation creator. I haven’t used them but I guess they’re good for document viewing and I assume they are Microsoft Office format compatible to a certain level. The built in notes application is a lot better than on my Sony Ericssons. There is also a zip file manager, currency converter, sound recorder and a version of Real Player, none of which I have used.
  • I haven’t really used the built in radio much and there is no DVB-H broadcasting in the UK.
  • The filesystem layout seems confusing when you get down to it. There is an identical file system layout per storage medium (ie flash, built in memory and memory card if you have one) and on each file system there are a number of directories with similar names, suggesting similar function, but I don’t understand the logic which determines that my videos go in ‘Video clips’ rather than ‘My Videos’ or which puts one picture taken on the phone in ‘Pictures’ and another in ‘Pictures/200812/2008A0/’. In ‘My Videos’, there are a whole bunch of preinstalled video files and an empty directory call ‘Preinstalled’. The logic eludes me.
  • Turning on the phone from a cold start seems to wake the phone up, but doesn’t always turn it on fully most of the time. It seems to go to a white screen and then fades out to preserve battery. You have to press the power button again to make it prompt you for a PIN. After entering the PIN, it turns on fully. It has only turned on fully from a cold start once without requiring a second press of the power button and that was about 15 seconds ago. Every other time, it took 2 presses.
  • The phone forgets time and date if the battery runs out. This is probably a good thing since it could be several hours or days between the battery running out and it being recharged and turned back on but as the battery life is short, it happens a lot which is pretty irritating. It would have been nice to switch off and retain enough battery to maintain the internal clock unless the battery entirely exhausted before being recharged. Perhaps they didn’t do this as it would shorten the already short battery life.
  • The web browser is ok, nothing more. That may be more to do with the screen size, memory footprint restrictions and input method restrictions compared to a regular PC or laptop than the browser itself.
  • I believe you are charged a on a more expensive tariff if you use the phone’s 3G connection with a PC or a laptop. I think you can do this using the bundled Windows software, but I don’t run Windows. I haven’t yet checked whether you can do this under Linux. I could with my Sony Ericsson, I think I used the USB cable, but I only discovered this as I was backing it up in preparation for migration to the N96.
  • Nokia do a music download site. I’ve not used it, but browsing there, the website tells me my device (Firefox under Ubuntu Linux) is not compatible, though the N96 is so I guess it doesn’t work unless you’re using a Nokia device. I believe the music is in Windows Media Audio (WMA) format using Windows Media DRM, so I won’t be buying any of that shit.

I think that’s all of my thoughts so far. I may sound pretty unhappy with it but I’m not. Bits of it I find really uncomfortable to use. Bits of it I found really uncomfortable but am now used to. Other things will always get on my nerves I think but your brain tends to work around the problem until you automatically do so without thinking about it. It only bothers you when you move to another platform, which is probably my problem in some cases.

Some of the main features I bought the phone for, I’ve not used yet, like the maps. I’ve already filled the storage with my music collection and I’ve used the wireless LAN and 3G connections satisfactorily. It will use full 3.5G at 7.2 Mb if you can get a signal for it. I can’t that where I live, but I can elsewhere.

In general I would say it’s a very good phone if you want all the features and you’re willing to either  pay the high monthly line rental fee, take a long contract or pay hundreds up front for the handset to get one and you’re comfortable with the Nokia way of doing things. I’m not so familiar with Samsung, LG or Motorola phones so I’d like to see what theirs and Sony Ericsson’s equivalent models were like before I’d say this is the smart phone you want. I didn’t like the Sony Ericsson I was offered at all, though it wasn’t a smart phone of this kind and I certainly didn’t want an iPhone.

The major nags for me are the fiddly navigation around the menus, the unnecessary amount of questions to answer when trying send an SMS or make a call, the annoying dedicated iPlayer button which keeps getting pressed by mistake, the file sytem layout which makes no sense and dreadful battery life. The battery life really is a problem.

On the plus side, having an Ogg player, an SSH client, 16 GB of storage, wireless LAN and a 7.2 MB 3G connection are great. It’s a shame that OggPlay doesn’t support the handset’s multimedia keys or the headset’s controls. I just have to see what the maps application is like before I decide whether I’d buy this hand set again given the chance.

IPMI on HP Proliant ML115 G5

I bought an HP Proliant ML115 G5 server recently, it was a bargain for a good amount of processing power, albeit in an entry level tower server. It will live at my house and I’ve already supplemented it with 4 GB RAM and will dropping in a pair of 1 TB disks on a 3Ware RAID controller, so I’m not troubled by the form-factor and otherwise low specs.

At the time of purchase though, I didn’t realise you could buy HP’s Lights Out remote management card and have HP refund you the cost. They won’t do this if you retrospectively buy the card though, they have to be on the same invoice, so I will have to make do with the onboard IPMI controller, which would have been fine as I’m pretty familiar with IPMI, if only I could get it to work on this machine.

As far as I’m aware, the HP LO card is similar in principle to IPMI, but a bit more intelligent. On every other IPMI controller I’ve used, there are a number of ‘channels’ with which you can communicate, one of which is a LAN channel to which you can assign an IP address. That way you can send IPMI commands over the network and remotely power on, power off, reboot and get hardware information whether the operating system is running or not. With some versions of IPMI, you can configure the BIOS, the bootloader and the Linux kernel to give you a serial console over the network so you can see remotely what you would see if you were standing in front of the machine in all cases.

However, with this IPMI controller there doesn’t seem to be a LAN channel which means I can’t do any of those things, at least in the range of channels I tried which was between 0 and 10, only channels 1 and 2 existed. Normally, channel 1 would have been the LAN channel.

It has to be said that HP don’t list this system as supported by Debian or Ubuntu, however it works fine under Debian Etch and Ubuntu 8.10 in every other way and I’ve yet to come across a hardware vendor which actually says it supports Linux across its hardware range, even when it works fine. They normally support a subset of hardware, which they have certified, created a knowledge base for and have provided support training for. My Dell XPS 1710 laptop for example works perfectly, but Dell don’t support Linux on it.

In fact, despite saying they do not support Debian on the ML115 G5, this page appears to show they do support Red Hat and SUSE. If they support Red Hat and SUSE, I  hope this may change once Debian Lenny is released and has been through their QA process. However the Debian Proliant Wiki is confident that the Debian will install successfully on this machine, as I can of course confirm, though no mention is made of the IPMI controller, as you would expect for a wiki about installer compatibility. I may try CentOS to see if it can see a LAN channel on the IPMI controller, just to set the address and then replace it with Debian afterwards. I’m not a fan of Red Hat/CentOS servers, I prefer that it’s reasonably easy to upgrade between Debian release. I don’t see that it’s that easy between Red Hat and CentOS releases. (UPDATE: CentOS can’t see a LAN channel on the IPMI controller either.)

HP do supply a bunch of Debian packages for Proliant hardware management, such as the HP Proliant Value Add Software which contains an HP version of ipmitool, the tool used to manage an IPMI controller from inside the OS. On Dell hardware there is a BIOS level tool to set the IP address on an IPMI controller, on Supermicro servers there was a bootable FreeDOS CD for uploading the firmware and then setting the IP address. In either case, you can also set the IP address of the LAN channel using ipmitool. Sadly, as I said the stock version if ipmitool in Debian Etch and Ubuntu 8.10 doesn’t seem to be able to see a LAN channel. The HP version of ipmitool shipped in the HP Proliant Value Add Software has to be compiled at installation time by debconf and it bails out with a bunch of compiler errors about missing files even though I have the kernel sources and headers installed for my kernel version.

I called HP’s Unix/Linux Proliant support line and explained the problem to the guy, asking if he either knows what the LAN channel is supposed to be, whether the IPMI controller some how relies on the LO card for remote access or whether there are known issues. Unfortunately, he didn’t really seem to know what I was on about and after putting me on hold for several minutes, offered me a Windows Server 2003 null management controller driver. When I reminded him that I had called the Unix/Linux Proliant support line because I use Linux, not Windows, he told me that Linux isn’t supported on this server even though Red Hat and SUSE are as noted above. At this point I explained that the controller is independant of the operating system, it is used for out of band management, ie whether the system is powered on or not, you communicate with the IPMI controller over the network. I forger what my man said to that but it implied that he couldn’t help me and feeling my irritation rise I decided to tell him not to worry about it and ended the call.

It strikes me sometimes that vendor support use their list of supported hardware/operating system/web browser/whatever as a get out clause when they don’t understand your problem. It’s an easy cut off when they encounter something they don’t know how to answer, even though the problem is not related to their hardware/operating system/web browser/whatever support list. That said, I appreciate that this was a quite a specific technical issue and the problem is not necessarily to do with the support guy I called, but in his training and the resources available to him. If he could search for the specs of the IPMI controller in my server or cross-reference my server model, operating system and the IPMI controller, I’m sure he would have been able to be more helpful. I feel bad for call centre support people, they get a shit deal from management and customers alike.

Anyway, if you couldn’t tell, this post is me purely taking the opportunity to complain bitterly about unhelpful support and lack of vendor documentation, to create a central list of all the links I came across navigating the HP’s seemingly spaghetti linked website and to ask you if you have any ideas. Do you have any ideas where I’m going wrong? Will the IPMI controller ever work? Do you know how I can set an IP address on it under Linux?

Other Links:

HP for Proliant

HP Proliant Debian home page

Debian on HP Proliant PDF

Debian Linux on HP website and forum