Software
Automount a drive in Ubuntu
I wrote this as a post on XBMC forum, but I thought I should share the wealth. The following is a guide to automounting a drive in a minimal install of Ubuntu with no GUI or desktop, only CLI access.
To manually get a minimal install of Ubuntu to auto-mount a USB drive at boot:
First off, you need command line access (also called The Terminal) to your installation and also you need to boot WITHOUT your USB drive connected. So, shutdown your box and then disconnect your USB drive. Now restart the box. Then, when XBMC has loaded, press Alt and F7 together, which should bring up a new Terminal screen with a log in.
Then log in using your username and password that you set up when you installed Ubuntu.
Next you need to type the following:
tail -f /var/log/syslog
This basically prints out the system log as it changes. Once you have typed this, plug in your USB drive. You should see a load of new stuff being printed in your terminal, this is the Ubuntu system recognising and loading your USB drive (though not mounting it). You should see something like this:
Jan 8 13:13:34 xpuntu kernel: [ 1671.616121] usb 2-2: new high speed USB device using ehci_hcd and address 5
Jan 8 13:13:34 xpuntu kernel: [ 1671.750917] usb 2-2: configuration #1 chosen from 1 choice
Jan 8 13:13:34 xpuntu kernel: [ 1671.752477] scsi6 : SCSI emulation for USB Mass Storage devices
Jan 8 13:13:34 xpuntu kernel: [ 1671.752815] usb-storage: device found at 5
Jan 8 13:13:34 xpuntu kernel: [ 1671.752820] usb-storage: waiting for device to settle before scanning
Jan 8 13:13:39 xpuntu kernel: [ 1676.753513] usb-storage: device scan complete
Jan 8 13:13:39 xpuntu kernel: [ 1676.754606] scsi 6:0:0:0: Direct-Access WDC WD16 00AABB-56PUA0 7H00 PQ: 0 ANSI: 2 CCS
Jan 8 13:13:39 xpuntu kernel: [ 1676.755793] sd 6:0:0:0: Attached scsi generic sg2 type 0
Jan 8 13:13:39 xpuntu kernel: [ 1676.756402] sd 6:0:0:0: [sdb] 312581808 512-byte logical blocks: (160 GB/149 GiB)
Jan 8 13:13:39 xpuntu kernel: [ 1676.757163] sd 6:0:0:0: [sdb] Write Protect is off
Jan 8 13:13:39 xpuntu kernel: [ 1676.757171] sd 6:0:0:0: [sdb] Mode Sense: 00 38 00 00
Jan 8 13:13:39 xpuntu kernel: [ 1676.757176] sd 6:0:0:0: [sdb] Assuming drive cache: write through
Jan 8 13:13:39 xpuntu kernel: [ 1676.761108] sd 6:0:0:0: [sdb] Assuming drive cache: write through
Jan 8 13:13:39 xpuntu kernel: [ 1676.761119] sdb: sdb1
Jan 8 13:13:39 xpuntu kernel: [ 1676.774572] sd 6:0:0:0: [sdb] Assuming drive cache: write through
Jan 8 13:13:39 xpuntu kernel: [ 1676.774583] sd 6:0:0:0: [sdb] Attached SCSI disk
You want to look out for the reference to “[sd*]“, in my case it is [sdb]. This is the name that Ubuntu has given to your USB drive.
Next stop the tail command, so press:
Ctrl and C
This stops the tail command, then type the following:
sudo blkid
You will have to enter your password. This should give you something like the following:
/dev/sda1: UUID="1024B74F24B73696" TYPE="ntfs"
/dev/sda5: UUID="015273a3-e1a8-4d53-867f-ffec83b3df60" TYPE="swap"
/dev/sda6: UUID="50b2512a-4d07-4a83-860e-be608a5b2cb7" TYPE="ext4"
/dev/sdb1: LABEL="" UUID="48D3-B1C9" TYPE="vfat"
What you see should be different from this. This basically lists all the drives attached to your system, alongside two important pieces of info, the drives UUID number and what the drive is formatted as. You need to find the reference to the “sd*” that you found out earlier, so in my case it is /dev/sdb1. Then, make a note of the UUID number and the TYPE as well, in my case it is vfat.
So, now we know where our USB drive is and what it is called.
Next, we want to tell Ubuntu to automount it each time it boots.
So, you need to edit the /etc/fstab file that tells Ubuntu what drives to mount at boot. Be careful here, don’t delete or change anything that is already in this file, since it will stop your device from booting. It is ok to add new stuff to this file however. To be safe, we shall make a backup of the /etc/fstab file, just incase we mess up. If we do mess up, simple copy this backup over the /etc/fstab file and reboot and everything will be back as we found it. So, to make a backup simple type:
sudo cp /etc/fstab /etc/fstabackup
This copies the /etc/fstab file to /etc/fstabackup, which we can use as a backup.
To edit the /etc/fstab file, you need to use the command line Text editor called Vi ([url]http://en.wikipedia.org/wiki/Vi[/url] and [url]http://www.cs.colostate.edu/helpdocs/vi.html[/url]) I would recommend reading about it first, since it is a bit of an arse to use in Terminal mode.
Start Vi to edit your file using:
sudo vi /etc/fstab
Use your arrow keys to move down to the very end of the file. Then press “a” to Append stuff to the end of the file. Press Return to start a new line and then type the following:
UUID=YOURUUIDNUMBERHERE /home/xbmc/usb vfat defaults 0 0
Add your own UUID number after the = and change the TYPE if yours wasn’t vfat. /home/xbmc/usb is where you will be mounting your USB drive, this can be anything you want, but to make your life easy, since XBMC defaults to showing your home directory in the file browser, put it under your home directory, so in my case, the main user on my box is xbmc, so I use /home/xbmc/usb.
Press Enter again after typing that, then press Escape, then press and hold Shift and press Z twice, this saves and exits Vi.
Next, you need to make the folder that the drive will be mounted in, so type:
mkdir /home/xbmc/usb
Replace /home/xbmc/usb with whatever you put in the /etc/fstab file earlier.
Finally, that is it. Hopefully, if all went well, you can now simply reboot, with your USB drive attached, and the drive will be found at /home/xbmc/usb which you can navigate to from XBMC.
Best of luck!!
Fix the Dell Mini 10v Touchpad
So, my lovely Wife recently got a rather cute Dell Mini 10v.
It comes with a horribly stripped down version of Ubuntu 8.04 from Dell pre-installed. Luckily, however, that can be ripped out and a nice new install of 9.04 can take its place and it all works wonderfully….except the touchpad. To save space, Dell has used a horrible touchpad that integrates the two left and right mouse buttons into the touchpad itself, so when you go to click on something, you actualy end up moving the mouse at the same time. I was amazed that no one mentioned this in any of the reviews about the mini 10v, I guess everyone was embarrassed since they thought it was just them and they had fat fingers! Luckily, the Open Source Ubuntu community being what it is, there is a fix out there.
If you follow this post there is a clear step-by-step guide telling you how to download some specialised drivers for the touchpad that disable the lower portion of the touchpad, so that it works just as a left and right mouse button and not as part of the touchpad. THANK YOU. My Wife was getting ready to throw her netbook out the window until I found that fix. Be warned though, it only works on the 9.04 (and hopefully later) versions of Ubuntu and not on the version of Ubuntu that comes pre-installed, so you will have to install a new normal version of Ubuntu from their website first (though this is a simple process). I hope this helps some one else and allows them to love their Mini 10v, not hate it!
Windows Session Save and Restore
So, I do a lot of work from home and often have a large number of different programs and files open at the same time. I use two different computers, with the mouse and keyboard shared between the two using the excellent Synergy+. Often I am working on a particular project that last a number of days, each day I need to open the same files and folders. I was wondering if there was an app out there that allowed me to save my Windows “session” i.e. all the programs and files that I had open so I could quickly restore them the next day.
Now, after doing a lot of searching, sadly it seems there isn’t
The best solution seems to be to use Windows Standby/Hibernate. But this is kinda impracitcal, since I want to use the computer after I have saved the session. Another option seemed to be TwinsPlay which has a Session Save feature, but this seemed to crash my computer and kill Windows Explorer
so that was out. Another option was SmartClose however, this only managed to save the running programs, but not the actual files those programs had open (so it would save and restore OpenOffice, but not the XLS file that OpenOffice actually had open). So once again, this was no real use. My final option was Microsoft Research’s own GroupBar. Sadly though, this also only saved and restored the running program, not the file that that had open.
So, I am kinda stuck
My only alternative is to create a batch file to do this, so I would create a new text file, put in the following commands, as an example:
start /d C:\Windows\System32\ calc.exe
start /d "C:\Program Files\Mozilla Firefox" firefox.exe https://www.bankofamerica.com
start /d C:\finance\spreadsheets budget.xls
And then save it as start.bat (thanks to watchingthenet). But this is hardly the best solution. I am sure there is a better solution out there and if anyone knows it, hit me up in the comments (I recon Autohotkey can do this, but I don’t know where to start).
fsck.ext3: Bad magic number in super-block
So, every so often after upgrading my Ubuntu server, I occasionally get an error during boot, saying the following:
fsck.ext3: Superblock invalid, trying backup blocks…
fsck.ext3: Bad magic number in super-block while trying to open /dev/sdc1
fsck died with exit code 8
After some rooting around, it turns out to be an error on my part. It is all down to my /etc/fstab file (a text file which tells Ubuntu how and where to mount all the hard drives in your system). A while ago, Ubuntu changed the way it records drives details, whereas it use to use /dev/sdX to refer to a drive (with X being a-z) it now uses UUIDs instead. These are unique ID numbers that the system gives to a drive. It changed from /dev/sdX to UUID since occasionally the sdX number would change upon a reboot.
This was exactly what was happening to me. In my fstab file I used /dev/sdc1 to refer to one USB hard drive, and a UUID to refer to another. fstab correctly mounted the UUID drive, but the /dev/sdc1 had changed from the original USB drive it referred to, to the same USB drive that I mounted via the UUID number, thus it failed to mount. When fsck (Ubuntu’s file checking program) runs, it uses fstab to find out info about the hard drives you have. If you have a situation like mine where two entries where referring to the same hard drive, fsck freaks out and dies, thus the error.
To fix this, you need to edit your fstab. Now, if you are lucky, you can simply type EXIT at the prompt you get when this error occurs and the system will boot up. If not, I’d recommend using an Ubuntu LiveCD to boot up the system and then edit your fstab file.
So, open /etc/fstab in a text editor, make sure you use a user with the correct privileges to do this. Then, open a command prompt and type
sudo fdisk -l
This will list all your hard drives, allowing you to identify them. Next, type:
sudo blkid
This will list all your hard drives and their UUID numbers.
Using the info from the first command, fdisk and the UUID number from the second command, blkid, you can work out which device has which UUID number. Then make sure in your /etc/fstab file, you refer to devices using UUID=XXXXXXXXXXXXXXX instead of /dev/sdXX.
This way, your disks will always mount correctly and you shouldn’t get anymore fsck errors on boot, well until your hard drive dies lol!
What Google Chrome OS Is and Isn’t
OK, first off, Google Chrome will not be a replacement for Windows, MacOS or any of the major Linux variants.
It will be one thing and one thing only, a beautifully quick and simple Web Browsing Platform. It will load in seconds and present you with the Chrome Browser, allowing you to access the web and all the Web Services that are out there in no time at all. Being installed on your own hardware means that you have the added bonus of local storage, allowing you to work offline when you have no internet access.

Google Chrome OS
It will no doubt feature a version of Google Gears, so you will be able to run Gmail, Picasa, Google Docs, Google Spreadsheet and maybe even some variant of Google Maps offline. It will work in the same way that Chrome does, separating all running programs from the underlying Kernel, ensuring that viruses and malware simply can’t infect the base system. It will allow you to install Google Gadget-type applications only, it wont allow you to run many other apps, since that is not what it is designed for (unless those apps are modified to work as a Desktop Gadget) – we will no doubt see a massive fight to develop a Google Desktop Gadget Wrapper allowing you to run Windows, MacOS and Linux apps (these things will be like a Gadget version of Wine on Linux).
It will ofcourse intergrate with Google Search, allowing you to easily visualise all your locally stored content, to find anything quickly (as such you might not even need a file system as we know it with a folder heirachy, since every item will be pre-tagged and easily accessbile via a nice simple tag/timeline/type UI. It will also intergrate with on-line storage, allowing you to remotely store your settings and apps, so you can log into your Chrome OS account from any H/W that has Chrome OS installed on it. On-line storage of all your local content will be available in a professional version for a monthly fee, allowing you to access your locally stored content from any Chrome OS.
A lot of people will be disappointed that they can’t load the apps they are use to and they can’t get certain peripherals to work initially. But then these people are missing the point of Chrome OS. It is an alternative to Windows and the others, for those that live their life on-line, need quick access to Gmail, Twitter, Facebook and more and don’t use normal off-line applications.
Being Open Source, a million and one variants of the Chrome OS will begin in ernest, some trying to merge it with Ubuntu, others trying to add a Windows compatibility layer via Wine. Many of these will die within the first ten months, a few with some clever ideas will keep going.
Just expect there to be lots of moaning and whining from early adopters who don’t understand what it is all about, but expect Google to produce an amazingly stable, fast platform allowing you to browse the web and be very very impressed.
How to update Windows Vista style
I am usually a big fan of Windows Vista, it seems to work really well. However, there are some aspects of it that seem, well, so half arsed.
For example, this morning, Vista was moaning at me that it had some updates to install, but as I had some work to do, I clicked on the Postpone button. Ten minutes later up popped the reminder again and I clicked on Postpone again, but this time selected 4 hours. Obviously Vista didn’t like this, because, ten minutes later, up popped a command prompt, all my programs closed (giving me no time to save) and Vista logged off to install updates…….and then it BSOD….nice one Microsoft
After an automatic restart, a few seconds of some weird looking command prompt view, Vista loaded in Safe Mode and it informed me it had suffered an unexpected shutdown and that updates had failed to install. Hmm, you don’t say.
An excellent free multiplayer game
There are many great games out there for both PC and console, but there aren’t as many great free ones. This was all changed with the release of Wolfenstein: Enemy Territory; commonly referred to as ET. ET is a WWII-themed multiplayer first person shooter (FPS). There is no single-player mode, but this is no bad thing, since the multiplayer mode is truly exceptional.
You join either the axis or the allies, and then choose a class: either Soldier, Medic, Engineer, Field Ops or Covert Ops. Each class has certain unique abilities (Soldiers can use extra-powerful weapons, Medics can revive and heal, Engineers can destroy and repair objectives, Field Ops can call airstrikes and give ammo and Covert Ops can disguise themselves as the enemy). Each map typically has an objective that has to be completed by one of the teams, or sometimes each team has an objective to complete.
All the game servers are hosted by clans or individuals, meaning they often come with a ready-made community. Despite the game being released in 2003, it is still very popular and has a cult following amongst its regular players.
I play only on one server, those provided by the Buffalo Bad Ass (BBA) clan (of which I am a member). They are generally ranked number one amongst all the ET servers, and are known for having a good friendly bunch of players on.
If you like FPS and multiplayer games, I highly recommend you get your hands on this excellent free game. Head on over to the BBA forums if you need any help to get started, and don’t be put off if you get killed a lot when you first start. We were all noobs once.
The first link below gives you a download for the original installer, it is then worth installing the two additional patches that are also linked.
The problem with Ubuntu
Now, I am a huge fan of Ubuntu. It just works, in fact, I have never ever had it crash on me, whilst good old Vista and XP throws wobblies on the odd occassion. However, I think it has a fundamental flaw. It is written by techies, who know Linux inside out and are very happy with the command line. As such, if you want to do anything more than simple web browsing, IMing and emailing – which maybe most users want to to – then you start to get a little undone. Why? Because anything more slightly advanced requires you to start to know some command line stuff and be happy editing text files.
This includes setting up samba, setting up apache etc etc. Now, one could argue that those kinda things are pretty advanced and if you know about them, then you should be techie enough to be happy with the command line and text files, but I disagree. Looking at Windows, you can do pretty much whatever you want with it and you never have to edit a text file. This seems to be somethhing endemic within Ubuntu.
For example, I was trying to work out how to carry out simple incremental backups of certain folders in Ubuntu. After googling, it appeared that I need to use some command line tools like rsync or rdiff. Now, since I am still not that comfortable with scripts and cron, I just didn’t know what to do. Whereas in Windows, there are a million and one different options, all having a nice GUI. Thus me, being probobly the average Ubuntu user hits a huge barrier, and this is feel is the major problem of Ubuntu. It has not yet fully converted to the idea that simple users need GUIs. However, it is moving towards this belief and is much much more friendly than earlier versions, I just feel until it gets to the point where there is a GUI for every option and tool and all the packages that can be downloaded via synaptics have a GUI then it is going to have problems.
Windows 7 Hysteria
So, news of Windows 7 hits the internets and the tech sites go wild.
Why this obsession with yet another OS, when Vista still has barely bedded in? It seems that people have got use to Vista now – there are hardly any articles produced these days about the woes of Vista, most now are just about the usual tips, tricks and hacks you can do to it to make it work how we want. Funny that, I am sure the same thing happened when XP was first released (everybody freaking about the lack of driver support and all the new features people hated, now though, people love it for its stability and the way you can hack it).
I’m not saying MS shouldn’t develop new versions, but I wish the tech world would just relax a little bit and wait for the RCs, as opposed to desperately hunt out anything new. This to me is the problem with the tech industry, new is always better, even if in many cases it aint.


