Fixing the Ubuntu bind9 named process 99% cpu usage issue

If you find the named process on your Ubuntu/Linux based server taking up a high amount of (e.g. 99%) CPU time, then check if the /var/cache/bind directory has the correct permissions.

If you run ll -d /var/cache/bind and find that only the root user has write permissions to the directory, i.e. it looks like the following:

drwxr-xr-x 2 root root 4.0K Apr 14 15:29 /var/cache/bind

Switch to the root user and change the group to bind, and give it write permissions, by running the following:

chown root:bind /var/cache/bind
chmod g+w /var/cache/bind

Then you will just need to restart bind9 by running the following:

service bind9 restart

Now it should be behaving better.

Moving the “Users” directory in Windows 7

This shows you how to move the C:\Users\ folder to a different location.

If you want to have your Users folder stored somewhere other than the default location, you generally need to do an unattended installation with a modified installation script. If want to move the folder on an existing installation, then you need to make a couple of changes to the registry and then move the folder yourself. This is what we’ll do here.

The Users folder is the default folder/directory name for the Windows ProfilesDirectory, and by default it is stored in %SystemDrive%. Typically this is your C:\ drive (unless you installed Windows on a different drive), so it looks like C:\User\. We’re going to move it to the D: drive.

First, as always, backup your files and create a restore point just in case something goes wrong. Once you’ve done that go through the following:

  1. Create a temporary admin user temp-admin.
  2. Log out from your current user and log back in as the temp-admin user. (Don’t just switch users, actually log-out and then back in.). If you encounter any files in your original user account that are still in use, try restarting the computer.
  3. Create a D:\Users\ folder.
  4. Move every folder except Public and temp-admin from C:\User\ to D:\User\. Make sure you include all the hidden folders too.
  5. Copy the Public folder from C:\User\ to D:\User\.
  6. Open the Registry Editor and go to HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList.
  7. Replace %SystemDrive% to D: in the Default, ProfilesDirectory, and Public keys.
  8. Expand the ProfileList tree-node to show all the profiles, and go through these replacing C: to D: in any ProfileImagePath that points to C:\Users\.... There should be one of these for each user account.
  9. Restart your computer and log in as your normal Admin user.
  10. The Users folder is now in the desired location. You can delete the temp-admin user.

Update: If you encounter the user profile service failed the logon error when you try to log in using an account created after moving the ProfilesDirectory, it is because you didn’t include the Default folder when moving folders from C:\Users\ to D:\Users\. This folder is used as a template for creating profiles for new accounts. Make sure it exists in your new ProfilesDirectory.

Thanks to a blog entry at rob.brooks-bilson.com for this update.

Updating UK Xoom Wifi MZ604 from android 3.0.1 to 3.2

This shows how to upgrade your Xoom Wifi (MZ604) from Android/Honeycomb 3.0.1 to 3.2

As all the UK (as well as other non-US) Motorola Xoom owners are aware, their Xooms are stuck on Android 3.01 whereas the US version is already rolling onto 3.2. The European customers were promised version 3.1 a few weeks ago, but there is no news of anyone actually getting that update yet.

So … if you have a UK Xoom Wifi, here’s how you can get 3.2 installed on it. It’s not completely risk-free, and not entirely simple either, but it’s certainly less frustrating than dealing with Motorola Support when it comes to finding out information on updates.

I guess right now your About tablet screen looks like this …

… and that’s what we’re about to change!

The Process

The process you’ll follow is:

  1. Flash the U.S stock 3.0.1 image
  2. Auto-update to 3.1 (and then to 3.2)
  3. Flash the ClockworkMod Recovery image
  4. Flash the Rooted 3.2 image.

UPDATE: As a couple of comments have pointed out, the 3.2 update is now available OTA via the Auto Update. It is a two stage process, it will first update to 3.1 and reboot, after which, if you check for updates again it will find 3.2. So, follow steps 3 and 4 only if you want a rooted version of 3.2. Cheers commenters for pointing this out.

NOTE: By following these steps you’ll be voiding the warranty on your Xoom, and there is a chance you could brick your device. I’ve only tried it on the UK Wifi Xoom i.e. the MZ604. Also, this will erase all your data from the Xoom, so back things up!

These are quite detailed instructions so the process seems quite long, but it should take less than an hour to complete for most people. If you’ve done firmware updates before, it should really take around 20 minutes to fully root, or less than that to get the stock Android 3.2.
Continue reading “Updating UK Xoom Wifi MZ604 from android 3.0.1 to 3.2”

How to enable 24 bit “truecolour” in Windows 7/Vista XP-Mode

If you haven’t already started the Windows XP Mode virtual machine, do so by going to
Start -> All Programs -> Windows Virtual PC - Windows XP Mode

In Windows XP Mode, start the registry editor, and go to the following location:

  1. In Windows XP Mode, start the registry editor
  2. Go to HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services
  3. Add a DWORD Value named ColorDepth
  4. Give it a value of 4
  5. Restart Window XP Mode

The colour depth should now be set to 24 bit. You can close the VM, and start any XP-Mode programs you have in your Windows 7/Visa menu, and it should also be running in 24 bit mode.

Getting wTorrent working with Apache

wTorrent is a web interface for the rTorrent bit-torrent client. This post shows you how to get it working in ubuntu or another similar debian derivative. This presumes you already have working copies of rTorrent and apache2, and they are running on the same computer.

To get wTorrent running you need the following:

  • xmlrpc-c library
  • xml-rpc php5 module
  • mod_scgi apache2 module

Continue reading “Getting wTorrent working with Apache”

Upgrading the hard drive in the Buffalo Linkstation LS-GL (LS-Pro) NAS

If you have one of the older Buffalo Linkstation Pro NAS drives (pictured below) and it is running out of space, you can simply upgrade the drive. It really isn’t that difficult if you are used to upgrading bits in your computer. Might be a little daunting if you have never opened your computer though. 🙂

Photo of the Buffalo Linkstation LS-500GL-1 NAS

Picture of the back of the Buffalo Linkstation LS-500GL-1 NAS

I just upgraded the drive in my LS-500GL, replacing it with a 2TB Western Digital Caviar Green drive, which didn’t take very long at all (except for copying all the data across). What’s more … it is much quieter than the old 500GB Samsung drive that was in the Linkstation, which is a bonus!

What you need to do is to

  1. Backup the data from the Linkstation,
  2. Remove the drive,
  3. Clone the first two primary partitions from your old drive to your new one,
  4. Create an extended partition, with a swap partition, and a data partition in the new drive,
  5. Place the new drive in the Linkstation.

… and that’s it!

So, lets proceed …
Continue reading “Upgrading the hard drive in the Buffalo Linkstation LS-GL (LS-Pro) NAS”

Pinging Windows/SMB computers using their Netbios name

You can easily set up a linux computer to contact/ping windows computers using their netbios name (computer name set up in windows). This will show you how.

In a small windows network you can contact (i.e. ping etc.) one windows computer from another using their name even if there isn’t a DNS server in the network. However, from a computer running linux, you would need to know the ip address of the computer you want to contact. The “computer name” the windows computers use in this instance are their netbios names which other computers discover using WINS resolution. Linux computers are usually not set up to use this.

The most common solution is to just add just add the PCs to your hosts file. But that would become tiresome if you have more than a couple of computers, and would not work at all if your computers use dynamic IPs.
Continue reading “Pinging Windows/SMB computers using their Netbios name”