Debian on the HP 110-210

Background

We have a GNU/Linux box in the corner at Modern Device, it’s
an HP Pavilion 7955, an ancient machine, and it runs a suite of
bash scripts which set fuses and flash firmware using
avrdude and open terminals using screen. It has streamlined
the testing process for many of our products. It has also held up
for about a couple years since its conversion from Windows XP.

On Wednesday, we came in to Modern Device to find it refusing to boot
(kernel panicking), complaining about ext4 issues. We figured its drive
had died after all these years, we’d just boot into GNU/Linux from
another device, copy over the production scripts, drop in a
new machine, install Debian, and be ready to
go. A process which an optimistic person might assume would take
around half an hour, and I figured it might take around three.

Initial hangups

Things were, of course, not that easy. The Pavilion would not
boot from USB, so Paul went to Staples and bought some CD-Rs.
While he was there he picked up the the lowest cost box in sight,
an HP 210-110 for $300, slated as the replacement
for our now-dead production Debian box.
We soon learned that the DVD-ROM drive didn’t support CDs, and
the CD drive was broken. Paul ducked into the next room and
returned with an ancient eMachine, running windows XP.

At this point I hoped beyond hope that the HP 210-110
would be both new enough to boot off USB, but old enough to support IDE.
No such luck; it’s a netbook in a bulky case.

I’d rather not touch Windows XP, so I tried to boot the eMachine off USB–
which didn’t work either. I tried instead booting off a CD, but it turns
out the eMachine’s single lite-on combo drive was also completely dead.

Data recovery

At this point we were saved by ext2fsd, a filesystem driver for Windows
capable of reading ext4 drives. Ext2fsd was written by someone whose
idea of a Windows installer is a .bat script, which took me a little
while to figure out, but once I ran setup.bat in cmd, everything worked
fabulously– we installed the old HD in the eMachine and copied
the production scripts to a USB drive.

Installation on the new machine

The HP 110-210 doesn’t have onboard WiFi, so I shared the connection
from the nearby production Mac, which acted very well in its capacity
as a mentor for the confused fledgling reincarnation of the Debian machine.

At this point, I figured everything would be easy. A brand new $300
machine should be a breeze to throw Debian on, right? And we could
even get a Windows 8 refund, as we didn’t use it for anything.

With this misconception, I downloaded the Debian net install iso, copied
it to a flash drive from Mac OS:

diskutil list # Figure out which disk is the flash drive, in our case, disk3
dd if=debian-7.4.0-amd64-netinst.iso of=/dev/rdisk3 bs=1m # OSX uses lowercase m

Disabling secure boot

Modern machines come with a piece of software which sits on top of BIOS
called UEFI (now usually shortened to EFI) which prevents GNU/Linux
installation by default. To disable it on the HP 110:

  • Mash the F10 key until you get into the BIOS
  • Go into the Secure Boot menu (Security -> Secure Boot Configuration)
  • Turn off Secure Boot and Fast Boot
  • leave Legacy Support off, or Debian may install without UEFI support

The solution

We left the Debian installer running all night, came in the next morning,
and it still wouldn’t boot. I tried rEFInd, gummiboot, elilo, and almost
tried to install boot-repair (not yet in Debian). At this point I
had almost given up on Debian. I downloaded Ubuntu 12.04 LTS, but it
complained that it wanted a missing rtl8105e file, proprietary RealTek firmware.
HP was really scraping the floor for hardware on this one.
I figured I’d give Debian one last shot and found the solution in a post by
Rod Smith, author of rEFInd, on the Ubuntu forum:
how work around HP’s UEFI misimplementation.

HP’s EFI wants your grubx64.efi file to be called /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi.
Alright!

mkdir /boot/efi/EFI/Microsoft/Boot/ # Debian overwrites this, back it up if it's still there
cp /boot/efi/EFI/debian/grubx64.efi /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi

Finally, GRUB appeared! After that, a blank screen, but that was solved by
replacing ‘quiet’ with ‘nomodeset’ in the GRUB configuration (/boot/grub/grub.cfg)

GRUB_CMDLINE_LINUX_DEFAULT="nomodeset radeon.modeset=0"

(the Radeon line is to prevent a problem with the Catalyst driver later.)

X didn’t start, so we install the latest AMD Catalyst driver.
(you can’t just grab it with wget– AMD uses Javascript to force you
to download it on a computer with a graphical web browser, defeating
the point entirely. Well played, AMD. Hopefully someday someone will
make a real driver for these cards.)

mount /dev/sdb1 /mnt/sd
cd ~
cp amd-catalyst-13.12-linux-x86.x86_64.
unzip amd-catalyst-13.12-linux-x86.x86_64.
chmod +x amd-catalyst-13.12-linux-x86.x86_64.run 
apt-get install linux-headers-`uname -r` build-essential
./amd-catalyst-13.12-linux-x86.x86_64.run 
aticonfig --initial
nano /etc/default/grub

Shame on Microsoft for Secure Boot, HP for enabling it and misconfiguring
their UEFI, and RealTek and AMD for their proprietary firmware drivers.

It took a day or two, and it was painful, but we circumvented all of the obstacles,
thanks in very large part to Debian, the Ubuntu forum, and people willing to
write filesystem drivers for Windows. Too many hours later, had a Debian login
and took at victory lap. We tried to get a refund on the
vaporized Windows software, but that looks fairly unlikely after reading through
Microsoft’s policy concerning OEM refunds on Windows. We called HP and
they claim the software is “bundled”– an antitrust violation, but we don’t have
time to fight them on it.

We also hope this helps a person or two through the minefield on a way to a generic
Linux Box.

 

Back to blog