Wednesday, August 8, 2012

Mounting an exFAT disk in Ubuntu

I recently had trouble mounting an external drive in Ubuntu 11.04.

I take system disc images with dd, from Ubuntu booted with a live CD. One of the steps of the process is to mount the drive where the backup file is to be stored. To do that I need to know the format of the drive.

My problem was that fdisk -l told me that the destination drive was HPFS/NTFS, which was wrong. Connecting the drive to a Windows machine made it clear that it was formatted as exFAT.

Ubuntu does not support the exFAT format in its current distribution (at least not in 11.04), which explains why fdisk gave the wrong information.

If you have trouble connecting an external drive to your Ubuntu install, and fdisk tells you it is NTFS, read on...

If you want Ubuntu to support exFAT, you can install fuse-exfat.

Add the repository to apt-get:
sudo add-apt-repository ppa:relan/exfat
Update apt-get so it is aware of the new repo:
sudo apt-get update
Install fuse-exfat:
sudo apt-get install fuse-exfat
After that, mount your external drive as you normally would:
sudo mkdir /media/mydrive
sudo mount -t exfat /dev/sdc1 /media/mydrive

Besides this (which needs to be done every time if you are running off a live CD as I do), exFAT is very practical since it works on Windows, Mac OS X, and Linux!

No comments:

Post a Comment