OpenStreetMap logo OpenStreetMap

Now the Computer Has Died

Posted by alexkemp on 18 May 2016 in English. Last updated on 9 February 2019.

I’ve been giving JOSM a lot of grief. I think that this is because it is written in Java, and my webmaster experience has caused me to be deeply suspicious of Javascript (don’t bother writing; I’m well aware that they are different beasts).

A few days ago, whilst about to create a new terrace in City Heights, Mapperley, I selected a node in a building rectangle inside JOSM. It turned blood-red, which was perfectly normal. Then the whole screen turned the same colour, whilst the only key that the computer responded to was the electricity supply on/off button; that was perfectly abnormal.

To cut the long, horrible story down to size, it was not due to JOSM, but was rather because one of the two 2GB memory sticks that were bought a few years ago from Crucial had gone bad. When memory touched ~411MB the whole system died, and the entire screen was left painted the same as the last pixel used. (Added later: a phone call to Crucial and collect a Freepost address + RMA number to return & they will send two new replacements; that’s what a “Lifetime Guarantee” means, even though they were bought in 2011.)

Using memtest86+ caused the same shutdown. Removing the 2 sticks (leaving the original 1GB memory in place) removed the problem. Bum.

Fixing the problem is the easy part (a new Lenovo H30 from PC-World - strip out the useless Windows10 & replace it with Debian Jessie 8.4 & we are away) (why on earth am I forced to pay for Windows?). Moving all my stuff from the old computer to the new is the difficult bit.

How To Install Debian on a modern AMD Desktop Computer:

Some truly geeky stuff for anyone else with similar equipment & problems, to try to help; first, my target system:-

  1. Lenovo H30 / Windows 10
    (is discontinued on Lenovo site; thus very cheap on PC-World)
  2. AMD A8-6410 APU
  3. EFI boot
  4. “F1” to access BIOS

Fortunately, I obtained a brand-new Jessie (Debian 8.4) ISO file to install. That is necessary as the H30 has the BIOS within a hdd partition + boots from a EFI partition (I believe that this was introduced at Windows 8.1). Debian will handle all that transparently on install; just as well for me as I was ignorant of it until afterwards, and may otherwise have tried to use an ancient Wheezy Live-Boot USB Stick.

a) Debian Basics

  1. It has a @superuser system
    (the user always logs in under their user-name)
    (the ‘root’ superuser is used only for administration)
  2. “Stable” is the first of 3 possible distributions
    (currently called ‘Jessie’, it is the least buggy distro)
  3. “Testing” is the next distribution
    (currently called ‘Stretch’, it will eventually become the “Stable” distro)
  4. “Unstable” is the final option
    (always called ‘Sid’, it will eventually become the “Testing” distro)

The Debian links below often show ‘8.4.0’ in the URL. That is the current version of Jessie. As Jessie gets updated, those links will break (the version will become ‘8.5.0’, etc.).

b) Create an Install Stick

You need:

  1. 2GB USB Stick
    (all contents will be wiped)
  2. Debian ISO file
    (Install Help)
  3. An Internet Connection via Ethernet
    (anything other than Ethernet may need drivers installing, which may not come on the stick)

I downloaded debian-8.4.0-amd64-CD-1.iso (630 MB). With hindsight, because I was going to use the lightweight-XFCE4, I could have downloaded debian-8.4.0-amd64-xfce-CD-1.iso (646 MB). It did not actually matter, as I was asked what Desktop Manager I wanted to use during install, and chose ‘xfce’ at that point. The issue in all cases is that you only need CD1 (unless you do not have an internet connection for the machine).

The ISO needs to be printed upon the USB stick (or CD if you decide to go all old-school). Here is how to do it from a Linux terminal:

  1. Check that the downloaded ISO has the correct md5
    (also download MD5SUMS file)
  2. Put USB stick in computer & check it’s device name
  3. Use dd to transfer to the USB stick

So, the first thing is to check the md5 for the downloaded file (this guarantes that the entire file has downloaded intact):

alex@home:~$ cat Downloads/MD5SUMS | fgrep debian-8.4.0-amd64-CD-1.iso   
c58a9df992d6e119121babbac9bb5a13  debian-8.4.0-amd64-CD-1.iso   
alex@home:~$ md5sum Downloads/debian-8.4.0-amd64-CD-1.iso   
c58a9df992d6e119121babbac9bb5a13  Downloads/debian-8.4.0-amd64-CD-1.iso   

md5 is correct, so now check the newly-inserted usb-stick:

alex@home:~$ lsblk   
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT   
sda      8:0    0 931.5G  0 disk   
├─sda1   8:1    0   512M  0 part /boot/efi   
├─sda2   8:2    0 923.6G  0 part /   
└─sda3   8:3    0   7.4G  0 part [SWAP]   
sdc      8:32   1   1.9G  0 disk   
└─sdc1   8:33   1   1.9G  0 part   
sr0     11:0    1  1024M  0 rom

The stick is auto-mounted in /media if formatted. dd needs to be used on an unmounted device:

alex@home:~$ sudo umount /dev/sdc1
[sudo] password for alex: 
umount: /dev/sdc1: not mounted

(the stick is not formatted)

alex@home:~$ sudo dd https://wiki.openstreetmap.org/wiki/Tag:if=Downloads/debian-8.4.0-amd64-CD-1.iso https://wiki.openstreetmap.org/wiki/Tag:of=/dev/sdc https://wiki.openstreetmap.org/wiki/Tag:bs=1M
630+0 records in
630+0 records out
660602880 bytes (661 MB) copied, 408.09 s, 1.6 MB/s

That is a terrifying command to get wrong! As you are working as root (‘sudo’) it will allow you to shaft any part of the computer that you want. Note that ‘if’==’in-file’, ‘of’==’out-file’, ‘bs’==’chunks of bytes to transfer at a time’. When the usb-stick stops flashing & the final 3 lines above are printed, the stick is ready to use.

Now to get the computer ready:

c) Install Debian into the H30

Warning! This deletes absolutely everything from the Hard Disk
(Possibly the Recovery partition is left, but I haven’t tried to check)
(The BIOS untouched)

You may receive the following message on startup with the USB stick in the slot:

Secure Boot Violation
Invalid signature detected
Check secure boot policy in Setup

The H30 was shipped set to “Quiet Mode”, so no messages came up ordinarily at bootup. Even the telephone Customer Support was unsure of the command to get into Setup (it is ‘F1’) (no quotes) (you will need to be very quick as it is a very short bootup). You will find the Secure Boot Policy in there, which stops anything else other than the existing OS from booting. Set it to “Disabled”.

From that point, just follow the prompts to install Debian (very, very simple).

d) Final Setup

To perform any admin, at the moment, means switching to the root user. If you use the terminal a lot you will want to use ‘sudo’ (“superuser do”) instead. Here is how: (in a terminal):

alex@home:~$ su
Password: 
root@home:/home/alex# adduser alex sudo

“su” is the “switch user” command (default: switch to root), which then needs the root password. The final line puts the user into the “sudo” group. From that point on, entering ‘sudo’ in front of a command (will require one’s own password the first time) will perform the command as the root user.

The H30 has hardware that does not have Open Source drivers. It does have drivers for Linux (Debian), but those drivers come as pre-compiled binaries from the manufacturer, and the source-code is not available. For that reason, Debian refers to the sources as “non-free” (even though there is zero financial charge) (all that sort of stuff gets up my nose as well, but I put up with it since my Synaptic currently has 42,981 packages freely available, many of which are best of their class).

The main problem was that – for whatever reason – that Debian sets up the Update (“Repository”) system only with a ‘main’ repository which, as explained in the previous paragraph, means that the system will not have certain vital systems working. In my case that was Bluetooth, which is absolutely classic. It is easily fixed.

The easiest way to fix this is via Synaptic (graphical update utility) (use Menu: Settings|Repositories|Section(s)). However, being GUI means that I cannot show you here. So, using a terminal:-

alex@home:~$ sudo cat /etc/apt/sources.list
deb http://ftp.uk.debian.org/debian/ jessie non-free contrib main   
deb-src http://ftp.uk.debian.org/debian/ jessie non-free contrib main  

deb http://security.debian.org/ jessie/updates main non-free   
deb-src http://security.debian.org/ jessie/updates main non-free 

# jessie-updates, previously known as 'volatile'   
deb http://ftp.uk.debian.org/debian/ jessie-updates main non-free   
deb-src http://ftp.uk.debian.org/debian/ jessie-updates main non-free 

At the end of the lines that begin with “deb” or “deb-src” are the words “non-free contrib main”. As supplied, those lines contain only “main”, which means that the updates will only investigate that Repository. Add the other 2 words.

That change now means that Synaptic can find the manufacturer binaries. The easiest way is to find the error (or ‘fail’) message in the ‘dmesg’ dump, then to search within Synaptic with a snippet of that report. Here is a live example:

(‘dmesg’ only shows the current hardware report, so I’m using ‘kern.log’ to access historic logs)

May 17 13:36:57 ng3 kernel: [    5.823268] ieee80211 phy0: Atheros AR9565 Rev:1 https://wiki.openstreetmap.org/wiki/Tag:mem=0xffffc90011500000, https://wiki.openstreetmap.org/wiki/Tag:irq=32
May 17 13:36:57 ng3 kernel: [    5.847992] usbcore: registered new interface driver btusb
May 17 13:36:57 ng3 kernel: [    5.969014] usb 1-1.4: firmware: failed to load ar3k/AthrBT_0x31010000.dfu (-2)
May 17 13:36:57 ng3 kernel: [    5.969149] usb 1-1.4: Direct firmware load failed with error -2
May 17 13:36:57 ng3 kernel: [    5.969155] usb 1-1.4: Falling back to user helper
May 17 13:36:57 ng3 kernel: [    5.971359] alg: No test for crc32 (crc32-pclmul)
May 17 13:36:57 ng3 kernel: [    5.989585] Bluetooth: Loading patch file failed
May 17 13:36:57 ng3 kernel: [    5.989657] ath3k: probe of 1-1.4:1.0 failed with error -12
May 17 13:36:57 ng3 kernel: [    5.989716] usbcore: registered new interface driver ath3k

Synaptic first needs the “Reload” button pressing as to update from all the Repositories & find recent changes. Next, searching on “AthrBT_0x31010000.dfu” will land on the “firmware-atheros” package + show that the H30 has the ath3k Bluetooth chipset. Marking that package for install, then applying that command (and rebooting) removes the error + makes the adapter active.

A similar process was needed for (I believe) the Gigabit portion of the Ethernet adaptor:

May 17 13:36:58 ng3 kernel: [   13.861538] r8169 0000:02:00.0: firmware: failed to load rtl_nic/rtl8105e-1.fw (-2)
May 17 13:36:58 ng3 kernel: [   13.861679] r8169 0000:02:00.0: Direct firmware load failed with error -2
May 17 13:36:58 ng3 kernel: [   13.861685] r8169 0000:02:00.0: Falling back to user helper
May 17 13:36:58 ng3 kernel: [   13.863552] r8169 0000:02:00.0 eth0: unable to load firmware patch rtl_nic/rtl8105e-1.fw (-12)
May 17 13:36:58 ng3 kernel: [   13.991208] r8169 0000:02:00.0 eth0: link down
May 17 13:36:58 ng3 kernel: [   13.991233] r8169 0000:02:00.0 eth0: link down
May 17 13:36:58 ng3 kernel: [   13.991311] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
May 17 13:36:58 ng3 kernel: [   14.008189] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
May 17 13:37:00 ng3 kernel: [   15.647680] r8169 0000:02:00.0 eth0: link up
May 17 13:37:00 ng3 kernel: [   15.647695] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

The search string “rtl8105e-1.fw” found “firmware-realtek”. Marking & installing that fixed the last of the hardware issues.

Location: City Heights, Mapperley, Nottingham, East Midlands, England, United Kingdom
Email icon Bluesky Icon Facebook Icon LinkedIn Icon Mastodon Icon Telegram Icon X Icon

Discussion

Comment from BladeTC on 19 May 2016 at 01:14

I had some issues with the JOSM, but I don’t know what is really causing the problems. My old Acer Aspire is handling well the hard work, but the Windows 10 almost f*cked up everything.

Comment from Warin61 on 20 May 2016 at 09:49

To guard against PC failure I run 2, one laptop and a desktop. The laptop walked windows 7 .. I have recently ‘updated’ (or ‘crossgraded’) to windows 10… I refuse to call it an ‘upgrade’! umm I am thinking of debian… I don’t use bluetooth, Wifi is essential though. There is a fair amount of ware on the keys, headphone socket broken, some small bits of plastic distorted around USB sockets… just ware and tare. I may replace it .. it is one of those Aldi ones… I may well wait untill it dies or at least starts to hicup.

The (older) desktop walks windows XT and that won’t be replaced untill it fails (or a lot more years have passed). It is mostly isolated from the network .. occasional updates of software are about it. data can come via the laptop and a USB stick.

Both look healthy at the moment. I use the laptop fairly intensely, the desktop is used for stuff that takes time and has two good screens set up on it. When you have the funds/inclination it may be a good idea to get a second PC as backup? For backup of data I have two 2T external drives.. they are getting full. And, of course cloud storage - some of it open to family. I will wait for the next ‘sales’ to get more local backup disks.

Comment from alexkemp on 30 May 2016 at 22:01

Hi Warin61

“When you have the funds/inclination it may be a good idea to get a second PC as backup?”

As soon as I send the Crucial memory off to be replaced I will have the old PC as a replacement. In fact, even better, I have an old 1TB USB disk that I use as backup, and then a 400GB RAID-10 CentOS-5 server known as Olivia for even more backup (unfortunately, appallingly noisy as it is intel ISA with a SCSI card + discs, and the temperature-reactive disk-fan is operative only with the intel-SCSI BIOS).

Log in to leave a comment