IPv6 on m0n0wall

I finally got around to sending my first ping6 echos! Who knew I’d get replies on my first go?!

My ADSL provider Andrews & Arnold have provided me with a /48 IPv6 subnet, which seems somewhat wasteful at 2^80 addresses (throw that in your calculator) but certainly useful for testing nevertheless. Whilst slowly getting my head around the task that is variable-length subnetting of IPv6 ranges – painful at best – I decided to just throw in a /64 subnet and set a static gateway address on m0n0wall‘s LAN interface to see if it would ‘just work’.

The result, is a working IPv6 LAN by simply enabling autoconfig from the m0n0wall box and telling Ubuntu’s Network Manager to use it. Et voila:

teh@desktop:~$ ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:01:29:fc:37:1d
inet addr:81.187.xxx.xxx Bcast:81.187.xxx.xxx Mask:255.255.255.240
inet6 addr: 2001:8b0:ff87:1:201:29ff:fefc:371d/64 Scope:Global
inet6 addr: fe80::201:29ff:fefc:371d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1616524 errors:0 dropped:0 overruns:0 frame:0
TX packets:2224946 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:277202062 (277.2 MB) TX bytes:519498762 (519.4 MB)
Interrupt:18

You’ll notice that the last 80 bits of my IPv6 address on this host were assigned via autoconfig, using part of my MAC address (the part that doesn’t correspond to a certain manufacturer, IIRC) as well as some randomly-generated bits, too.

And to make my night, ping6 worked straight away, too:

teh@desktop:~$ ping6 2001:08B0:FF88:0001::1
PING 2001:08B0:FF88:0001::1(2001:8b0:ff88:1::1) 56 data bytes
64 bytes from 2001:8b0:ff88:1::1: icmp_seq=1 ttl=64 time=3.81 ms
64 bytes from 2001:8b0:ff88:1::1: icmp_seq=2 ttl=64 time=0.130 ms
64 bytes from 2001:8b0:ff88:1::1: icmp_seq=3 ttl=64 time=0.132 ms

--- 2001:08B0:FF88:0001::1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.130/1.358/3.813/1.735 ms

Now to plan how I’m going to roll this out at work…

Pretending to be a Solaris admin

I’m always, always forgetting how to discover the available disks on a Solaris/OpenSolaris machine.

As I was having another (un-successful) crack at getting a disk controller (other than the motherboard’s IDE controller) to work with Nexenta Core v2, I’d again forgotten how I was meant to discover the disks as-probed by the OpenSolaris kernel.

Of course, Nexenta includes Ubuntu Hardy’s userland tools, but anything kernel/device-related is still very different to what I’m used to.

I finally found a particularly well-written post by Pascal Gienger, whom notes that:

First we will try to look up the disks accessible by our system:

# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0d0
/pci@0,0/pci-ide@1f,1/ide@0/cmdk@0,0
1. c1d0

/pci@0,0/pci-ide@1f,1/ide@1/cmdk@0,0
Specify disk (enter its number): ^C

Type CTRL-C to quit “format”.

If your disks do not show up, use devfsadm:

# devfsadm
# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0d0
/pci@0,0/pci-ide@1f,1/ide@0/cmdk@0,0
1. c0d1

/pci@0,0/pci-ide@1f,1/ide@0/cmdk@1,0
2. c1d0

/pci@0,0/pci-ide@1f,1/ide@1/cmdk@0,0
3. c1d1

/pci@0,0/pci-ide@1f,1/ide@1/cmdk@1,0
Specify disk (enter its number): ^C

You’ll notice that the virtual disks are mapped as IDE/ATA drives, so the disk device names don’t have a target specification “t”.

Which has helped me to finally find out that my second-hand (i.e. ‘borrowed’ from an old work machine) Adaptec RAID card, doesn’t work with Nexenta Core v2. Still, Core v3 will be out in a few months – maybe I’ll try again then.

Also worth noting, as it may be useful, iostat -En prints out similar information useful when searching for disks to use with ZFS.

Optical drive firmware updating in Linux

I recently needed to burn a copy of Windows 7 Pro but realisd that I’d unfortunately run out of blank DVD-Rs long ago. Fear not, for I live near an Aldi supermarket, whom sell everything dirt cheap. DVD-R’s a DVD-R, right?

Wrong. I tried at least three of the twenty I purchased (for a few quid) and none of them would even begin writing. Brasero/K3B both complained about incompatible media types.

Remembering that my DVD drive, a trusty NEC 3500A, was designed, built and purchased somewhere between 2004 and 2005 (4-5 years ago at this point) and that I hadn’t ever updated the firmware, I set about researching ways and means into doing this.

I came across this website, run by a pair of firmware hackers named Liggy and Dee whom have (between them) released, and continue to host, many firmware releases (both official and unofficial) for a wide variety of NEC optical drives.

What’s more, their binflash (or ‘necflash’) utility was even released as a Linux binary and it even provides compatibility for reading the official NEC .exe firmware releases! I was sceptical that it would work under Ubuntu 9.10 at first, but much to my delight it worked perfectly. With a little reading, I was able to dump my current firmware (2.16) to file and subsequently flash two different firmware releases: 2.58 (an OEM firmware release) and the latest, official NEC firmware 2.1A release.

The full output of my escapades for anyone curious:


~$ sudo ./necflash -flash -v -s Desktop/NECND350_v21A.exe /dev/sg2
Binflash - NEC version - (C) by Liggy and Herrie
Visit http://binflash.cdfreaks.com

Identified drive: 4 - 3031
Detected drive from Firmware: 4

You are about to flash your drive with the following firmware:

Vendor: _NEC
Identification: DVD_RW ND-3500AG
Version: 2.1A

Remember no one can be held responsible for any kind of failure!
Are you sure you want to proceed? (y/n) y

Entering safe mode
Sending firmware to drive at 0x006000
Sending firmware to drive at 0x00e000
Sending firmware to drive at 0x016000
Sending firmware to drive at 0x01e000
Sending firmware to drive at 0x026000
Sending firmware to drive at 0x02e000
Sending firmware to drive at 0x036000
Sending firmware to drive at 0x03e000
Sending firmware to drive at 0x046000
Sending firmware to drive at 0x04e000
Sending firmware to drive at 0x056000
Sending firmware to drive at 0x05e000
Sending firmware to drive at 0x066000
Sending firmware to drive at 0x06e000
Sending firmware to drive at 0x076000
Sending firmware to drive at 0x07e000
Sending firmware to drive at 0x086000
Sending firmware to drive at 0x08e000
Sending firmware to drive at 0x096000
Sending firmware to drive at 0x09e000
Sending firmware to drive at 0x0a6000
Sending firmware to drive at 0x0ae000
Sending firmware to drive at 0x0b6000
Sending firmware to drive at 0x0be000
Sending firmware to drive at 0x0c6000
Sending firmware to drive at 0x0ce000
Sending firmware to drive at 0x0d6000
Sending firmware to drive at 0x0de000
Sending firmware to drive at 0x0e6000
Sending firmware to drive at 0x0ee000
Sending firmware to drive at 0x0f6000
Sending firmware to drive at 0x0fe000
Sending checksum to drive
Erasing flash block 2
Erasing flash block 3
Erasing flash block 4
Erasing flash block 5
Erasing flash block 6
Erasing flash block 7
Erasing flash block 8
Erasing flash block 9
Erasing flash block 10
Erasing flash block 11
Erasing flash block 12
Erasing flash block 13
Erasing flash block 14
Erasing flash block 15
Erasing flash block 16
Erasing flash block 17
Erasing flash block 18
Writing flash block 2
Writing flash block 3
Writing flash block 4
Writing flash block 5
Writing flash block 6
Writing flash block 7
Writing flash block 8
Writing flash block 9
Writing flash block 10
Writing flash block 11
Writing flash block 12
Writing flash block 13
Writing flash block 14
Writing flash block 15
Writing flash block 16
Writing flash block 17
Writing flash block 18
Leaving safe mode

Whilst the 2.58 OEM release didn’t fix my problems, 2.1A did and I now have a freshly-burnt copy of Windows 7 Pro to go and play games with. Nice one, Liggy & Dee. :)

Testing Google Go on Ubuntu

Yesterday a few of you will have heard the news that Google recently launched a new programming language, named ‘Go‘.

Whilst I’m not a programmer, and exist far from the plain of ever pretending to be one – I do have some professional interests in playing with this. I’ll probably update this post a little later with some more, specific information when all can be revealed, but for now here’s a little taster:

root@gotest:~# 6g hello.go
root@gotest:~# 6l hello.6
root@gotest:~# ./6.out
hello, world

It works! This machine is an openvz container, running Ubuntu 9.04 x86_64 and it works a treat, with the only exception that I couldn’t build Go with the standard ‘all.bash’ make script. I had to use the ‘make.bash’ script, instead for it to work – something about probing the network devices not working with the former script. Thanks go to Rob Pike from Google, whom seems to have been working pretty darn hard in the #go-wild IRC channel on Freenode recently!

Update: 34SP.com are now offering Google Go development environments, for those wishing to dabble!

Exchange 2010 to support Firefox and Safari

I’m actually unbelievably shocked. Uncontrollable, crazy laughter gripped the inner space of my mind when I was faced with the news that Microsoft are planning to support Firefox 3.x and Safari 3 from the Exchange 2010 ‘Outlook Web Access’ web page.

Further still, they’re touting the fact that the OWA now has all of the features the regular Outlook desktop does!

Does this not strike anyone else as a move that would make Windows (and Office, particularly since itself and OpenOffice will by then both have full ODF compatibility) completely obsolete? Why would you pay for a Windows 7 site license, when you can upgrade your Exchange server to 2010, replace all of the Windows machines with Ubuntu 10.04 LTS, Firefox 3.1 and OpenOffice, and save your company thousands of pounds?

On top of this, they’ve supposedly tuned 2010 to be ‘less bursty’ in the way that it accesses the disk, as well as adding JBOD concatenation support. Does anyone else see that as ‘Please virtualise your Exchange servers’? Yep, so did I.

I suppose you could be running HyperV, but with Microsoft supporting iterations of Windows Server under RedHat Xen virtulisation, I really don’t see how they’re going to convince people to pay for their the majority of their bread-and-butter products, once Exchange 2010 débuts.

What’s next? Windows 7 released under the Microsoft Public License? Perhaps they’ll just call it ‘Windows Azure Client’ when they give it away for free…

Pidgin 2.5.5 hogging my CPU time

I’ve had a re-occurring issue with pidgin randomly screwing with my CPU usage; actually maxing out a single core for no apparent reason and/or crashing thereafter. In actual fact, I think I can even attribute a few recent gnome-panel crashes to this behaviour, as well.

Today I’ve been informed (by my darling girlfriend) that her buddy icon was out of date: she’d changed it a while back, yet my client was appeared to be stubbornly displaying the old icon, even weeks later. As I couldn’t find a method for forcing the buddy icon to update within the program itself, I navigated to ~/.purple/icons (finding approximately 1,660 cached icons!) and deleted the lot.

Since restarting pidgin it’s taken a while for the buddy icons to repopulate for some reason, but after a few tests, it does appear that they’re updating properly when changed by the other party. As a side effect, I believe I’ve found (and fixed) the cause of pidgin’s leak/loop/error! Hopefully someone else will find my serendipitous bug-squashing useful.

I may even launch a bug report, given that I couldn’t find one. Now all I need is time to do so… :)

Ubuntu Bug Day (flashplayer-nonfree)

Oddly enough, only a day after my post concerning some odd differences between two Ubuntu Flash 10 packages, I received an e-mail from the Ubuntu mailing list to tell me that the next hug (bug) day is actually centred around flashplayer-nonfree!

Quoting the e-mail for any of you not on the list:

Fellow Ubuntu Triagers!

This week's HugDay target is *drum roll please* flashplugin-nonfree!
* 78 New bugs need a hug
* 53 Incomplete bugs need a status check
* 35 Confirmed bugs need a review

Bookmark it, add it to your calendars, turn over those egg-timers!
* 5th of March, 2009
* http://wiki.ubuntu.com/UbuntuBugDay/20090305

Can't stress it enough: everyone can help!

Have some time? Triage boogz! I won't be upset if you get a headstart~ ;)
Have a blog? Blog about Hugday!
Have some screen space? Open #ubuntu-bugs and keep an eye out for
newcomers in need.
Have minions? Teach THEM to triage for you! :)

Wanna be famous? Is easy! remember to use 5-A-day so if you do a good
work your name could be listed at the top 5-A-Day Contributors in the
Ubuntu Hall of Fame page!

Make a difference; we will be in #ubuntu-bugs (FreeNode) all day and
night, and will be ready to answer your questions about how to help.

If you're new to all this, head to

http://wiki.ubuntu.com/HelpingWithBugs

Have a nice day,
Martin Mai
[From the BugSquad]

That’s quite a lot of bugs. Hopefully the Ubuntu ‘Jaunty Jackalope’ 9.04 release will iron these issues out.

Ubuntu and Flash 10

Bizarrely, I’ve noticed that the Canonical-supplied Adobe Flash 10 plugin isn’t working as well as the Adobe-supplied version.

You could regard this as a possibly moronic statement at first, but there’s a little evidence to back it up. Firstly, I’ve been using the ‘adobe-flashplugin’ package provided via the Canonical Partner repository for some time. I think it works a heck of a lot better than Flash 9, and I’ve been much happier with the experience. That isn’t to say that it’s perfect, but at least Firefox doesn’t crash with every 3rd/4th Youtube video I play.

By standard of course, the Canonical Partner repository is disabled within a fresh Ubuntu installation. So when my girlfriend mentioned that the videos on Llewtube.com weren’t displaying, I wasn’t surprised to find that she was using the latest version of the ‘flashplugin-nonfree’ package:

sudo dpkg -l | grep flash
ii flashplugin-nonfree 10.0.22.87ubuntu1~intrepid1 Adobe Flash Player plugin installer

Given that I could view the videos on the aforementioned website without a single issue, I went to check my plugin version:

ii adobe-flashplugin 10.0.22.87-2intrepid1 Adobe Flash Player plugin version 10

So we’re supposedly using the same version of the Flash plugin, but from different packages. Would anyone like to explain why one package works and the other does not?

Getting around the problem was a simple task for her: simply enable the Partner repository by navigating to the Software Sources configuration utility (via System -> Administration -> Software Sources) and (after giving your password) checking the two ‘partner’ lines under the Third Party tab. If you don’t have them, you can add them (one at a time) with these two lines:

deb http://archive.canonical.com/ubuntu intrepid partner
deb-src http://archive.canonical.com/ubuntu intrepid partner

(If you’re reading this, and you’ve not yet upgraded to Ubuntu 8.10; the bulk of this guide should work with 8.04 also. You will, however, need to swap out ‘intrepid’ for ‘hardy’! :) )

When you’ve enabled the partner repositories (check the boxes) it’s a matter of closing Software Sources and letting it reload the package sources when prompted. After that, simply open a terminal and paste in the following:

sudo apt-get remove --purge flashplugin-nonfree && sudo apt-get install adobe-flashplugin

If you restart Firefox, you should now be sorted. If in doubt, search in Synaptic (System -> Administration -> Synaptic) for ‘Flash’ and see what is (or isn’t) installed.

I’m spoilt these days…

I’ve just had to setup Windows on a physical machine (shudder) to control and monitor the IOMeter disk benchmarks that are needed for my final year project. I didn’t try to run it in Wine, but I suppose I should’ve. Needless to say, I do require it to be perfect in order to maintain the fairness of my testing, so Windows was unfortunately my first choice.

Due to the age of the hardware I had lying around; an old Athlon XP-M system with an Abit NF7-S 2.0 and 512MB of ‘borrowed’ memory (thanks Ian), it was safe to say that it wouldn’t be any good installing Vista on it. Therefore I downloaded and burnt an XP ISO from my MSDN account and set about installing XP to the 200GB SATA drive I had (thanks Neillans, actually!)

The Abit NF7-S range of boards (particularly the V2.0) were highly-regarded during their hay-day: a testament to Abit’s awesome legacy. Not least for their inclusion of SATA ports way back in 2002, when Serial ATA was a relatively new feature on desktop boards. It even included basic RAID functions across the twin ports, courtesy of the Sil3112r chipset, which is still sold today if you look hard enough. When this was my main motherboard I actually ran a pair of 36GB WD Raptors in RAID-0 (scarily the same pair I use as my root drive now! I’m poor, OK?) and everything worked extremely well.. I never had a single problem with it.

But fast-forward to installing XP onto a SATA single disk, and I was stumped for a little while. Aside from the faff in convincing my floppy drive to work with the board (I’d previously disabled it via three, separate options in the BIOS — nightmare) I then had XP’s installation looping continuously, instead of booting from the HDD to continue with the second phase of the installation. It was almost as if XP was failing to write NTLDR into the MBR, somehow.

Now by convention on modern motherboards, SATA ports can typically be set to three modes: RAID, AHCI, and IDE. The latter of which is used purely for compatibility with older operating systems. However, the ‘RAID’ mode typically prevents that particular disk from being presented as a possible boot disk by marking it for use within RAID arrays only. It’s all fairly self-explanatory, however.

However, within the NF7-S’s BIOS, there are no such options. You can either enable/disable the SATA chipset, and optionally enable/disable the ‘SATA RAID ROM’, which you would believe would be only required if creating RAID arrays. I didn’t wish to use the RAID features and therefore I didn’t intend on ear-marking the disk as a RAID disk, as I wanted to boot from it. Sounds sensible, right?

Sadly, unless this ROM option is actually enabled, regardless of whether or not I wished to use any of the RAID features; the disks will not be presented as boot disks. Quite why there is even an option in the first place is beyond me! Because of this, the XP installation CD was failing to find a suitable boot disk and was therefore intent on looping endlessly through the first phase of the installation process. Fun times…

It has since occurred to me just how far SATA adoption and usability has actually come in the last 5-6 years. With most chipsets now natively including anything from two to eight AHCI SATA ports, as well as incorporating much better integration into the BIOS menus. Similarly, with natively AHCI-aware operating systems such as Linux, Solaris (and friends), many BSDs, Vista (and Windows 7!) now becoming largely common-place, there are few reasons for any of the IDE-compatibility options any longer.

That is, unless you’ve only got a single-core processor, 512MB of memory and an old, awkward (but great) motherboard. I just wish the IOMeter devs would consider creating a GTK+/QT4 front-end for dynamo! :)

m0n0wall and 3G USB modems

I’ve been running a m0n0wall router for some time now. The build and design of the machine was meant to be documented on the ‘RoutITX’ page of this blog, but I’d never gotten around to finishing it off. I may do this now that I have more time, but I’m not promising anything…

Even so, due to the impressive compatibility of the Sony Ericsson K800i and Linux, and the subsequent lack of the same DHCP/CDC USB Ethernet adapter functionality in the K850i, I thought it’d be quite cool to see if the K800i could be configured as a back-up WAN interface within m0n0wall.

So I fish my K800i (now retired, although I wish it wasn’t) out of its resting place, find a USB cable, and plug it into the back of the m0n0wall machine. No new interface appeared on the ‘assign interfaces’ page, so I restarted it. Still no new interfaces. Upon checking the kernel messages in the log, I found these lines pertaining to the CDC USB Ethernet device:

Jan 4 20:28:06 kernel: device_attach: cdce0 attach returned 6
Jan 4 20:28:06 kernel: cdce0: could not find data bulk in
Jan 4 20:28:06 kernel: cdce0: Sony Ericsson Sony Ericsson K800, rev 2.00/0.00, addr 2

Which, as a Linux geek, confused me somewhat. Google turned up a number of results for ‘cdce0′ problems or ‘attach returned 6′ regarding various other drivers, but only one really addressed the issue in particular, albeit for a much older SE phone. You’ll notice that there haven’t been any replies, either.

A former colleague pointed me in the direction of a patch that was submitted around October 2008 which enables the proper handling of the CDC USB device within the Nokia N80. Hopefully it should help, but it may be some time before the patch filters down to m0n0wall.

This is just one of those times when I wish I’d followed the world of software development a little more.