Monthly Archives: February 2011

Multiple configurations for Tunnelblick

A while ago I wrote about configuring Tunnelblick OpenVPN client for OS X. Here is how you can have multiple OpenVPN configurations with TunnelBlick:

1. Open ~/Library/Application\ Support/Tunnelblick/Configurations/ with Finder.

2. Rename openvpn.conf to openvpn-location-a.conf.

3. Duplicate openvpn-location-a.conf and rename the duplicate to openvpn-location-b.conf.

4. Open both of these configurations and change values such as server IP, etc.

5. Restart Tunnelblick.

This should be it. Now you should be able to choose between configurations when clicking Tunnelblick’s tray icon.

Finding bad blocks on USB flash drives

After a recent thorough cleaning of my office desk I found a handful of USB sticks. I knew some of them were more or less broken and some should be OK. But which are whic

The solution that first came to mind was to scan USB drives for corrupted sectors / bad blocks. After some Googling around and reading through comments I came up with a process using ‘badblocks’ from ‘ext2fs’ package to scan for bad blocks:

1. Install ext2fsx.
2. Insert USB drive.
3. Backup data from the USB drive because ‘badblocks’ removes all data from the stick.
4. Identify USB drive in console.

$ mount
... snip ...
/dev/disk1 on /Volumes/NO NAME (msdos, local, nodev, nosuid, noowners)

5. Unmount USB drive so we can run ‘badblocks’ on it.

$ sudo umount -f /Volumes/NO\ NAME/

6. Run badblocks to identify and mark bad block

WARNING: badblocks removes all data on drive. Make sure you have a backup and that you don’t mistype the drive’s i

$ badblocks -vw /dev/disk1

7. Use ‘Disk Utility’ to format the drive so you can actually use it.