Archive for the ‘Technology’ Category
Working with SPARC
Nearly two weeks ago I replied to a email offering up some old hardware on the Manchester Linux Users list, Tim was offering up a few SPARC machines amongst other things, and due to my interest in different CPU architectures I bit his hand off.
I’m now the lucky owner of two amazing little workhorses, a SPARCStation 20 and a UltraSPARC IV, both true workhorses of the Sun/Solaris era. The SPARCStation is a old world SPARC machine, in its pizza-box format and the interesting MBUS and SBUS connection interfaces with a sprinkle of SCSI, the Ultra on the other hand is more modern PCI and IDE so I was able to get fast network cards and big disks without much issue. due to the old nature of the SPARCStation hardware I’ve not really invested much time into it, I’ll have to poke at it sometime this weekend and get the old thing up and running.
For the moment I was far more interested in getting the Ultra running as a OpenBSD firewall / router, the Ultra is relatively small (but large when compared to the SPARCStation) and allowed me to tuck it under a table to run, much to the disappointment of my other half. The existing DD-WRT based Linksys was starting to show its age and was becoming flaky after a few years of running overclocked without added cooling. The SPARC machine presented an excellent opportunity due to the good support of OpenBSD and the amazing pf packet filtering included.
The next few days were spent faffing with the hardware and re-installing OpenBSD 4.5, I had numerous small issues that were all down to a faulty network card, possibly a faulty PCI slot but i’ve not had the time to push it further. The PCI issue was quite difficult to diagnose for someone whose had no experiences of the platform before hand, I’ve now had a days crash course in OpenBoot. I have to say, that OpenBoot is a fantastic platform and it aided me a lot in diagnosing the strange issues.
Unfortunately, there’s always one problem you can never get to the bottom of. I updated the box with a new PCI network card, a old CDROM and a fresh HDD, A day or so passed and no matter what I tried I couldn’t get the machine to boot from CDROM, it refused to detect media and even some times the drive. Thankfully, the previous owner had left a basic OpenBSD install on the machine that allowed me to download the install image and write to the swap partition, allowing for a quick and simple reinstall using the swap partition as the boot media. The CDROM works perfectly in OpenBSD, I don’t have the energy to chase down this bug any further.
Finally, after what feels like a week of work, I have a small footprint firewall that kicks the arse out of my existing DD-WRT box. While it may not be a amazing icon to show off, like Chris as his SGI coffee table, it gives me warm fuzzies that technology that would generally be disposable by modern standards has its use somewhere. Now the box is up and working, it’ll slowly disappear from my radar and the experiences I had with this individual bit of hardware will slip away, that is, until OpenBSD 4.6 or another hardware failure.
Fingers crossed eh?
Hacking the ZTE MF627
Its been a while since I’ve done a good hack article. so again I’m back onto my favourite topic of 3G modems. Thanks to the generous promotions at 3dongles4free I’ve been able to pickup a new Three dongle for next to nothing. As I’ve already got my E160G I didn’t really need this to be on the Three network.
After a quick search around and a few suggestions from existing mailing lists I’ve found out that a hacked firmware exists and these cheap and cheerful dongles can be flashed to allow any SIM card to be used. This should be a simple job of updating the software and using the new SIM card.
First of all, grab the software pack from Rapidshare, due to the questionable nature of this copy of the firmware no one has been willing to host it on their own hosting, and I’ll keep to that idea. Extract the files from the RAR and you should have a firmware upgrade, and a installation folder for the connection software. As the existing Three connection software is very limited, the software package includes the Telstra version which allows you to define your own settings.
Before you attempt the software upgrade, you need to remove any existing Three software, install the Telstra version and remove your SIM card from the dongle, then simply plug it in and run the firmware upgrade. This process will take around 15-25 minutes and once it’s done it’ll give you a prompt. During the upgrade do not power off your PC or remove the dongle from the USB socket. This will brick your dongle rendering it completely useless.
Now, put in your non-Three SIM card and plug it back into your PC, the Telstra software should start-up and try detect the device, you need to configure the software for your provider’s APN settings, but the PDF document included with the software package will give you all the details you need.
Remember, I take no responsibility for people bricking their equipment, you have been warned.
Importing History into Git
With my recent move over to Git for my VCS Home solution I decided to start afresh with new repositories and not migrating the history over, in the last few days i’ve noted that it was a very bad decision and having the full history will always be useful. Now i’m stuck in the situation of two repos with different histories. How do you reconcile these two trees into one full history tree?
First of all we need a working Git version of your existing repo, in my case, it’s in SVN, so I used the git-svn tool to import my svn repository.
$ cd ~/dev/ $ git svn clone http://tensixtyone.com/svn/home/trunk/bash
Git then downloads each SVN commit and imports it, this can be quite slow on large repositories but thankfully mine was only 20 or so commits. Now you have your originally repository in Git format the few final steps will bring in the changes you have done in the new repository.
To import the history we are going to generate a set of diffs, while this sounds less than ideal it is really the only clean way to get your new commits into your old repository, attempting to pull the commits in will throw errors as the commit hashes will not match.
First of all you need to find out the hash of your first commit in your new repository
$ cd ~/.dotfiles/bash
$ git log
...
commit ec508803a080f2146231fb4cd396cc18a2906a9b
Author: Andrew Williams
Date: Sat Apr 11 02:32:07 2009 +0100
Imported initial bash files
Then generate the diffs since that initial commit
$ git format-patch ec508803a080f2146231fb4cd396cc18a2906a9b..HEAD 0001-Added-bash_logout-file.patch 0002-Updated-bash-config-files.patch 0003-Updated-a-few-aliases.patch 0004-Updated-prompt-to-detect-if-we-re-using-vcsh.patch 0005-Fixed-nano-alias.patch
Now you have your fresh diffs, you need to import them into your existing repository. In addition i’m importing these into a new branch.
$ cd ~/dev/bash/ $ git branch new-bash $ git am ~/*.patch
The am command is mostly used to apply patches from a mailbox but for this case we can just tell it to use the patch files instead. After the command has completed you should be able to check git log and be able to see all the new commits.
Once your happy with the patches, it’s a case of switching to master and merging the changes.
$ git checkout master $ git merge new-bash
One thing to note, after this process the commits will have different hashes, so it wont be a simple case of pushing to your remote repo. I’d only recommend doing this if you have to, i’m sure that a better proceedure exists but this is what worked for me.
The “Big Bang” theory of FOSS projects
Over the last week or so I’ve become quite involved in the CrunchBang Linux project, I got picked up as a forum moderator and it has spiralled out of control since. I’m now a forum moderator, IRC channel operator, and a administrator on the CrunchBang Launchpad groups.
Crunchbang is quite an interesting project. A small distribution created by one man, Phillip Newborough, which gained almost overnight fame and is now ranked quite highly on Distrowatch. The speed of the success of CrunchBang is a massive achievement, especially when you take in the “youth” of the project. While i’m not the official biographer of the project I can see a few key stages that helped it gain such a strong following in a short time.
In the recent history of the project, fabsh, also known as Fabian Scherschel of Linux Outlaws fame, decided to give the distribution a go. It seems he instantly fell in love with it and recommended it to everyone via his identi.ca feed. During the next episode of Linux Outlaws, Fabian mentioned the distribution and how he has been trying it out. The result was a large spike in people downloading the install image and signing up to the forums, this was the time where I toddled along and discovered it myself.
Fast forward two weeks or so, and Distrowatch adds CrunchBang to their listing, a minor but important win in the expansion of the distribution, the DistroWatch listing brings in more and more people over time. Just after Christmas the 8.10.02 release was let lose and Distrowatch was one of the first sites to get the news out there. As the release was done over the relative quiet time of Christmas, the release note spent a good few days on the front page of Distrowatch. Over the Christmas period the forums saw a large boost in signups, which are usually a good indicator of how many people have downloaded the distribution.
So, the combination of a major Linux podcaster and reputable distribution news source gave Crunchbang it’s push into the limelight. What the last few weeks prove is that a few key figures could boost the popularity of a good product and take it from small time to the big time in a matter of weeks.
So, how is this applied to other projects?
First of all I think the key success on CrunchBang’s part is the product itself, a lightweight desktop environment, based on Openbox, designed for the power user crowd. A few people had mentioned that this was the type of area that Arch excelled in, but now the user had the convenience of Ubuntu to their Openbox desktop.
Second, the recommendation of trusted peers can only boost the popularity. With the “social media” that exists today a few trusted people could push a project from a bedroom to the stage, so to speak. With tools like identi.ca and Twitter, people have rapid methods of posting their thoughts. The social media can be a double edge sword, as quickly as your software is recommended it could be bashed and ridiculed just as easy. So, in my opinion, this can make or break your project.
Third and final item is the existing “web media”. Blogs and sites like Distrowatch, Slashdot, Engadget and other tech sites allow, again, for trusted people to review and make judgement of the project, a good recommendation will boost your users and a major site such as Slashdot will kill your server if your not careful.
So how does this all relate to the big bang? It doesn’t really; I thought the title would be snappy.
CrunchBang Linux – A day’s usage review
A while ago I spotted a post about a new Ubuntu based distribution that had been released, called CrunchBang Linux, as i’m not a great fan of Ubuntu distros anymore I passed this one up and never look at it again. A few weeks had passed until I heard mention of it again, Dan from Linux Outlaws, mentioned that he is trying out the recent version for a review on the show and that Fab is a massive fan. I decided to take a second look at it, trying my hardest not to be critical due to it’s Ubuntu base.
I’ve now got CrunchBang installed on my main desktop machine and I’ve been using it for a day, Maybe it’s a short length of time to review a distribution but I feel with my past experiences with numerous distros will help me get to grips with a new one quite quickly. Some of you may know, after being a Ubuntu user for well over a year I decided to move back to Debian and became quite critical of Ubuntu for its rash decisions regarding design and key choices. My dislike is not centred purely on Ubuntu, I remember one time where I had a near fit at using a OpenSUSE KDE 4.0 Live CD as I couldn’t switch off the default sound scheme, but that’s for another post. Back to the review…
CrunchBang Linux promotes itself as a lightweight version of Ubuntu, unlike Xubuntu’s XFCE desktop they’ve decided on using OpenBox and a few key programs from other desktop environments, like Thunar and Lxpanel.
My previous experience of the *box window managers have been with Blackbox during the very early days, when Enlightenment was all the rage and most distros used FVWM95, so checking out Openbox will hopefully be a refreshing blast to the past. My main concern was compatability, a lot of applications out there depend on certain features of the desktop environment. I left all my expectations at the door and decided to grab the Live CD and have a 10-15 minute play to see if everything works as expected and that it actually works on my slightly quirky setup.
The Live CD / Installation media is mirrored on a few sites, as it’s only a “baby” distro it’s not been picked up by the mainstream mirrors, thankfully, a few people in the community had offered some space up to the project and finding a local, fast mirror isn’t that difficult. As with all Ubuntu style Live CDs, it was a simple case of burning the ISO to a disc and rebooting the machine. I’m not sure if this is a feature of all new Ubuntu discs now, but the ISOLINUX menu had a option to check the installation media for errors, this would save you quite a bit of time if you suspect dodgy media.
The boot was quick, quicker than I expected. Usually with Ubuntu CDs I pop the disc into the drive the slip off to make a cup of tea and head back in time to get the last second or so of the desktop booting. This wasn’t the case with CrunchBang, after returning from a delightful brew making trip I noticed that the desktop was loaded and the default conky panel on the right side informed me that it’s been booted for about 5 minutes. So, boot speed, even from the CD it’s nice and quick.
To a user who has been brought up on the GNOME or KDE environments the initial desktop may take a second to sink in, by default it comes with a minimal panel and system information pane on the right side of the screen and nothing more, no desktop icons or fluffy applications menu, just a basic desktop. Right clicking anywhere on the desktop brings up the system menu and the list of applications. The default install gives you a nice range of applications, some you’ll never use, others are dire essentials.The default includes a few keynote applications:
- Firefox 3.0.4
- Pidgin 2.5.2
- Rhythmbox 0.11.3
- Skype 2.0
- Gwibber 0.7.2
- GIMP 2.6
A few more are available, and a full list can be found on the CrunchBang wiki. Needless to say I was impressed, not only had they selected reasonable defaults but as the distribution is based off Intrepid it had the latest and greatest versions available. Skype is a interesting nugget in my opinion, possibly being the only QT application in the default installation. I do understand that lots of people use Skype for VOIP, but maybe they should consider including another application like Ekiga.
So, I have my desktop running as a Live CD, time to see how it fayred in real world usage. I can happly say, after a good hour or so usage I didn’t feel restricted by the choice of desktop environment, Openbox is low key but quick and powerful. I decided after just a few hours usage to commit to this distro, ditching my current Debian Lenny install.
The installation of CrunchBang was nothing really spectacular, It’s a standard Ubiquity installer which does it’s job very quickly. A few quick selections and the dreaded disc paritioner screens and you on your way. Installation took about 10 minutes on my machine and felt a little quicker than previous Ubuntu installs, but I put this down to a little bias on my part. Rebooting the machine brought up a standard GRUB menu and I happly noticed that it detected my existing Windows installation and put the relative entry in. Again, the boot was quick and my machine boots to the desktop in under a minute.
So, here comes the negatives. A few minor issues have bugged me since i’ve started using CrunchBang, but nothing show stopping. So to save time I’ll just put them down as bullet points:
- xcompmgr seems to have a “dicky-fit” after a few hours use, making all window focus go out of the window. Disable/enable of Compositing fixes that.
- Tray Icons are hit and miss to what actual colour they use for their background. In my case with the “Fawn” gtk theme you get either a brown or beige background, which looks a little messy. Not really a distribution problem but still annoying.
- Restarting Conky seems to paint over the entire desktop for no reason, causing the Windows-esq issue when you have to use an existing window to get the desktop to repaint.
- By default, the xserver won’t detect 1280×1024. Simple fix of modifying the Xorg configuration but initial boot of the Live CD can be annoying with a mishmash resolution.
As I said, the negatives are MINOR. Really, really minor. CrunchBang was designed as a “2nd – 3rd” distribution for users, so it targets the section that are more than happy to have a twiddle with the system configuration and the thought of text only configuration doesn’t phase them. If you fall into this category and you’re looking for a lightweight desktop distribution then i’d suggest you grab a copy of CrunchBang and give it a whirl.
Wordpress Upgrade
Last night I learned about the Wordpress 2.7-RC2 release, the latest and greatest release with all new fangled features. My current install has been nagging me to upgrade for quite a while, so I decided to jump up to one of the test releases to give it a whirl. After all, If anything went wrong I can just roll it back no fuss.
The download package is the usual mixture of raw files and brief instructions, I roughly followed the extended guide on the website as I knew a few steps could be skipped on my install. I backed up the original directory and MySQL database, then grabbed the new install package and installed it in a similar directory to my current install, then slowly copied over the required files to the new folder. After about ten minutes I had a ready to go version of 2.7-RC2, with a quick “ln” command I had the site live. A quick run of the upgrade page and everything worked.
So, how is it? The admin interface is a complete change to the older 2.6 releases and it makes a lot more sense than the old version. No longer do you have to fight with a massive list of options in the setting pages, instead of being stretched across the top they’re in a nice, tidy sidebar. I’m sure I’ll hit some issues sooner or later, but all the plugins I use work fine and as fast as ever.
Here’s hoping to a successful 2.7 final release.
Liverpool LUG Talk
So, I finally got round to giving a talk at LivLUG, anyone who knows me will know i’m not the best public speaker in the world and I get quite nervous at the thought. It was time to grab the bull by the horns and actually do it!
My first talk was on the usage of the Wiimote within Linux, The Wiimote are very simple Bluetooth devices that can be accessed over the standard APIs with an additional library called CWiid. This allows the device to be used as a input device or as a general I/O device.
It’s quite hard to explain it in just text alone, So i’ve put my presentation on the LivLUG wiki everyone to have a look at. I recommend you grab it and give it a try yourself.
EDIT: Yes, It’s on the wiki now, but heres the direct link.
Google Android source is now available
A little late, but still interesting. Google has announced that the source for Android is now available. Google have kept up their end of the bargain and the source is out there for all to view, it’s a interesting prospect with the G1 release just around the corner. I know that quite a few hackers out where will be tinkering with Android for the next couple of weeks, maybe even have some interesting developments for the G1 launch.
Now that the source is out there, I wonder what the response the other platform developers will have. I suspect Nokia/Symbian to play down Android’s place in the market and RIM to wave away the benefits of open source. I have to wonder, HTC are releasing the G1 and now Google has released the source. Will users be able to flash update their version of Android? Or will they be bound to the operators/HTCs distribution of the software? If users are allow to keep up with the latest and greatest developments for the platform I suspect the big players will start to sweat a little. Only time will tell, but it’s starting to look good.
Three Mobile Broadband + Huawei E160G
I went to the post office and got my hands on the Huawei E160G with my reduced contract, and so far I am very pleased with it. The modem itself is a large USB stick, very comparable in size to a cigarette lighter. What is interesting is that the electronics can now be packaged in such a small kit, why ain’t they producing mobile phones of this size?
My first step was to get it working on Windows, I plugged in the modem on my old Windows PC and followed the numerous (and strange) online prompts to setup the software. After a lot of beeping, detecting new hardware and other jiggery pokery, I was presented with the Three Modem Manager application. The modem manager is a simple too that enables you to run the “dialup” connection through the modem. I whipped open the setup manual which informed me that no other setup was required bar setting up the software. So I clicked “Connect”…
… and it failed?
According to the tool I had to check my settings to see if they’re correct. This is a fresh setup of the tool, why would I need to check the settings when Three’s own guide mentions theres no setup needed. After 10-15 minutes poking around in the settings menu I finally threw in the towel. Sod it, I wanted to run this thing on Linux anyway so why am I putting myself through the pain?
Linux is, well, the way it was supposed to happen. I plugged in the stick and straight away I had numerous devices available, the “CD-ROM drive” for the drivers, the MicroSD reader, and the “tty” ports for the actual GSM modem. At this time I could of gone the route of setting up Gnome PPP and related tools to dialout to the provider and start using my new fancy net connection, but I’d heard that Network Manager 0.7 had the features to use 3G/GPRS built in without any extra settings. I decided to investigate the new version of Network Manager.
After much digging around on the ‘tubes, I finally found a Debian repository containing a build of the lastest Network Manager SVN. A little apt pinning and installation later I had the new version of the tool install. I browsed the existing menu and found a new option: “Auto connection to 3G/GPRS” , I selected the option and it connected.
I have to have a little moment to reflect here, “Mobile Broadband” is a new fad at the moment for most telecoms providers worldwide, so you would expect the Linux software support to be a little sketchy and buggy, but as it turns out the Linux method is alot simplier and easier to use. I’m not sure if I was missing anything obvious in Windows, but isn’t this stuff just supposed to work?
So, signed on to 3G I decided to give it a run for it’s money. I’m running these tests at 1:08am so it maybe a little bias, as I doubt many people would be actually using the APs at this time. I seem to be getting a variable speed of about 1-2mbps, and 150kbps upstream, not bad at all for a mobile provider. The documentation mentions that you should expect up to 2.5mbps, not the 7.2mbps advertised on some sites, all in all Three do a good job of pre-warning you that the speed on the box is not always what you get.
So far I’m happy with it, I’ve had a few minor issues with the stick not registering on the network but I’m not sure if this was down to my settings or just a small outage. I’ll post a guide in the next few days on configuring Debian up for Network Manager 0.7 and setting it up to work with the E160G.
Mobile Broadband
At first, when the likes of Three and Vodafone released their “Mobile Broadband” services I was a little skeptical that it’ll be worth the money. 3G data is notoriously rubbish in the UK, either services are capped back to GPRS speeds or are heavily firewalled to make a “walled garden” of approved content. The premise is as follows, Three are starting to reduce their monthly cost in a attempt to get the customers in to back their massive HSDPA expansion in the UK, along with sites like Quidco offering interesting discounts on contracts and special half-price deals, it looks even better…
So I bought in.
On Wednesday I bought Three’s 5GB/month offer package through Quidco, which came to £7.50/per month and £12.50 cashback. For me, the 5GB limit is perfect as I doubt i’ll ever use over that amount in a monthly period. A few people have pointed me to similar packages on T-Mobile, but you can see just from a quick look in that list that the actual price is quite high for what you get, the only bonuses of that package would be the free T-Mobile wifi access (which theres alot of access points for in the UK) and the AUP style limiting, in that if you go over your limit you don’t get charged, you only get kicked up to the higher package if your a constant abuser.
So what’s the catch? Overage. Three charge you £1/per MB in overage, so a extra GB would cost you £1024. In today’s modern telecoms world that is an insane price, which again many people have pointed out to me. If you have no intention of using up to the bandwidth limit, what’s the issue?
Well, I got a useful Royal Mail red slip through the post yesterday, so I have to head down and pickup the equipment. Hopefully by the end of today I can give it a test and write down some more thoughts on it.
