Wednesday, July 28, 2010

my search for a password manager

I've finally gotten to a point where I needed a secure password manager.

There are tons of password managers on the web, and my only requirement was that there was some way to make it available on my iPhone.

KeePass: open-source, but lacks quality iPhone apps
Roboform: free iPhone/Android apps, free limited to 10 passwords
Lastpass: very polished, iphone/android apps for premium
SplashID: very polished, desktop and iphone apps are costly
Dropbox text notes: not protectable

For now, my decision is to go with Roboform, as my requirements were only to have a password list available. Should I require automatic web form filling, I may opt for the Paid Roboform.

Also, Lastpass and SplashID looks very polished, professional setups. Should I outgrow Roboform, then these two would be where I may turn to.

Wednesday, July 14, 2010

dd performance: block size matters

I was happily planning on using dd to wipe a drive empty, until this depressing statistic stared at me.

85231 byte/sec

A few (ok, many) furious secs of mental maths leaves me depressed at my having to wait 200+ hours to wipe a 72gb enterprise SCSI-3 drive. This can't be right!

Luckily, a light bulb at the back of my head reminded me that the dd command did have options that allowed specifying the block size: the bs=512 for example.

Anyway, I experimented with various block sizes from the presumably default 512 (bytes) all the way to 64mb, found the optimum value somewhere within the range, and stuck to it. The resultant best speed was approximately 9mb/sec.

Here I'm intentionally trying to leave out the optimum block size I discovered, as it is very likely to be system and disk dependent.

But what is clear, and in hindsight, pretty much common sense, is that too small a value, and the disk wastes too much time seeking to read/write small blocks. Too large a value, and other system inefficiencies come into play, such as buffers/caching/paging.

In short, if you're performing a long operation, it definitely pays to experiment first to find a more optimal value than the default.

monitoring dd performance in FreeBSD

dd is a massively useful command found in various flavours of Linux and UNIX'es.

I was using dd to wipe a hard disk, and whilst the basic command itself was easy to find "dd if=/dev/random of=/dev/xxxx", where xxxx is your disk device, keeping tabs on the progress of what is likely a reasonably long wait was not.

There were quite a few sites/forums that listed using "kill -SIGUSR1 nnnnn", where nnnnn is the process id of the dd you're trying to monitor, but it didn't work on my FreeSBIE liveCD. The command is supposed to make dd return some output, and continue running, but in my case, it simply killed the process.

A little RTFM (yes, by that, I mean "man dd") later, I discovered that the equivalent signal in FreeBSD is -SIGINFO, meaning the equivalent command is "kill -SIGINFO nnnnn".

Wednesday, July 7, 2010

Cloning a VirtualBox hard disk (.vdi)

I was trying to clone a virtual hard disk, and didn't realize that making a backup of a VirtualBox Machine (.vdi) is more complex than just copying the file.


The UUID of the duplicated (clone) vdi file was identical to the original, and VirtualBox will not allow the adding of the duplicate.


In doing that, I found a link hidden deep in the bottom of a forum page that allowed me to modify the UUID without having to redo the entire process.


VBoxManage internalcommands setvdiuuid vid_filename.vdi
(You may have to add the full path for the VBoxManage command if it's not in your path.)


Btw, the proper way to backup your VirtualBox Machine is by using the clonehd subcommand.



VBoxManage clonehd original_file.vdi clone_file.vdi.