November 6th, 2009
I just discovered sshfs. This allows you to mount a remote filesystem using nothing at the server end other than a standard ssh server.
Once installer, as a non-root user you can just:
mkdir mnt
sshfs username@server.domain.com:/path mnt
Then you can access it, copy files etc (both directions) as if it were a local directory
ls mnt
When finished this disconnects it:
fusermount -u mnt
Found at http://home.prea.net/hacking/X2200/NFS
Tags: Debian, Lenny, Linux
Posted in Uncategorized | 1 Comment »
July 15th, 2009
Xensource’s Debian VM templates have always added a xensource updates repository (under /etc/apt/sources.list.d/xensource.list), but until recently it’s been empty. Now they’ve added some updates (replacement xen kernel and xen guest tools) aptitude displays big red warnings that this repository isn’t trusted:
W: GPG error: http://updates.xensource.com etch Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 841D6D8DFE3F8BB2
W: You may want to run apt-get update to correct these problems
This is because the GPG key Xensource use to sign their packages hasn’t been added to the VM’s apt keyring, and here’s how to fix it:
wget -q http://updates.vmd.citrix.com/XenServer/5.5.0/GPG-KEY -O- | apt-key add -
(From tiri.li).
Tags: Xen
Posted in Work | 1 Comment »
June 1st, 2009
Tags: Laptop, Vista
Posted in Uncategorized | 1 Comment »
April 30th, 2009
Google have finally integrated AdSense and Analytics, so you can see advertising revenue fully integrated into your analytics reports. It’s something people have been asking for for a long time, it’ll be *really* valuable for tracking which pages generate revenue.
Now… what to spend this month’s $1.50 revenue on?!
Posted in Uncategorized | No Comments »
April 2nd, 2009
Yesterday, Lenovo (with no prior warning) turned off the single biggest advantage of the Thinkpad software offering: ThinkVantage System Update. What were you thinking?!
I’ve just reinstalled a fresh copy of Vista on my T61 (luckily on a new larger disk, so I still have the old install). Two days ago, all I’d have to do now was download and run ThinkVantage System Update, which would find and install all the individual bits of software, drivers etc that make the Thinkpad offering so great.
Now to have the full “ThinkVantage experience”, I’d have to trawl through the lenovo support site, download and individually install over 20 separate components. Many of them insist on a reboot, so this would take a very long time.
Lenovo recently asked on their blog which of the ThinkVantage utilities they should concentrate development on moving forward. Lenovo: if you kill ThinkVantage System Update:
- You may as well not bother developing ANY of the other ThinkVantage applications any more
- I may as well buy a Dell at half the price
I don’t have the time to find and install all these individual components now, never mind regularly reading your support website to manually determine if I need to upgrade them.
Because I have work to do, without ThinkVantage System Update I’ll be running a standard install of Vista. Just like I’d be running on any of your competitors laptops.
I’m not the only one to be disappointed by this:
Update (1st June 2009): After listening to the mountains of complaining customers, Lenovo has reinstated system update.
Tags: Laptop, Vista
Posted in Uncategorized | 6 Comments »
March 23rd, 2009
I just applied a hotfix to my XenSource virtual servers, which caused all the virtual machines to be suspended & resumed (while the xen host rebooted). This caused a problem on the VMs I’ve upgraded to Debian Lenny: These messages were repeatedly logged:
clocksource/0: Time went backwards: ret=18f26176a5 delta=-8292949932632971 shadow=18e9e0b4b9 offset=880c4ce
This message wasn’t “harmless” – it caused TCP connections to break, so ssh was practically unusable.
The immediate solution: using the XenCenter console, forcefully reboot the affected VM. That’s “force shutdown”, followed by “start”. I tried the simple “reboot” option, but it wouldn’t shut down (probably because it was confused over the time). VMs are now back up and there’s no sign of time going backwards.
It seems this was triggered by suspending & resuming machines running the Debian Lenny kernel. Other VMs which are still running the 2.6.18 based XenSource kernels survived suspend/resume ok.
The actual cause is documented here, here, here & here. I think I’ll be following that advice and decoupling my VM clocks from the host (using NTP to keep them all in sync the old-fashioned way).
Tags: Debian, Lenny, Virtualisation, Xen
Posted in Uncategorized | 2 Comments »
March 17th, 2009
I just upgraded my Cisco 877 to the latest 12.4(24)T IOS, so I thought I’d have another go at getting WCCP to work. Good news: it works!
Here’s my working configuration on the Cisco 877:
ip cef
ip wccp web-cache
interface Vlan1
ip wccp web-cache redirect in
This tells the router that web traffic coming into the Vlan1 interface is a candidate for caching. With WCCP, web-caches register themselves with the router, then the router forwards requests to them. This means that if the cache disappears, the router will forward web requests directly to the internet.
I’m using Debian, so I added this to /etc/network/interfaces (replace 1.2.3.4 with the router identifier shown on the cisco by “show ip wccp”. In my case this is the external internet-facing IP address):
auto gre1
iface gre1 inet static
address 127.0.0.2
netmask 255.255.255.255
pre-up ip tunnel add gre1 mode gre remote 1.2.3.4 local 10.0.20.1 dev eth1
post-down ip tunnel del gre1
And I added this line to my firewall script. You could add it to rc.local if you don’t have anywhere else to put it:
iptables -t nat -A PREROUTING -i gre1 -d 0/0 -p tcp –dport 80 -j DNAT –to-destination 10.0.20.1:3128
The only thing left now is the squid configuration. I specified the internal address of the cisco 877 here (10.0.20.254):
wccp2_router 10.0.20.254
wccp2_rebuild_wait on
wccp2_forwarding_method 1
wccp2_return_method 1
wccp2_assignment_method 1
wccp2_service standard 0
wccp2_address 10.0.20.1
Useful links:
Tags: Cisco, Debian
Posted in Cisco | 7 Comments »
February 15th, 2009
Debian Lenny has been released, so I’ve started upgrading some of my Xen virtual servers. For Etch, Xensource shipped their own modified PV kernel package (2.6.18 based). With Lenny the same kernel can be used, or the standard Debian xen kernel (2.6.26 based) can be used instead.
Upgrading the userland is identical to a physical server – instructions are contained within the Debian Lenny release notes.
To use the Debian packaged 2.6.26 kernel, several minor changes have to be made as per this form post:
- Install the linux-image-2.6-xen-686 package (which depends on the latest xen kernel)
- Re-order the kernels in /boot/grub/menu.lst so the Debian 2.6.26 kernel is the first (and therefore the default)
- Add “console=hvc0″ to the end of the 2.6.26 kernel line in /boot/grub/menu.lst, so it reads “kernel /boot/vmlinuz-2.6.26-1-xen-686 root=/dev/xvda1 ro console=hvc0“
- edit /etc/inittab, find the line that looks like “1:2345:respawn:/sbin/getty 38400 tty1″ and add another line: “0:2345:respawn:/sbin/getty 38400 hvc0″
Then reboot the system, it should boot the new kernel.
Xensource doesn’t display the grub menu, it just seems to boot straight into the default option (even though I have “timeout 10″ specified in the config). There must be a secret keypress or something to make it show the menu, but I don’t know what it is because the last step just worked for me!
Edit: Theoretically you shouldn’t need to use the -xen kernel variant, as the -686-bigmem kernel also supports running paravirtualised in domU. With Xensource 5.0 this boots fine, but Xensource’s xen-tools refuse to start so XenCenter reports the status as “unknown”. With the -xen kernel xen-tools start fine.
Tags: Debian, Lenny, Virtualisation, Xen
Posted in Uncategorized | 1 Comment »
February 12th, 2009
I just discovered the Complete PC Backup feature of Vista, and I’m very impressed! This is included in the Business, Enterprise and Ultimate editions (not the home editions). It takes full drive image backups which can be restored by booting a standard Vista install DVD.
There’s a simple GUI to kick a backup off (backup and restore center), but unfortunately it’s rather restrictive. It only lets you backup to a directly attached hard disk (e.g. USB) or to DVDs. Fortunately the underlying engine DOES support backing up to a network file share.
To kick off a one-off backup, start an elevated command prompt (Start menu, Accessories, right click “command prompt” and select “Run as Administrator”) and type the following:
wbadmin start backup -allCritical -backupTarget:\\SERVER\SHARE -include:C: -vssFull
replacing \\SERVER\SHARE with the path to your network share location. It’ll ask if you’re sure and then display its backup progress. When it’s finished you should see it’s created a folder called WindowsImageBackup\MachineName on your backup share. If you dig under this folder you can find it stores the entire backup in a .vhd file (virtual hard disk, also used by Microsoft’s virtualisation products).
You can schedule backups to run regularly using the task scheduler to call the command above, and adding “-quiet” to stop it prompting. There’s a full guide to scheduling complete pc backups here.
EDIT: Apparently this is all fixed in Windows 7.
Tags: Microsoft, Vista
Posted in Uncategorized | No Comments »
October 27th, 2008
One of the features of Vista that I really like is it’s “sleep”. Unlike XP, which usually used S1 sleep, Vista puts the system into the much lower power S3 state. On my Core2Quad workstation, this takes the power usage down to 3W (from ~62W running at idle). To put this into perspective, the power usage when the system is fully shut down is ~2W, but wakeup is MUCH quicker than a full boot.
Vista allows you to configure which hardware sources can wake up the system from sleep, so for example you can enable or disable Wake On Lan. It also allows software to schedule a wakeup, and Media Centre is one such beast. Ever since I started playing with Media Centre, the system has randomly woken up from sleep (and not returned to sleep afterwards), which kinda defeats the purpose of sleep!
It’s quite easy to find out the source of the most recent wakeup (powercfg /lastwake), but this lists all software sources as “RTC”. It doesn’t identify *which* process (or scheduled task) was responsible.
I found one solution over at thegreenbutton (thanks to mxcrowe):
If you do this, your computer will not auto-wake for any reason (s/w reason – I suppose WOL etc. will still work). This info was given to me by another poster here on the Green Button:
1. Open a CMD prompt
2. powercfg -setacvalueindex scheme_current sub_sleep bd3b718a-0680-4d9d-8ab2-e1d2b4ac806d 0
3. powercfg -setdcvalueindex scheme_current sub_sleep bd3b718a-0680-4d9d-8ab2-e1d2b4ac806d 0
4. powercfg -setactive scheme_current
This changes and applies a new power scheme that stops the machine from being woken from sleep. In my case, I have a desktop system and probably didn’t need to set the DC option, but I did both anyway.
Tags: Microsoft, Vista
Posted in Software, Work | No Comments »