chrishowells.co.uk

September 7, 2009

Using a Speedtouch 516v6 with UK ISP BeThere

Whilst waiting for my BeBox to arrive, I wanted to make use of the Thomson Speedtouch 516 that I bought a few years ago and has sat unused since then. Documentation on accomplishing this is unfortunately lacking from Be, and there is little in the way of informatoin on the members-only Be forum or the Be usergroup.

However,  it can be done.

Configuring the Speedtouch is a real pain for Be, as the Speedtouch only supports PPPoA or PPPoE as standard. However, Be use RFC 1483 bridging (aka EthoA). The 516 can support RFC 1483 bridging, but you need to upload a template to add the configuration options to the Speedtouch’s web interface. That, or figure ou the magic CLI runes which can be entered over telnet, but that is left as an excercise to the reader.

Thankfully, the nice people at another LLU ISP, ADSL24, have provided a  template which works perfectly with the Speedtouch and Be.

Just follow the instructions here to download the template, upload it to the Speedtouch, enter your Be IP, netmask and gateway, and away you sh
ould go :)

June 26, 2009

Gigabyte motherboards are harmful and can cause data loss

Unfortunately certain models of Gigabyte motherboards play very nasty tricks with your hard disks — entirely without your permission — by setting up Host Protected Areas. These unauthorised modifications to your hard disk can cause the loss of hundreds of Gigabytes of data. Personally I lost a 1.2TB RAID 0 array. [1]

I do not know which models of Gigabyte motherboards are affected but the Gigabyte GA-MA74GM-S2H certainly is; according to this post on opensolaris.org, the GA-G31M-S2L is also affected. If anybody else has experienced this, please post a comment.

The Host Protected Area means that a certain area of the disk is reserved. That’s not too bad on a disk that has never been used in another system. You lose a few tens of megabytes, which isn’t too significant on disks of hundreds of gigabytes. However, if the system has already been used in another system, and contains a partition table or is part of a RAID array, or LVM volume, your data will not be accessible and will essentially be lost.

I unfortunately discovered this problem myself when I upgraded my home Linux-based home fileserver. I upgraded from an Asus motherboard. I had four 300GB IDE disks that had been part of a RAID 0 array (yes, I know about the data loss implications of RAID 0; they’re acceptable for my use). I discovered that Linux’s md could not reassemble two of the disks back into the RAID array. The other two were fine — these were connected to a Promise IDE controller. As the disks were around four years old and had been on 24×7 for that time, I came to the conclusion — although unlikely — that both of the disks had died simultaneously.

Hindsight is a wonderful thing. Unfortunately I had never had any prior experience of Host Protected Areas. However, whilst debugging, I should have noticed the following:

hde: max request size: 512KiB
hde: Host Protected Area detected.
 current capacity is 586070255 sectors (300067 MB)
 native  capacity is 586072368 sectors (300069 MB)
hde: Host Protected Area disabled.
hde: 586072368 sectors (300069 MB) w/8192KiB Cache, CHS=36481/255/63, UDMA(100)
hde: cache flushes supported
 hde: hde1 hde2
hdg: max request size: 512KiB
hdg: Host Protected Area detected.
 current capacity is 586112591 sectors (300089 MB)
 native  capacity is 586114704 sectors (300090 MB)
hdg: Host Protected Area disabled.
hdg: 586114704 sectors (300090 MB) w/16384KiB Cache, CHS=36483/255/63, UDMA(100)
hdg: cache flushes supported
 hdg: hdg1 hdg2

Unfortunately the motherboard, without my permission, was denying md access to part of the disk, meaning that md could not assemble it into the RAID array. Data loss bugs are some of the the worst kind of bugs and I find this behaviour of this motherboard rude and entirely unacceptable.

For me, this wasn’t terrible. Most of the data was backed up to tape, and thus restorable, and what wasn’t, was easily replaceable. But I hope that this post helps someone that thinks that they have lost their data, and encourages Gigabyte to change the unacceptable behaviour of their motherboards.

[1] Sure, using RAID 0 dramatically increases the risk of data loss, and that was acceptable to me as it was personal use, not business critical, and I was happy with the possiblity of a disk dieing. I’m not happy with the fact that Gigabyte hardware behaves in unexpected and totally different ways to all of the (considerable quantity of) other hardware that I’ve used.

June 6, 2009

French police hold D-day veterans and celebrators hostage in Arromanches car park for hours

French police use police van to block exit of car park in Arromanches, Normandy, to prevent anyone going home, exit is blocked for nearly 2.5 hours while Brown and Sarkozy make themselves look important making speeches in town

French police use police van to block exit of car park in Arromanches, Normandy, to prevent anyone going home, exit is blocked for nearly 2.5 hours while Brown and Sarkozy make themselves look important making speeches in town

Can’t Gordon Brown do anything right? As a result of the security arrangements for Gordon Brown and Nicholas Sarkozy, and the complete incompetence of the French police, hundreds of people, including D-day veterans themselves were trapped in a car park in Arromanches, Normandy, for nearly two-and-a-half hours, without toilets, food, drink, and any idea about when they would be able to get out.

I am currently visiting Normandy for the 65h Anniversary of D-Day. Today — being the 6th of June — marks the exact day that it happened 65 years ago. I decided to spend the day in Arromanches, a town that bears the marks of the invasion to this very day, with the remains of the Mulberry harbours punctuating the horizon across the open sea of the English Channel.

As I drove from the campsite this morning to Arromanches, a distance of around 60 miles, I was struck by the huge number of police everyday, on all of the motorway bridges. After an utterly fantastic day in Arromanches seeing the veterans, and looking at a British Army landing craft on the beach, and a vast number of army vehicles including Jeeps and trucks, the time came to go home.

I returned to my car at 5pm, but just as I went to leave, the entrances to the car park were suddenly closed, without warning, by the French police (Gendarmerie). We were initially told that this would be for around 20 minutes whilst the convoys of Gordon Brown and Nicholas Sarkozy went past into the town. Very annoying, but tolerable.

What actually happened was that the road was closed, road blocks were implemented, and hundreds of vehicles (including modern cars, camper vans as well as veteran military vehicles) and hundreds, if not thousands of people were trapped in the car park, a field, a short distance from the beach at Arromanches. For just short of two-and-a-half hours. This was for the time that it took the convoys to get to Arromanches, Brown and Sarkozy to make themselves look important, and to finally leave.

Blah

After being trapped for over an hour, a D-Day veteran had to beg the police to be allowed out as he was likely to miss his ferry from Cherbourg. I have no idea whether he managed to catch it in the end

Not only were there those interested in history, like myself, but also D-Day veterans themselves. I was absolutely disgusted when I witnessed an elderly gentlemen, a D-Day veteran, begging the French police to be allowed out because he would miss his ferry from Cherbourg. After about 20 minutes he was allowed out, I have no idea whether he caught his ferry. But it made me extremely sad about the disgusting way that people were treated by the French police.

Whilst Sarkozy and Brown were making themselves look important in the town by giving speeches, an elderly veteran — as well as hundreds of others of all nationalities — were being kept hostage in a car park.

After an hour a police van arrived as reinforcements, and it was positioned by the French police to block the exit. For some bizarre reason, some time later, a tannoy announced that only British cars would be allowed to leave. A handful of British cars left; I couldn’t as I was some way back and blocked in.

People were absolutely mad with the French police and could not understand what was going on. On their way out the convoys of Brown and Sarkozy were heckled: furious people shouted, booed, and blew their horns.

All kinds of vehicles are trapped, from vintage military vehicles to cars and camper vans

All kinds of vehicles are trapped, from vintage military vehicles to cars and camper van

I am very sad that a wonderful day was ruined by appalling planning and implementation.

2009-06-06-191523

February 9, 2009

WDTV: STILL a GPL violation

I examined the most recent source code package released by WD (Western Digital) for their WDTV product, and unfortunately WDTV is still a GPL violation.

February 8, 2009

Building a fully static application with Qt and qmake

I’m trying to statically compile a Qt application. There are lots of google hits for instructions on doing this, but none of the instructions actually appear to be complete, or indeed work.

Configuring Qt with -static is the easy bit, I built Qt with the following options:


chris@thinky:~/qt-embedded-linux-opensource-src-4.4.3$ ./configure -embedded x86 -static -fast -no-exceptions -no-stl -no-accessibility -no-qt3support -no-xmlpatterns -no-phonon -no-phonon-backend -no-svg -no-webkit -no-sse -no-3dnow -no-sse2 -qt-zlib -qt-gif -qt-libtiff -qt-libpng -no-libmng -qt-libjpeg -no-openssl -no-nis -no-cups -no-iconv -no-dbus -no-freetype -qt-gfx-linuxfb -no-glib

Then as I already have Qt 4 installed on my system due to KDE, need to set $PATH to run the correct tools:


export PATH=/home/chris/qt-embedded-linux-opensource-src-4.4.3/bin:$PATH

I decided to modify the t1 example as a test, so I modified the t1.pro file, by adding ’static’ to the CONFIG line


chris@thinky:~/qt-embedded-linux-opensource-src-4.4.3/examples/tutorials/tutorial/t1$ cat t1.pro
TEMPLATE = app
CONFIG += qt warn_on static
HEADERS =
SOURCES = main.cpp
TARGET = t1

#QTDIR_build:REQUIRES="contains(QT_CONFIG, small-config)"

chris@thinky:~/qt-embedded-linux-opensource-src-4.4.3/examples/tutorials/tutorial/t1$ qmake -config release
chris@thinky:~/qt-embedded-linux-opensource-src-4.4.3/examples/tutorials/tutorial/t1$ make clean && make
rm -f .obj/release-static-emb-x86/main.o
rm -f *~ core *.core
g++ -c -pipe -fno-exceptions -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../../../mkspecs/qws/linux-x86-g++ -I. -I../../../../include/QtCore -I../../../../include/QtCore -I../../../../include/QtNetwork -I../../../../include/QtNetwork -I../../../../include/QtGui -I../../../../include/QtGui -I../../../../include -I.moc/release-static-emb-x86 -I.uic/release-static-emb-x86 -o .obj/release-static-emb-x86/main.o main.cpp
g++ -fno-exceptions -Wl,-rpath,/usr/local/Trolltech/QtEmbedded-4.4.3/lib -Wl,-rpath,/usr/local/Trolltech/QtEmbedded-4.4.3/lib -o t1 .obj/release-static-emb-x86/main.o -L/home/chris/qt-embedded-linux-opensource-src-4.4.3/lib -lQtGui -L/home/chris/qt-embedded-linux-opensource-src-4.4.3/lib -lQtNetwork -lQtCore -lm -lrt -lpthread -ldl

However, the binary is still dynamically linked:


chris@thinky:~/qt-embedded-linux-opensource-src-4.4.3/examples/tutorials/tutorial/t1$ file t1
t1: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.8, dynamically linked (uses shared libs), not stripped
chris@thinky:~/qt-embedded-linux-opensource-src-4.4.3/examples/tutorials/tutorial/t1$ ldd t1
linux-gate.so.1 => (0xffffe000)
librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0xb7fb5000)
libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7f9d000)
libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7f98000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7ea5000)
libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7e80000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7e75000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7d2b000)
/lib/ld-linux.so.2 (0xb7fdc000)

Google seems to be out of results, and I appear to be out of ideas, as does the official Qt documentation.

Speaking to a Qt developer (who shall rename nameless to preserve his sanity, although I appreciate his help :), you can configure qmake to make a fully static app by adding the following line to the qmake config:


QMAKE_LFLAGS += -static

After running qmake again, this leads to the following:


chris@thinky:~/qt-embedded-linux-opensource-src-4.4.3/examples/tutorials/tutorial/t1$ make
g++ -c -pipe -fno-exceptions -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../../../mkspecs/qws/linux-x86-g++ -I. -I../../../../include/QtCore -I../../../../include/QtCore -I../../../../include/QtNetwork -I../../../../include/QtNetwork -I../../../../include/QtGui -I../../../../include/QtGui -I../../../../include -I.moc/release-static-emb-x86 -I.uic/release-static-emb-x86 -o .obj/release-static-emb-x86/main.o main.cpp
g++ -fno-exceptions -static -Wl,-rpath,/usr/local/Trolltech/QtEmbedded-4.4.3/lib -Wl,-rpath,/usr/local/Trolltech/QtEmbedded-4.4.3/lib -o t1 .obj/release-static-emb-x86/main.o -L/home/chris/qt-embedded-linux-opensource-src-4.4.3/lib -lQtGui -L/home/chris/qt-embedded-linux-opensource-src-4.4.3/lib -lQtNetwork -lQtCore -lm -lrt -lpthread -ldl
/home/chris/qt-embedded-linux-opensource-src-4.4.3/lib/libQtCore.a(qlibrary_unix.o): In function `QLibraryPrivate::load_sys()':
qlibrary_unix.cpp:(.text+0x307): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/home/chris/qt-embedded-linux-opensource-src-4.4.3/lib/libQtCore.a(qfsfileengine_unix.o): In function `QFSFileEngine::owner(QAbstractFileEngine::FileOwner) const':
qfsfileengine_unix.cpp:(.text+0x838): warning: Using 'getgrgid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
qfsfileengine_unix.cpp:(.text+0x736): warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/home/chris/qt-embedded-linux-opensource-src-4.4.3/lib/libQtNetwork.a(qhostinfo_unix.o): In function `QHostInfoAgent::fromName(QString const&)':
qhostinfo_unix.cpp:(.text+0x30e): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking

Not good. It turns out that linking statically to glibc is hard, because getXXbyYY such as getpwuid_r require NSS, which is a loadable module….

Next step is to try compiling Qt against uClibc.

February 7, 2009

Liverpool’s Three Graces by night: Royal Liver Buliding, Cunard Building, Port of Liverpool Building

I took a series of images at the recent LivLug meeting and stitched them into this panorama, I’m quite pleased how it turned out. It’s not as good as it could be as I was trying to work quickly, on account of it being very cold indeed that evening. Will have to revisit during the summer and re-take it.

Canon EOS 20D, 100-400mm L, 10 second exposure, f/10.

Liverpool's Three Graces by night: Royal Liver Buliding, Cunard Building, Port of Liverpool Building, Pier Head, Liverpool
(click for larger version)

January 13, 2009

Input validation in Artificial Intelligence

A couple of years ago when I was studying Articificial Intelligence as part of my Computer Science course at university I played around with a couple of AI bots.

One of those that I found was Ikea’s “Ask Anna”, which is prominently advertised on their home page.

anna1

I was curious as to how they handled input validation, so I tested with some potentially objectionable words.

anna21

One of the “inappropriate” terms I tested was “dumb”. Unfortunately Anna’s interpretation of this word could be improved, as it’s not appropriate to equate “dumb” with “disabled people” or their carers.

anna3

January 10, 2009

Windows 7 beta1 first impressions

I downloaded and installed Windows 7 beta1 and unfortunately my first impressions are somewhat poor (yes, I *know* it’s beta1, and it’s meant to be broken ;). The installer was quite easy to use, although it was slow.

After installation, I installed the NVidia drivers from Windows Update, as well as a couple of other things like Lightroom, DVB Viewer, and the Technotrend drivers. After rebooting the result was a blue screen of death.

The familiar BSOD STOP error: “A problem has been detected and Windows has been shut down to prevent damage to your computer”. “Attempt to reset the display driver and recover from timeout failed.” The error is in nvlddmkm.sys.

Windows 7 blue screen of death (BSOD)

This results in the familiar “Safe mode or not” on the next boot…

Windows 7 blue screen of death (BSOD)

January 5, 2009

WD TV is a GPL violation

I first started looking at the WD TV because I was interested in buying one, and once I found out that it was running Linux, started to investigate if I could customise it to my needs.

Update:  9th Feb 2009. WD released a new source code package some time ago (WDTV_GPL_Code.zip version 1.01.02), but it’s still a GPL violation. See below.

Disclaimer: I Am Not A Lawyer, nor do I have expert knowledge of GPL enforcement. I am merely a free software enthusiast and *nix sysadmin.

Unfortunately the WD TV product, by the well known hard disk manufacturer Western Digital, appears to be violating the copyright of various free software projects, including those of the GNU and mtd-tools projects.

Of most concern to the GNU project is that a “toolchain” consisting of a binary-only version of gcc is provided. Of concern to mtd-tools is that the firmware contains a binary version of mtd-tools, but no source code appears to be provided.

Personally I think that it is unacceptable that WD is making money out of violating the GPL, and effectively distributing pirated software. There would be an uproar if WD was using pirated Microsoft software, for instance.

Information

The firmware and “source code” is available from
http://support.wdc.com/product/download.asp?groupid=1001&sid=112〈=en

The first problem is that the “source code” is only for version 1.00.01, while the binary version is 1.01.01.

(more…)

December 31, 2008

Dear HBOS,

I know you’re in a bit of trouble right now with the whole worldwide credit crunch thing, but allowing me to update my phone numbers still doesn’t really count as an “offer”.

Halifax

Older Posts »

Powered by WordPress