TrueCrypt Autorun Script for USB

You can easily create an Autorun file on a USB pen drive to mount and dismount the encrypted file systems. This is very useful for carry portable TrueCrypt USB drives.

The only downside is that using TrueCrypt on the move means that you need administrator rights to access the disk.

Once you plug in the USB stick, you should see the typical Windows menu pop up. You can also right-click on the drive icon to mount, dismount and run the truecrypt application.

AUTORUN.INF

[autorun]
label=MyData
icon=truecrypt.exe
<code>
action=Mount TrueCrypt Volume
open=truecrypt /v MyData.tc /li /q /a /m rm /e</code>
<code>
shell=mounttc
shell\mounttc=&amp;Mount
shell\mounttc\command=truecrypt /v MyData.tc /li /q /a /m rm /e</code>
<code>
shell=dismounttc
shell\dismounttc=Dismount
shell\dismounttc\command=truecrypt /di /q</code>
<code>
shell=runtc
shell\runtc=Run TrueCrypt
shell\runtc\command=truecrypt</code>

USB Working in Virtual 2.0.4 on Ubuntu Ibex Intrepid 8.10

After upgrading to Ibex, I found that I couldn’t sync my Palm with my Windows XP guest.

After trudging through different websites with contradictory solutions I stumbled on this, which works a charm:

Open the terminal and type
vbox /etc/group

You should end up with something like

vboxusers:x:124:john

Make a note of the group ID (124 in this case). Now run
sudo gedit /etc/init.d/mountkernfs.sh

Find this section

#
# Mount proc filesystem on /proc
#
domount proc "" /proc proc -onodev,noexec,nosuid

Below this, copy the following code:

#
#Mount USB file system
#
domount usbfs "" /proc/bus/usb usbdevfs -onoexec,nosuid,nodev,devgid=XXX,devmode=664

Replace XXX with the group ID from above.

Save and quit. Reboot the system. The next time you run VirtualBox, you should be able to see the USB devices and use them.

Ubuntu 7.04 fails to mount USB drive after kernal upgrade

After the recent Feisty kernel update, I found that I couldn’t access a USB drive without using root privileges in the command prompt.

When plugging a USB flash drive in, I’d get the following error:
Cannot Mount Volume

Cannot mount volume.

You are not privileged to mount the volume ‘drivename’.

The problem is the new way that Ubuntu identifies disk drives on your system, and also some changes in the mounting system. What I had to do was edit the /etc/fstab file to correct the error. So here goes:

  • Insert the USB pen drive into the USB port
  • Click Applications > Accessories > Terminal
  • type dmesg
  • Read the last entry that appears on screen (you should see some errors or warnings), and then type sudo gedit /etc/fstab
  • Here you need to find the connection between your error:
    <code>[ 1025.759465] NTFS-fs warning (device hde1): parse_options(): Option utf8 is no longer supported, using option nls=utf8. Please use option nls=utf8 in the future and make sure utf8 is compiled either as a module or into the kernel.
    [ 1026.098973] NTFS volume version 3.1.
    </code>

    and the fstab:

    <code>proc /proc proc defaults 0 0</code><code>
    # Entry for /dev/sdb1 :</code>
    <code>
    UUID=2966f4fe-7f28-4017-b986-1ca801944b4f / ext3 defaults,errors=remount-ro 0 1</code>
    <code>
    # Entry for /dev/sdb5 :</code>
    <code>
    UUID=68989c2d-87a1-4a4f-b5d7-210790b336c4 none swap sw 0 0</code>
    <code>
    /dev/hdd /media/cdrom0 udf,iso9660 user,noauto 0 0</code>
    <code>
    /dev/ /media/floppy0 auto rw,user,noauto 0 0</code>
    <code>
    none /proc/bus/usb usbfs devgid=100,devmode=666 0 0</code>
    <code>
    /dev/sda1 /media/VistaHDD ntfs umask=222,utf8 0 0</code>
  • For me, the connection is the ntfs-fs error and the list listed drive. The error says that I can’t use UTF8, so it’s stopping before it mounts the USB drive.
  • If you think that you’ve found the connection, comment out the line with a hash:
    <code>#/dev/sda1 /media/VistaHDD ntfs umask=222,utf8 0 0</code>
  • Save the file, then try and put the USB drive back in the computer again
  • If it works, great. If not, run dmesg again, and check the error is the same – then comment out the appropriate entry again.

This is mainly to do with recent kernal upgrades, which are changing a number of features. I’m sure it’s good in the long run!