Repairing a TrueCrypt Volume and Unmountable Boot Volumes

truecrypt-logo38pxThe dreaded Unmountable Boot Volume rears its ugly head from time to time. Microsoft says it’s either a bad cable or a corrupt filesystem. For me it has always been the later which I fix by putting the harddrive into another computer and running a chkdsk. Or windows sees it as corrupt and fixes it for me (ie Windows 7). But what if your drive has full disk encryption using Truecrypt? (Don’t know what TrueCrypt is? It is an encryption program that can encrypt full volumes or volumes you create. Awesome indeed)

TrueCrypt is not longer being supported and is now VeraCrypt https://veracrypt.codeplex.com/. The info here should be the same for 7.1a versions of TrueCrypt and VeraCrypt.

 

I have a MacBook Pro so I hooked up the drive using a USB 2.0 to SATA/IDE Cable (which are very handy BTW) and mounted it in Parallels Desktop with Windows XP by selecting the USB ATA Bridge under the Devices->USB menu. I loaded up TrueCrypt in XP and mounted the drive. You have to make sure to mount the drive with “mount partition using system encryption without pre-boot authentication” selected under options. I forgot to do this and got frustrated, but after a quick google I figured that part out. Here is where that is:

truecrypt-mount-without-pre-authentication

Once the volume was mounted under windows TrueCrypt noticed the volume had not been unmounted correctly and asked me if I wanted to ChkDsk the drive. I said yes as this is exactly what I wanted to do! It found a couple problems and ChkDsk stopped. I then ran ChkDsk 2 more times till it ran with no errors.

I now have a bootable TrueCrypt system volume again and best of all my client will be happy she can get access to her files!

Setting up a BJU Harddrive with a Mac using Parallels

appleWe have been homeschooling our oldest for two years now. My wife and I decided on using BJU as the homeschool curriculum which has been great. They have three options for accessing the teaching content: DVD, Harddrive and online. Each progressively getting less expensive. The first year we used the DVDs which were easy to use but they were prone to skipping and we had one that would not even play. When you have multiple lessons on one DVD it can set you back a few days until you can get a new one in. So this past year we decided to save a few dollars and go with the Harddrive option. Only one problem they do not work on a Mac (OSX). Windows only and we only have mac laptops in the house! Well nothing like that ever stopped me. So we made sure to get the unit early in case we had to return it and go to back to the DVDs. I was able to get things working so we could use the BJU Harddrive on a Mac and I wanted to document the process I went through here for others to follow.

  • First you will need a way of running windows on your mac. I used Parallels Desktop but I would imagine you could use VMware Fusion, Virtual Box (free!) or the software built into the mac called Bootcamp. However bootcamp requires you to repartition the harddrive and take dedicated space away from OSX.
  • Next you will need to install a copy of windows. I used Windows 7 64bit but any supported BJU OS will suffice (XP, Vista or 7). Installing is as easy as putting the Windows 7 disc into your computer and selecting the option to install from a disc under Parallels. It does the rest. Easy! (can take a little while to finish depending on your hardware specs)
  • Then you will need to plug in the BJU Harddrive and select that USB ATA Bridge under the Devices->USB menu under Parallels (or equivalent program). You need to tell windows to take over the USB device from the Mac.
  • Now we can install the software as explained in the install instructions (See the getting started guide on the Harddrive page) The drive should show up as E: if you don’t have additional drives plugged into your Mac.
  • That’s it!

You should now have a working BJU grade installed on the desktop all under a virtual windows on your mac. BJU harddrive uses a custom vlc player and portable firefox to access DRM’s files on the harddrive. So if you are used to using vlc player then it will be pretty straight forward.

    NOTES:

  • If you plug in and install the software on a 32bit operating system. Such as 32bit XP you will not be able to run it on a 64bit OS and vise versa. However the BJU technical team was more than happy to help me. After I called them I was instructed to email them a file which they converted and sent back. They walked me through the whole process. Just make sure you plan on installing it on the machine it will be used on first. You can however move from 32bit to 32bit machine and 64bit to 64bit machine without incident.
  • The volume on a MacBook Pro can be low and hard to hear some of the lessons. I used the Boom app to increase the Mac’s volume which has worked out really well. It can get very loud now.

If anyone has any questions on any of the steps please feel free to comment or email me. Thanks.

Drush on 1and1 Shared Hosting php cgi

I’ve had to search for setting this up so many times I figure I should write my own howto on setting up drush on 1and1 hosting packages. Because 1and1 only has php-cgi and not php-cli we will have to force the drush.php file to behave differently.

NOTE: This only works on 1and1 packages with ssh.

Adding pdftk to 1and1 shared hosting

UPDATE 2010-09-03: I updated a couple links to reflect newer downloads. Because 1and1 shared hosting is on an older debian (etch) system I had to tweak the steps for using lenny based packages. ENJOY!

There are some cases where you might need a powerful pdf toolkit to use with php. 1and1 does not come with any built in pdf processors or pdf libraries built into php. Here is the process I used to integrate phptk into my 1and1 shared hosting account.

Requirements: 1and1 shared plan that has ssh support

– Download pdftk deb file for debian lenny:

wget http://ftp.us.debian.org/debian/pool/main/p/pdftk/pdftk_1.41-3_i386.deb

– Extract the pdftk deb file:

ar xv pdftk_1.41-3_i386.deb

– Extract the data.tar.gz file:

tar xvzf data.tar.gz

– Download libgcj deb file for debian lenny:

wget http://ftp.us.debian.org/debian/pool/main/g/gcj-4.2/libgcj8-1_4.2.4-4_i386.deb

– Extract the libgcj deb file:

ar xv libgcj7-0_4.1.1-20_i386.deb

– Extract the data.tar.gz file:

tar xvzf data.tar.gz

– Download libstdc++ deb file for debian lenny (backport file http://packages.debian.org/lenny-backports/i386/libstdc++6/download):

wget http://mirror.linux.org.au/backports.org/pool/main/g/gcc-4.3/libstdc++6_4.3.4-6~bpo50+1_i386.deb

– Extract the libstdc++6 deb file:

ar xv libstdc++6_4.3.4-6~bpo50+1_i386.deb

– Extract the data.tar.gz file:

tar xvzf data.tar.gz

– Create a script to link libgcj and libstdc++6 for pdftk (use nano or vi):

#!/bin/bash

LD_LIBRARY_PATH="usr/lib:$LD_LIBRARY_PATH" usr/bin/pdftk $*

– Chmod the pdftk script so it can run:

chmod 755 pdftk

Now you can run pdftk from your main directory and process files from php or cronjobs.

If you run into any problems try running the pdftk command with some test files. If you have any problems please leave a comment. Thanks!

Adding PECL Uploadprogress to 1&1 shared hosting for Drupal FileField

Drupal 6.x is the platform we use to build great websites. There are modules FileField and ImageField 3.0 that allow the ability to update a progress meter when uploading a file. This requires installing a PECL extension to PHP called uploadprogress. Here is the process I used to get it working on a 1and1.com hosting package. You will need a hosting package with ssh support currently the Business and Developer packages do.

  • Download PECL uploadaccess to your 1&1 account
  • Extract the package
    tar xvzf uploadprogress-1.0.0.tgz
  • Go into the directory
    cd uploadprogress-1.0.0
  • Run phpize5
    phpize5
  • Change php-config to php-config5 in configure script
    sed -i 's/=php-config/=php-config5/g' configure
  • Run Configure
    ./configure
  • Change include directives in Makefile
    sed -i 's#-I/usr/local/include/php#-I/usr/include/php5#g' Makefile
  • Run make and make test
    make
    make test
  • Make new extensions folder for new extension to go in
    mkdir ~/extensions
  • Copy uploadprogress extension to new folder
    cp .libs/uploadprogress.so ~/extensions/
  • Create new php.ini under your main folder (or under a single subfolder for just that application) to add new extension_dir then add this code to the file
    extension_dir=/kunden/homepages/6/d87663654/htdocs/extensions/
    extension=uploadprogress.so

That should be it. You should now be able to see the “Upload progress Enabled (PECL uploadprogress)” on the admin/reports/status page in Drupal.

Links that helped me with the above info:

Suggest topics for me to write about: Skribit

I would love for those who read this blog (all 3 of you lol) to suggest topics for me to blog about. I was alerted to a very kewl service called Skribit that allows people to suggest items. Please post your suggestions there or use the skribit box on the right. Thanks alot!

Online Banking Setup for GnuCash 2.2.6 under Windows XP

gnucash-logo

Since my linux raid decided to futz up (read I screwed it up) I’ve been using my Windows partition out of necessity until I have the time to rebuild my software raid 5 and gentoo. Until then we’ve been using GnuCash under Windows which has worked ok, but it is not as nice as the linux version by far. We use GnuCash for our business and it is critical that we have all the functions working in it. One of the things that I really missed was online banking. I could pull in all the transactions and clear them under GnuCash as well as making reconciling alot easier. The reason that GnuCash could not connect to my online bank was that the version of libofx it was saying it was an older version of Quicken and thus was denied from my bank. I read some more online and …
Continue reading

TextMate is the best editor evaaaaar!

Yeah, so I love TextMate. It is in my opinion one of the greatest text editors. It is easy to use, has great features (see below), makes it easy to program (especially in php) and is all around great. Yeah I know I could expound more, but I’m doing other things so read the features below or check out the site. Definitely worth the money (OSX only).

* Ability to Search and Replace in a Project
* Auto-Indent for Common Actions Like Pasting Text
* Auto-Pairing of Brackets and Other Characters
* Clipboard History
* Column Selections and Column Typing
* Completion of Words from Current Document
* CSS-like Selectors to Pinpoint the Scope of Actions and Settings
* Declarative Language Grammars for Graceful Mixing and Hacking
* Dynamic Outline for Working With Multiple Files
* Expand Trigger Words to Code Blocks With Tab-able Placeholders
* File Tabs when Working With Projects
* Foldable Code Blocks
* Function Pop-up for Quick Overview and Navigation
* Plug-able Through Your Favorite Scripting Language
* Recordable Macros With No Programming Required
* Regular Expression Search and Replace (grep)
* Run Shell Commands from Within a Document
* Support for Darcs, Perforce, SVK, and Subversion
* Support for More Than 50 Languages
* Switch Between Files in Projects With a Minimum of Key Strokes
* Themable Syntax Highlight Colors
* Visual Bookmarks to Jump Between Places in a File
* Works As External Editor for (s)ftp Programs
* Works Together With Xcode and Can Build Xcode Projects

Setting up Azureus and SafePeer in Linux

azureus_splash.png So there are tons of utilities to keep the SafePeer plugin up-to-date in Windows (like BlueTack’s Blocklist Manager), but Linux and the Mac have been left out in the cold. We’ll I found a way to get those 190k+ ips blocked in azureus without having to use Peerguardian or MoBlock (MoBlock is still safer in my mind) in Linux. First we need to download the lists like we would for MoBlock. Here is the script I use:
Continue reading

SuSE SLES 10 Migrating from NIS using MigrationTools

So we were moving a NIS database to LDAP under SUSE SLES 10 using the MigrationTools-47 scripts. It generated the ldif file, but would not import because it was failing on adding groups. This was the error we were getting:

(65) no structural object class provided

All we had to do is change this:

objectClass: posixGroup
objectClass: top

to this:

objectClass: posixGroup
objectClass: namedObject
objectClass: top

for each group in the ldif file. Then we redid slapadd -l file.ldif and everything worked.
Continue reading