Saturday, November 29, 2008

Mounting usb-drives with a NTFS lock on it.

Everybody has come across it, your in a hurry and unplug the usb drive before Windows releases the disk. This is how to solve it when you have a linux (or a bootable linux cd) machine.

First you make a directory on which you will mount the disk. For people new to linux this is just a simple directory to which you will attach the disk.

Open yourself a shell prompt and type the following:
mkdir ~/mydisk

This will make your directory in your home directory.

The type the following:
mount -t ntfs-3g /dev/sdg1 ~/mydisk -o force

This will mount the disk presented at the device /dev/sdg1 and attach it to the folder ~/mydisk. For people new to linux I recommend to do some further reading about devices.

My system answers me with :
$LogFile indicates unclean shutdown (0, 0)
WARNING: Forced mount, reset $LogFile.

And I find the disk mounted under ~/mydisk

No comments: