inetd.info

Everything in one place: databases, projects, photography, links & references

inetd.info RSS Feed
 
 
 
 

Windows 7 RC1 x64 Build

Windows 7 x64 RC1  is looking good & it’s sorted my SAMBA transfer speeds clocking Doom2 to desktop at up to 100MB/sec. I could get max ~70MB/s only under FTP with XP.

Issues have been small & infrequent

  1. A couple of “freezes” though coming back from monitor power save & one while running the color calibration. Disabling sleep & monitor power off is the current workaround.
  2. BSOD trying to play an HD movie using the builtin codecs. Which was fixed by switching over to FFdshow,
  3. Also had some USB weirdness, where drives plugged into powered hubs would cause my USB keyboard to drop out.

I only had issues with a few bits of software & had to keep on remembering to do “install as admin”

  • Keepass, OK
  • Citrix XenApp plugin, OK
  • Firefox (x86), OK. Note Active profile directory was appdata\roaming not local!
  • Flash player, OK
  • NOD32 x64, OK
  • MS Visio Pro 2007, OK
  • Daemon Tools, No due to missing SPTD driver issue. Replaced with Virtual Clone Drive .
  • Synergy, OK replaced with synergy+, OK
  • MS Office Enteprise 2007, OK
  • VMWare Infrastructure Client, OK
  • Canon i865 drivers, No
  • Media Player Classic HT, OK
  • 7Zip x64, OK
  • SQL Server 2005 Developer Edition x64, OK
  • mRemote, OK
  • Steam, OK
  • Gadwin Print Screen, OK
  • Notepad++, OK
  • Putty Tray, OK
  • Adobe Reader 9.1, OK
  • Active Sync, OK & I had less sync issues under 7 than XP
  • Teamviewer 4, OK
  • Canon RAW CodecNo RAW thumbails in explorer are unsupported, need 3rd party software.
  • CDisplay, OK
  • Skype, OK
  • Adobe PhotoShop CS4 Creative Suite, OK
  • DOSBox, OK
  • Fraps, OK
  • Hamachi, OK
  • Teamspeak 2, OK
  • TomTom Suite,
  • uTorrent, OK
  • WinPcap, OK
  • Songbird,
  • Pidgin, OK
  • Sysinternals, OK
  • VLC, OK
  • Google Earth, OK
  • Men of War, OK
  • Civ IV, OK
  • TF2, OK

Initial UPS Config Under Debian

In the past a few nasty power outages have caused doom2s array to have a heart attack. I finally got round to getting a UPS (Belkin F6C120*-UNV) and ended up using NUT to talk to it over the belkin software. Good notes by Peter Selinger and a great step by step guide by Avery Fay at shadypixel got me through the inital setup as I’ve condensed in my notes below. I still need to finish the job off and protect the array a little more on shutdown.

Install NUT
$ sudo apt-get install nut

Set the config files.
/etc/nut/ups.conf
[belkin]
driver = newhidups
port = auto
desc = “Belkin UPS”

/etc/nut/upsd.conf
ACL all 0.0.0.0/0
ACL localhost 127.0.0.1/32
ACCEPT localhost
REJECT all

/etc/local/upsd.users
[local_mon]
password = *******
allowfrom = localhost
actions = SET
instcmds = ALL
upsmon master

/etc/nut/upsmon.conf
MONITOR belkin@localhost 1 local_mon ******* master
POWERDOWNFLAG /etc/killpower
SHUTDOWNCMD “/sbin/shutdown -h now”
NOTIFYCMD “/usr/local/bin/ups_notify.sh”
NOTIFYFLAG ONBATT EXEC+WALL+SYSLOG
NOTIFYFLAG ONLINE EXEC+SYSLOG
NOTIFYFLAG LOWBATT EXEC+WALL+SYSLOG
NOTIFYFLAG FSD EXEC+WALL+SYSLOG
NOTIFYFLAG COMMOK EXEC+SYSLOG
NOTIFYFLAG COMMBAD EXEC+SYSLOG
NOTIFYFLAG SHUTDOWN EXEC+WALL+SYSLOG
NOTIFYFLAG REPLBATT EXEC+WALL+SYSLOG
NOTIFYFLAG NOCOMM EXEC+SYSLOG

Protect the config files
$ sudo chown root:nut /etc/nut/*
$ sudo chmod 640 /etc/nut/*

Set to autostart
# /etc/default/nut
START_UPSD=yes
START_UPSMON=yes

Start the daemon
$ sudo /etc/init.d/nut start

Check you can get stats with
$ upsc belkin@localhost

Notify command (/usr/local/bin/ups_notify.sh) just mails me anything that comes from upsmon.
#!/bin/bash
echo $* > /tmp/ups_notify.txt
mail ups@inetd.info -s Doom2:UPS\ Alert < /tmp/ups_notify.txt

Adding a little protection to wp-config.php

Wordpress get’s hacked a lot so it pays to spend a little bit of time looking at http://codex.wordpress.org/Hardening_WordPress. One thing I’ve looked for is how wp-config  needs to be protected.

Only allow yourself & apache access to the file by doing
chown root:www-data wp-config.php
chmod 640 wp-config.php

And make sure .htaccess in the site root is covering some basics
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
#
# protect the htaccess file
<files .htaccess>
order allow,deny
deny from all
</files>
#
# limit file uploads to 10mb
LimitRequestBody 10240000
#
# disable the server signature
ServerSignature Off
#
# protect wpconfig.php
<files wp-config.php>
order allow,deny
deny from all
</files>
#
# disable directory browsing
Options All -Indexes

Nvidia Ion HTPC

I’ll hopefully be switching the htpc to something like Nvidia Ion. Aiming for a June release it looks like the big pc is fading fast.

Use VMware infrastructure client with VMware Server 2.0

This solution for the (functional at best) web UI for VMserver 2.0 is just what I wanted. You can use the VMware virtual infrastructure client, it’s even hosted by your 2.0 installation!

Just go to https://<your vmserver name>:8333/client/VMware-viclient.exe and install the windows GUI with some fruit and an embedded console window. No offence to the web UI but having fixed navigation panes etc.. just makes for a terrible interface.

Linux RAID again!

Another (unknown) power outage and another problem for the array. UPS & server lost power around 21:30, come the morning server is powered off. Boot once and hda1 has some a couple of errors but seems OK but then crashes the server with errors. Start again and mdadm freaks out trying to assemble the array spamming the below for ever

mdadm: WARNING /dev/sdb1 and /dev/sdh1 appear to have very similar superblocks.
If they are really different, please --zero the superblock on one
If they are the same or overlap, please remove one from the
DEVICE list in mdadm.conf.

Boot with an ubuntu 8.10 live CD. fsck hda1(now mounted as sdi1) to make sure it’s not going to crash out again…

mkdir /mnt/what
mount /dev/sdi1 /mnt/what
fsck -f /mnt/what

Then use mdadm to zero the superblock on /sdb1.

Reboot, array won’t assemble. ctrl-D to bypass the recovery console and try and fix it. Can’t force the array to assemble so as per here and here.  I was able to get the array synching again.

sudo su - root
$echo “clean” > /sys/block/md0/md/array_state
$mkdir mnt/yikes
$mount -o ro /dev/md0 /mnt/yikes

Backup files… wait for the sync to complete and fsck to prove nothing is wrong.

Now I just need the thing to shutdown gracefully when the UPS says it’s out of juice. With no RS232 I’m looking for USB support for my shitty “legend” UPS which appears to be megatec compliant.

Google Reader Addiction

I’m addicted to google reader. I haven’t even looked for a better RSS reader in case I totally damn myself. Every site I read (besides forums) has an RSS feed, this allows me to see everything at once or just a single site as it’s updated. My current OPML file is here.

Cheap VPS

Servers on the net are cheap. For a little more than shared hosting you can get a VPS or dedicated server. I signed up with linode for $19.95 US a month, which is twice what I’m paying apis for limited shared hosting. Billy signed with core networks for $29.95 a month for a dedicated server! On the other end of the scale you go mega cheap and sign up for nearly free speech which allows pre-pay and can end up costing ~50c a month.

Host             Month($US)  CPU        Disk(GB) RAM(MB)   Bandwidth(GB)
apis (Basic)     9.95        n/a        1.4      n/a       30
linode (360)     19.95       4x?Ghz     12       360       200
core (Starter)   29.95       2×1.6Ghz   80       512       1,000

Core also has a $60 setup fee

Adding SWAP

doom2 has a 4GB swap parition I wanted to make this 8GB just to match RAM. If VMware server 1 was chewing RAM like a madman it might of been the hang RC. Anyway turns out this is mega easy since with kernel 2.6 there’s no diff between a swap file and a swap partition.

So just create a big contiguous file and turn it into a swap file
$ dd if=/dev/zero of=/var/swap.1 bs=1024 count=1024000
$ mkswap /var/swap.1
$ swapon /var/swap.1

Do this a few times and then everything is “good” though… maybe 4 1GB files isn’t the best.
$ swapon -s
Filename Type Size Used Priority
/dev/hda5 partition 4803392 108 -1
/var/swap.1 file 1023992 0 -3
/var/swap.2 file 1023992 0 -4
/var/swap.3 file 1023992 0 -5
/var/swap.4 file 1023992 0 -6

Apply Floppy Disk Based BIOS Updates with GRUB

This was a nice way to not have to schlep a floppy disk around.  I used it here to update my servers BIOS.

Install DOS bootloader syslinux
$ aptitude install syslinux

Grab a free dos clean image and unzip it
$ wget http://www.fdos.org/bootdisks/autogen/FDOEM.144.imz
$ unzip FDOEM.144.imz

Make a place for GRUB to load a DOS kernel and copy the BIOS update files
$ mkdir /boot/dos
$ cp FDOEM.144 /boot/dos
$ mkdir /mount/floppy
$ mount -t msdos -o loop /boot/dos/FDOEM.144 /media/floppy/
$ cp autoexec.bat FLASHSPI.EXE p35cds3r.f11 /media/floppy/
$ umount /media/floppy/

Update GRUB menu, reboot & choose the new option to boot the “floppy disk” with the update
$vi /boot/grub/menu.lst
...
### END DEBIAN AUTOMAGIC KERNELS LIST
title           Gigabyte BIOS Flash
root            (hd0,0)
kernel          /boot/dos/memdisk
initrd          /boot/dos/FDOEM.144
boot