Mozekoze

Mozekoze

Wow, a blog..How original

Mozekoze RSS Feed
 
 
 
 

qemu with openbios-sparc in Ubuntu 10.4 Lucid Lynx

It appears that the openbios-binaries have been removed from the qemu-packages in Ubuntu and you are recommended to install the openbios-sparc package instead.

But, it has no install-candidate because of build-problems, and my own attempt at building from the openbios-sparc source package was not successful
either – it is in the universe repository if you want to try.

My attempts at building the 1.0 stable release from OpenBIOS did not work.
I was able to compile the stable release (it requires GCC Cross-compiling support, I recommend this) but after installing the openbios-binary and trying to run a Sparc image the virtual machine
died after complaining about NVRAM length.

The solution (or what worked for me) was to download Qemu here and compile it myself.
This results in the openbios-binaries being installed

ReadyNAS Duo as a Tor node

First download the “APT utility addon” from here
and install it as a local update on your Duo, do the same for The EnableRootSSH addon found on the
same page

Login as root via ssh.

Add this to your /etc/apt/sources.list:
deb http://archive.debian.org/debian-security sarge/updates main contrib non-free
deb-src http://archive.debian.org/debian-security sarge/updates main contrib non-free

deb http://archive.debian.org/backports.org sarge-backports main contrib non-free
deb-src http://archive.debian.org/backports.org sarge-backports main contrib non-free

apt-get update
apt-get install gcc libc6-dev libssl-dev

wget http://archive.debian.org/backports.org/pool/main/libe/libevent/libevent1_1.1a-0bpo1_sparc.deb
dpkg -i libevent1_1.1a-0bpo1_sparc.deb

wget http://archive.debian.org/backports.org/pool/main/libe/libevent/libevent-dev_1.1a-0bpo1_sparc.deb
dpkg -i libevent-dev_1.1a-0bpo1_sparc.deb

Get the current one here, in my case
I had to run the following
wget http://www.torproject.org/dist/tor-0.2.1.26.tar.gz
tar zxvf tor-0.2.1.26.tar.gz
cd tor-0.2.1.26
./configure –build=sparc-linux
make
src/or/tor

Once it finishes compiling, head on over to http://www.torproject.org/docs/tor-doc-relay.html.en
to learn how to setup tor as a relay.

Configure Wine to use your Linux browser

I found this article on how to configure Wine so it uses your Linux web-browser instead of attempting
to use the default browser in the Windows-environment Wine has setup. The only thing I’d do different
is to also perform the 3rd step for https as well as for http, namely by setting this key:
HKEY_CLASSES_ROOT -> https -> shell -> open -> command

Here is the article.

Using Western Digital WD10EADS-disks with the Netgear ReadyNAS Duo

I bought a ReadyNAS Duo before Christmas, and a 1TB Western Digital disk (WD10EADS) to use with it. I immediately started getting ATA errors and adding another
one (for redundancy) resulted in more of the same. Thanks to tips from mdgm over at the ReadyNAS forums, though, I know what to do:

Install RAIDidator 1.4.7 or newer (here’s a link to the beta)
This will stop ATA errors, due to TLER-errors when using certain WD disks.

Also, run the WDIDLE3-utility on the disk, this will prevent the Load Cycle Count on your disks from increasing and shortening its life. You will need to connect your
drive(s) to a desktop-computer with SATA-support running Windows. Then boot from a DOS-CD (or usb drive) and run WDIDLE3. Here are the steps:
Download WDIDLE3 from here
Download FDOEMCD.builder.zip from here
Add wdidle3.exe to CDROOT folder.
Execute MAKEISO.BAT to create new FDOEM.ISO CD image file.
Burn FDOEM.ISO to a CD and boot from it.
Run the command: WDIDLE3 /S300

I’m not sure if you can perform the last step simultaneously for both disks, but if you can’t just reboot with the second disk and run the WDIDLE3-command again.

This should prevent both ATA errors and LLC from increasing, unless your disks are actually faulty, in which case you should have them replaced.
Here is a link to the thread about this issue in the ReadyNAS forum.

SED 1-liners

This morning I saw a submission on reddit.com linking to this list of sed one-liners: http://sed.sourceforge.net/sed1line.txt
As if that wasn’t enough, in the comments to the submission the user moonhead offered this handy sed command summary
as a png just waiting to be printed out and stuck on a cubicle wall for reference: http://i.imgur.com/nTar2.png

You can see all the comments to the first link posted here: http://www.reddit.com/r/linux/comments/bxb3x/compiled_list_of_sed_oneliners/

hpasmxld: Invalid Device: /dev/ipmi1

I had trouble restarting HP-Health on a server that had recently been upgraded to Centos 5.3, resulting in this error in /var/log/messages:
hpasmxld: Invalid Device: /dev/ipmi1

On this server only /dev/ipmi0 existed, even though a server with the same hardware running Centos 5.2 had both..All suggested solutions implied that this error was a result of having VMWare installed – which wasn’t correct in my case. I was able to start HP-Health successfully by editing /etc/init.d/HP-Health.
Search for “supports_quiesce_intfs” and change the succeeding line (in my case this was line number 250) so the if-clause looks like this:
if supports_quiesce_intfs; then
echo “/dev/ipmi0″
return
fi

Script to auto-ghost & identify at irc.freenode.net with Konversation

If you use Konversation as your IRC-client on the Freenode-network you’ll probably want to identify your username/nick as some channels require this. If you have to reconnect for some reason your old nick will still exist for a while making it impossible to both use the nick and identify.. For this you need the ghost-command, but you would also have to change your nick back to the one you want after doing so.

I just found a neat script that does just this, check it out:

http://konversation.kde.org/wiki/Ghosttrick

Now you will kick out your old nick, change your nick to the one you want and identify automatically when reconnecting. Cool.

Shared Exchange-mailboxes

Setting up shared mailboxes in Exchange can be handy, here are two links that could be useful:

http://knicksmith.blogspot.com/2007/03/exchange-2007-and-shared-mailboxes.html

http://support.microsoft.com/?kbid=972148

The first link show you how to create a shared mailbox (you have to use the Exchange Shell), while the other tries to address the “Sent”-folder problem,

which is that sent emails are stored in the Sent-folder of a user’s main account, not the shared account which the email was sent from. It worked for

me on a machine running Windows 7 but not so much on a Vista machine, if anyone knows of another solution I’d love to hear about it.

Delete old spam from spam-folder in virtual mailbox (Dovecot)

Here’s a little script I wrote to delete old emails in your spam-folder. It assumes that files are located in subfolders of /var/vmail/ called Maildir/.Spam/new and Maildir/.Spam/cur

#!/bin/bash

find /var/vmail -type d | sed ’s/ /\\ /g’ | grep “Maildir/.Spam/” |
while read line
do
find ${line}new/ -mtime +365 2>/dev/null -exec rm {} \;
find ${line}cur/ -mtime +365 2>/dev/null -exec rm {} \;

done

Make sure you understand what it does before you use it. Please notify me if you have improvements or corrections.

Send a fake spam-email to test Spamassassin

I just found this handy little thing called GTUBE – a string you put in an email to make it marked as spam, to test spamassassin (possibly other spam-solutions as well). Here are the details:

http://spamassassin.apache.org/gtube/