Preparing for the next pandemic

One of the more specialized news letters I subscribe to is ProMED digest. It is a news letter that posts at least daily about recent outbreaks of known and unknown deceases in either humans, animals or plants.

Each post contains 3-6 reports, typically from a local source somewhere around the globe, followed by comments by the ProMED staff. A report may cover updates on the avian flu in Indonesia, a rabies case in Siberia or doixin poisoned meat ex Ireland.

I used to read everything, which was great in getting to know more about all kinds of creepy germs. Nowadays I admit I scan the headlines and only read the odd bit that catches my interest (rabies, out-breaks geographically near and new strange viruses from the tropical zone). I carefully archive every issue, as quite a few of these things make head line news. ProMED beats the average daily news paper both in timeliness and professional detail.

The organization has 30 part-time editors, moderators and technical staff. It is very professionally done, and I believe the majority of the subscribers are in the medical field or in some way closely related to it.

–Jesper Högström

  • Share/Bookmark

Cellular biology made fun

I don’t know about you, but to me the internal workings of a cell is fascinating. And way too complex for me to read the books I own on the subject.

To the rescue comes a speech by David Bolinsky in a ted.com presentation. David is a medical illustrator and works with Harvard University to help students understand – and appreciate – more of what really happens on a cellular level.

The animation near the end of the talk is truly amazing!

–Jesper Högström

  • Share/Bookmark

Streaming audio over FM

I assume you’ve heard of Spotify – a completely massive music database for streaming with a lightning fast client; find your fav music in milliseconds.

Anyway, I got myself an account but rather quickly decided my laptop speaker did not make the music selection justice (and really, no matter the selection, the lap top speaker would be a joy killer), so I decided to put one of the old boxes to use and plug it into the stereo.

Said and done, I grabbed an old lappy with a broken screen I previously thought would be my video player, but it lacked the CPU power to do better than 50% frame drop rate. I guess it had an old Fedora 6 installation on it.

I should also mention that while I have ran cables to some places in the house, the corner of the stereo is unwired.

Thus, I spent more time than I really had learning about wireless under linux. Then I formatted the harddisk and installed FC9 on it. It accepted the wlan card without a problem, but I still couldn’t connect to the network. A few hours later I moved myself and the machine to a place where I knew for sure the wlan waves actually reached. Doh. The material in my house eats radio waves like pop corn.

At this point I was ready to install Spotify. On the minus side there is no linux client available. On the plus side it worked like a charm using Wine. Yehaa! For several minutes this worked out well. Using VNC I could easily remote to the “jukebox” to control the spotify client and it poured out the lovely tunes of my choice.

Then it lost the network connection, and I had to restart the Spotify client and then it played on and on for a few more minutes. Not satisfied!

I finally gave up on the project and bought one of those FM transmitters usually used to get the mp3 player to send audio to the car stereo.

Now I have Spotify running on my trustworthy ol’ lappy, the FM transmitter just beside me and music coming from my stereo tuned into FM 98.3MHz. If it hand’t been for the complete radio proof house I live in my neighbours could also enjoy the ride :)

–Jesper Hogstrom

  • Share/Bookmark

Upgrade failed, black screen of grub, MBR busted

There I was, having a pretty good time. To me, that means having spent most of the weekend playing table tennis with my son, and finalizing the movement of all my VMs to the shiny new ESXi server.

To make things perfect, I wanted all the machines to run VMWare tools. On some machines that was as simple as selecting the appropriate menu item.

However, in some other cases it was simply not that simple. I needed to do the whole thing manually. For now, I’ll skip over the details of that and cut to the chase.

I tried to upgrade my kernel so I could recompile some vmware tools drivers when something went terribly wrong.

When I rebooted, all I had was a black screen saying “GRUB _” and it didn’t accept a single key stroke.

Luckily, it wasn’t the most important machine, but still – things didn’t look too good.

After spending some time on google, I found that others had had the same problem, and it seemed to having to do with the MBR (Master Boot Record) being messed up. It made kind of sense, but what then?

A thread I found on an Ubuntu site mentioned something called the Super Grub Disk. I downloaded it from http://www.supergrubdisk.org/ and uploaded it to the ESXi data storage.

Add a CD to the VM and point it to the ISO image.

Next – how to get the VM to change boot sequence?

Shut down the VM, edit settings and check the little box.

Save and reboot.

The interface is somewhat different – but plain menu driven! For me, it worked to simply select the menu options with help, select language, opt for Gnu/Linux and then “Fix boot of Gnu/Linux (GRUB)”. 0.1 seconds later I got an OK message, shut down the machine and switched back the boot order.

It just worked, The machine is back online. Now it’s time to beat the next generation in table tennis one more time before I install the VMWare tools.

A piece of advice: Take snapshots before you upgrade the kernel!

–Jesper Hogstrom

  • Share/Bookmark

Pepparkakshus

För första gången har vi byggt ett pepparkakshus från “lösvirke” – deg, ritning, mallar, gräddning, limning och dekoration!

Klicka på bilderna för en högupplöst bild.

Hela konstruktionen, med kvarn, mjölnare, djur och träd.

Tomtarna vid sin snölykta.

Djuren som hittat en öppen säck med spannmål.

Bild på enbart kvarnen.

Ingången till kvarnen. Lägg märke till de fina fönstren.

Sidan av den vintriga kvarnen. Se hur fint spröjsade fönstren är.

Vi var ett stort team som höll på i nästan tolv timmar. Tack till alla inblandade; Ewa, Ulrika, Lotta och naturligtvis Jens och Joanna (som gjorde fönstren!).

–Jesper Hogstrom

  • Share/Bookmark

Converting vmware disks from IDE to SCSI

In the process of moving from VMWare Server to VMWare ESXi I realized I must change the layout of my disks. ESXi doesn’t like growing disks, nor does it like IDE disks.

I alluded to my initial conversion issues in this post. While I learned more than I asked for, it seems it wasn’t quite necessary to use the lsilogic adapter. Buslogic worked just as fine…

First, credit where credit is due. I gathered all my information from http://hamed.dk/home/53-vm-ide2scsi and http://blog.creonfx.com/linux/howto-convert-vmware-windows-xp-ide-disk-to-lsilogic-scsi.

Having converted a couple of disks, I felt obliged to add the minor details I managed to add to the process.

Not that I’m a sissy, but one never knows. Close the virtual machine and backup!

  1. cd /VMs
  2. $ mkdir backup
  3. $ cp -v virtualmach1/* backup

My disks hadn’t been defragmented in a while – as I didn’t even know that was possible, so lets start doing that:

  1. $ cd /VMs/virtualmach1
  2. $ vmware-vdiskmanager -d Windows\ XP\ Professional-cl1-000001-cl1.vmdk
  3. Using log file /tmp/vmware-root/vdiskmanager.log
  4. Defragment: 100% done.
  5. Defragmentation completed successfully.

When I read the other posts, I was quite worried about not having a “small vmdk-file” that contained the disk description. Fear not! It will magically appear after the next step: Disk conversion. While we’re at it, give the disk a better name. Delete the old disk. We have a backup, remember?

  1. $ vmware-vdiskmanager -r Windows\ XP\ Professional-cl1-000001-cl1.vmdk -t 2 virtualmachine1.vmdk
  2. Using log file /tmp/vmware-root/vdiskmanager.log
  3. Creating monolithic preallocated disk ‘virtualmachine1.vmdk’
  4.   Convert: 100% done.
  5. Virtual disk conversion successful.
  6. $ ls *.vmdk
  7. virtualmachine1-flat.vmdk  virtualmachine1.vmdk Windows XP Professional-cl1-000001-cl1.vmdk
  8. $ rm "Windows XP Professional-cl1-000001-cl1.vmdk"

The virtual physical layout of the disks will change when we convert it to a SCSI disk, but the number of sectors remain the same. Check the number of sectors you have now:

  1. $  cat virtualmachine1.vmdk|grep RW| awk  ’{print $2}’
  2. 25165824

The number 25165824 will be used to create a dummy SCSI disk. YOUR NUMBER WILL NOT BE THE SAME!

  1. $ vmware-vdiskmanager -c -s 25165824 -a buslogic -t 1 scsi.vmdk

If you’re like me and prefer to copy entire lines and avoid remembering numbers between screens, here goes:

  1. $ vmware-vdiskmanager -c -s `cat virtualmachine1.vmdk|grep RW| awk  ’{print $2}’` -a buslogic -t 1 scsi.vmdk

Either way, look at the scsi.vmdk file and copy the lines the look similar to

  1. ddb.geometry.cylinders = "1566"
  2. ddb.geometry.heads = "255"
  3. ddb.geometry.sectors = "63"
  4. ddb.adapterType = "buslogic"

Open virtualmachine1.vmdk and replace the lines that have the same keys.

Now we need to make some changes to the vmx-file. The vmx-files don’t seem to care about the order of values. My file was hard to navigate in, as keys were not collated. To the rescue:

  1. $ cat winxppro.vmx | grep  "\#\!"  > w.vmx
  2. $ cat winxppro.vmx | grep  -v "\#\!" | grep -v "^$" | sort >> w.vmx
  3. $ chmod w.vmx –reference=winxppro.vmx
  4. $ rm winxppro.vmx
  5. $ mv w.vmx winxppro.vmx

Edit the vmx-file and remove/comment out the ide0:0* keys.

  1. #ide0:0.fileName = "Windows XP Professional-cl1-000001-cl1.vmdk"
  2. #ide0:0.present = "TRUE"
  3. #ide0:0.redo = ""

Find the section mentioning scsi, or place it in the correct alphabetical place:

  1. scsi0.present = "TRUE"
  2. scsi0.virtualDev = "buslogic"
  3. scsi0:0.present = "TRUE"
  4. scsi0:0.fileName = "virtualmachine1.vmdk"
  5. scsi0:0.mode = "independent-persistent"

I already had the key ’scsi0.present = “TRUE”‘ present. Having the key twice prevents the machine from starting!

If you changed names on the vmx-file, remove the old machine from the inventory in VMWare server console. Open the new vmx-file. Start it.

Important: If you did rename the files, you will get a question if you want to keep or replace the identifier. Most likely you want to KEEP the identifier. After all it is the same machine.

If everything worked as expected, delete the backup directory. You can also delete scsi.* from your VM directory. If it didn’t work out – restore the directory, start from top of page and read more carefully.

–Jesper Hogstrom

  • Share/Bookmark

Popular Music from Vittula

I just re-read Popular Music from Vittula, by Mikael Niemi (ISBN: 1583226591). I actually read it in Swedish (ISN: 9172638400).

The book is about growing up in a northern Swedish town named Pajjala. “Northern” means very long, dark and cold winters and short summers with nidnight sun…

While the book is absurd in some ways, with an almost dream-like quality that in a way reminded me of “Den Store Blondino“, it is a loving description of a time and age long gone; both the society of the 1960s as well as the formative years are now irrevocably passed.

The protagonist and his best friend meet in the first chapter at age five or six. The take off on a haphazard tour to China, but only get as far as Germany before they are discovered and sent back. Together they learn about friendship, growing up, girls, alcohol and growing up. I did mention growing up twice, and that’s because so much of the book is about just that; observing the world changing while being part of the world. How relations and responsibilities take on new meanings as we get older.

They take part in the Pajala drinking competition, play in a band, fight with other youth gangs in town and all the sort of half-innocent, half-serious things that kids do. Or did. No computer games, no ultra-violence, no gangsta’ suburbs and stuff that might meet the youth of today.

I highly recommend the book, as I believe it portrays something that most people can relate to and it does give some food for thought between the smiles and laughs.

–Jesper Högström

  • Share/Bookmark

Creating floppy boot disks under VMWare

I am in the process of shifting my server from running Fedora Core + VMWare server into VMWare ESXi.

I’ll cover the gory details of that in another post. At this point, all you need to know is that ESXi doesn’t support IDE disks, only SCSI disks. Most of my VMs have IDE disks. Sigh.

After crawling the net for a while I found some extremely useful posts covering what needs to be done:

http://hamed.dk/home/53-vm-ide2scsi and http://blog.creonfx.com/linux/howto-convert-vmware-windows-xp-ide-disk-to-lsilogic-scsi.

One of the first things that must be done is to install the LsiLogic driver. I opted for the WHQL 1.20.18.00.

The problem then is to upgrade the BIOS. I must admit I am not exactly sure if that is a required step, but I did it anyway. Why is it a problem? Well, a set of files need to be placed on a bootable floppy drive. And my lappy doesn’t have a floppy slot.

Luckily there is a way. Open the settings for the machine.

Add a Floppy. Make sure you select to create a blank floppy image.

Specify a filename and do NOT connect at power on.

Start the VM. Once booted, connect the disk.

Open windows explorer, right-click the A: disk and select Format

Make sure to create a startup disk.

Click start and the process is over in a few seconds.

Now you can put the files from the LsiLogic BIOS package on the disk. If you are running VMWare Workstation you can simply drag them from the host machine into the VM. Note that you should NOT copy LSI’s command.com. It simply didn’t work well for me; something about a corrupt image. Just take all the other files.

Shut down the VM, open settings, select the floppy and have it connect on power on.

Start the VM again. It will now boot from the floppy assuming your VM BIOS is set like mine. Press F2 during booting and make sure:

If you made any changes, exit and save changes.

A familiar screen…

Run the install-command and ponder which option suits you. I chose (a).

On the next screen, I chose (t)

Then quit your way out.

To be quite honest I don’t think this worked as well as I hoped. At least when I do it again and again I manage to see something about “base address not found”. Maybe it works only once? Or maybe this step isn’t required.

At any rate, I thought it was a nifty way to solve the problem with creating a boot disk under vmware when I needed one. Or at least thought I did.

–Jesper Högström

  • Share/Bookmark

Thinking about security

I first got wind of this excellent newsletter by Bruce Schneier by a friend a couple of years back, and I’ve subscribed ever since.

Every month a jam-packed collection about security news, cryptography, security-mindedness and the latest research in related fields arrives in my mail box, and it is just full of interesting and intelligent ideas and thoughts.

If you have any interest in what makes us secure, what the latest development in snake-oil products has to offer or why a certain strategy looks good but is merely costly and why another strategy places the burden on the wrong party while a third – while not spectacular or expensive – may be the most effective of them all you should subscribe to Crypto-Gram.

Coming to think of it, I probably have Applied Cryptography in some shelf somewhere since way back when. I should re-read it. Or at least read it :)

–Jesper Högström

  • Share/Bookmark

Installing qmail/supervise under fc9

I’ve spent the evenings of the last few days trying to upgrade a few Fedora Core 8 (fc8) boxes to fc9. I’ll get into the gory details of it all in some other post; at this point, suffice it to say my mailserver, running qmail, caused me big grievances. Reason? The supervise script as specified in /etc/inittab didn’t start.

Looking at the file everything looked fine. The line

SV:123456:respawn:/command/svscanboot

was indeed present, but “qmailctl stat” kindly informed me the services weren’t running.

# qmailctl stat
/service/qmail-send: supervise not running
/service/qmail-send/log: supervise not running
/service/qmail-smtpd: supervise not running
/service/qmail-smtpd/log: supervise not running
/service/qmail-pop3d: supervise not running
/service/qmail-pop3d/log: supervise not running
messages in queue: 0
messages in queue but not yet preprocessed: 0

Finally I found a blog entry that pointed me in the right direction. It also included a pointer to this blog entry.
In short, it seems fc9 uses another boot sequence than fc8 and earlier versions. Note too that the two scripts in the above mentioned links look slightly different.
You probably want to read up on things by investigating

man events
man initctl

This guide also contains some useful information.
After some experimenting I got the script right, and it looks like

# svscan - daemontools
#
# This service starts daemontools from the point the system is
# started until it is shut down again.

start on runlevel 2
start on runlevel 3
start on runlevel 4
start on runlevel 5

stop on shutdown

respawn
exec /command/svscanboot

Put this in /etc/event.d/svscan and reboot – or simply test it by “start svscan”. Verify by invoking initctl list.

# initctl list
control-alt-delete (stop) waiting
logd (stop) waiting
prefdm (stop) waiting
rc0 (stop) waiting
rc1 (stop) waiting
rc2 (stop) waiting
rc3 (stop) waiting
rc4 (stop) waiting
rc5 (stop) waiting
rc6 (stop) waiting
rcS (stop) waiting
rcS-sulogin (stop) waiting
serial (instance)
sulogin (stop) waiting
svscan (start) running, process 1862
tty1 (start) running, process 1749
tty2 (start) running, process 1745
tty3 (start) running, process 1747
tty4 (start) running, process 1738
tty5 (start) running, process 1743
tty6 (start) running, process 1751
vpnc-cleanup (stop) waiting

–Jesper Högström

  • Share/Bookmark