Thursday, 8 May 2014

Ubuntu And The Black Screen

The default Ubuntu 14.04 Wallpaper

On April 17, 2014 Canonical released Ubuntu 14.04 (Trusty Tahr) which is the latest Long-term Support (LTS) version of their Open Source operating system; which will be supported until April 2019.

Because I am not really a fan of installing a new operating system when the older one works just fine I have held off from installing Ubuntu 14.04. But my curious nature got the better of me and I decided to give it a go just to see how it compared to the last LTS (12.04) which has been fully updated and running fine.

Instead of going crazy I ran the DVD ISO in a virtual machine just to see if there would be any issues. And to cut a short story even shorter there was none. All hardware detected and configured without a hitch.

So it was on to a test machine - a trusty Toshiba laptop that after 10+ years still runs smoothly. The specifications for the laptop are:
  • Toshiba Tecra A8 (32-bit)
  • 1GB RAM
  • 320GB Hard Drive
  • Intel 945GM Express Graphics (Integrated)
  • Intel GMA 950 Sound (Integrated)
  • Intel Pro Gigabit Ethernet (Integrated)
  • Intel Pro/Wireless 3945ABG (Integrated)
The only thing to note is that the CD/DVD drive has an issue. It reads fine but when it comes to writing it has a 25% success rate; which is no biggie I usually install with USB anyway.

I randomly picked a 4GB USB thumb drive (more on that later) and burnt the ISO image to it. The command used was:

sudo dd if=ubuntu-14.04-desktop-i386.iso of=/dev/sdb bs=4M

No errors reported. As usual with the dd command nothing was reported except it read so many blocks and wrote the same number. Booting the machine from USB I was greeted by the usual Ubuntu screen (the one with the keyboard and little person). Then Ubuntu started loading.

And then it happened - a black screen. Everything halted and there it sat. I gave it a few minutes (however long it is to make a coffee and sit back down again) and still nothing was happening. And this is where the journey started.

A quick reboot, press F6 then Esc, and delete the "quiet splash" part of the boot command just to see what was happening in the background. Surprise of all surprises not a thing happened. There was no error messages of any kind, it looked like all was good, and then the black screen again.

On another machine I hit the Internet and googled to see if anyone else had come across this problem; and more importantly if they had solved it. I don't need to re-invent the wheel if someone already has so to speak.

The black screen had been a problem for a few people and the first few results of the search pointed to graphics card incompatibility. Didn't see that as the issue as the Intel 945GM Express is one of those cards that just works usually.

Another possibility mentioned was UEFI BIOS (Unified Extensible Firmware Interface) and there was solutions to get through; again not something that would hamper a laptop that was built before UEFI was even thought of.

With none of the problems looking like it matched mine I decided to reboot with the USB drive and use that menu option I'd never used before: "Check Media For Defects". Maybe where I should have started but no I didn't. Anyway it came back that the media had no problems. Once again it was back to the drawing board.

After reading some more I thought I'd try the boot cheatcodes that were suggested. To be honest it was basically a 'lucky dip' of boot cheatcodes. Those that I tried included:
  • nomodset
  • vga=788
  • xforcevesa
  • no splash
  • nolapic
  • acpi=off
  • noapic
Tried, tested, and failed. No matter what order, and which ones, I used.

I was going to just give up but I carried on. I downloaded the ISO again, did an MD5 check on the ISO file, and then put it over to the USB stick again. Although I left the "bs=4M" off this time just in case the block size was causing the problem.

Rebooted with the USB and once again a black screen. Once again I tried all the possible boot cheatcodes and nothing fixed it. Checked media for defects one more time and it passed.

I nearly decided enough was enough and that the Toshiba laptop just wasn't capable. But being stubborn, like my father, I checked the ISO file again, I burnt the ISO to USB again, I checked the USB for defects again and I saw the black screen again. It was at this point I was thinking maybe the new kernel was at fault and a 10+ year old laptop just couldn't cope.

I decided to check the physical USB drive. Not just whether Ubuntu thought it was fine but also if it really was fine. I ran the command:

sudo badblocks -w -s -o usb.log /dev/sdb

It came back clean. But then the accident that saved me happened. I tested a couple of other USB drives with badblocks just to see if it worked and an old 512MB USB stick was full of them. That USB stick has now been thrown. Then I decided to try to burn the ISO one last time and see if I could get any of the cheatcodes to get past the black screen.

I burnt the ISO to the USB with the same dd command. I rebooted from USB and because of distraction I forgot all about changing the boot cheatcode options. No black screen; just the Ubuntu 14.04 desktop. Another long story short - I installed Ubuntu 14.04, did the updates and it ran smoothly.

The only difference being that I burnt the ISO to a different USB stick. Which is a problem because the one which wouldn't work is supposedly fine.

The one that didn't work is a 8GB HP v125w. The one that did work is a 4GB Memorex TravelDrive. Both are USB 2.0 and neither show any physical errors when checked with badblocks. I even did a disk check in Windows 7 just for the hell of it - both were fine.

Checking the specifications of the drives yielded:
  • 8GB HP v125w - Read speed: 10.74 MB/Sec, Write speed: 3.09 MB/Sec
  • 4GB Memorex TravelDrive 005B - Read speed: 14.11 MB/Sec, Write speed:4.57 MB/Sec
An approximate 4MB speed difference in reading and 1.5MB difference in writing. Not anything that should make a difference.

The USB Thumb Drives


I tested the HP USB drive by burning the 32-bit version of Ubuntu 13.04 to it using the same dd command and booting on the same machine. And it worked.

I have no clue why Ubuntu 14.04 doesn't work but Ubuntu 13.04 does. Nothing was changed with either the USB drive (other than the ISO burnt to it) or the test machine (I even made sure to utilize the same USB port). And as a final final test I re-burnt Ubuntu 14.04 to the HP USB drive and back to the black screen.

As I said I have no clue why, and nothing stands out with regards to changes from Ubuntu to make one work and the other not on the same USB drive. I'm guessing the point of this article is try everything and anything just to rule it out. Next time I do an install from USB and it doesn't work I'm going straight for a different USB drive to rule it out at the beginning rather than after what seemed like hours of reading about a black screen which was nothing to do with me.

If anyone has any idea why Ubuntu 13.04 works and Ubuntu 14.04 doesn't work on the same USB drive I'd love to know.

No comments:

Post a Comment

Thank you for your comment. Please note that all comments are not moderated and as such are not the responsibility of this blog; or its author.