Mount Windows NTFS partition in Debian Etch

The situation is that you have a machine with a dual boot of Windows XP or Vista and Debian Etch, and you want to be able to access the Windows XP partition from the Debian partition. What you need to do are:

1) Find where the Windows XP or Vista partition is.

>su

>fdisk -l

You will see a list of partitions in your machine. Usually, the Windows partition will be the very first partition such as /dev/sda1.

2) Create a new directory in Debian that will be mounted to the Windows XP partition. For example, you create a new partition called windows in the /mnt directory. As root,

>cd /mnt

>mkdir windows

3) Mount the Windows XP partition to the /mnt/windows partition. As root,

>mount /dev/sda1 /mnt/windows -t ntfs -r

Now, you should be able to access the Windows XP partition (no write permission).

4) To unmount the Windows XP partition, as root,

>umount /mnt/windows

Note that using this method, you do not have “write” permission. So, you can only read and copy files from the Windows partition.

[Update: April 9, 2008] Now, I’d like to describe what I have done to gain a write access to an NTFS partition whether it is an internal or usb external harddrive.

1) Install ntfs-3g.

According to http://packages.debian.org/etch-backports/amd64/ntfs-3g/download, I first of all, edit /etc/apt/sources.list and add this site, backports.cisbg.com, to the file.

>su

enter root password

>vi /etc/apt/sources.list

Then, I add the following source url to the sources.list.

<code>

deb http://backports.cisbg.com/debian etch-backports main

</code>

Save the file and issue the following command.

>apt-get update

Then, I use Synaptic to install the ntfs-3g.

  • Desktop–>Administration–>Synaptic package manager
  • Enter root password
  • Search package using “ntfs-3g” as a key word
  • You will see three packages, ntfs-3g, libntfs-3g2 and libntfs-3gdev.
  • Select ntfs-3g package or all of them if you want.
  • After clicking “Apply” if you get errors about “cannot install some packages”, you have to change something in the Preferences as follows.
  • Still in the Synaptic Package Manager, click Settings–>Preferences–>Distribution tab.
  • Under the Package Upgrade Behavior, at the “Prefer versions from”, change “stable” to “etch-backports”
  • Click OK and then reload packages
  • If there is nothing wrong, ntfs-3g package and all its dependencies such as FUSE2 should be successfully installed.

2) Mount NTFS partition

Under root, issue the following command.

>fdisk -l

Locate the device name of the NTFS partition. For example, my usb external harddrive is /dev/sdb1, and internal harddrive is /dev/sda2.

To mount the usb exteral harddrive, I use this command

>mkdir /mnt/usb

>mount /dev/sdb1 /mnt/usb -t ntfs-3g -o force

Now, you should be able to both read and write the NTFS partition.

To unmount the partition, issue a command.

>umount /mnt/usb

Advertisements
This entry was posted in Linux. Bookmark the permalink.

7 Responses to Mount Windows NTFS partition in Debian Etch

  1. za says:

    Thanks for the info. I can access my ntfs partition on terminal but I can’t access it on Nautilus. Any idea?

  2. Lost says:

    was a great help, thx

  3. Grimwalker says:

    Thanks. Exactly what I needed!

    BTW, for those who want to install manually (dpkg)…

    Get ntfs-3g packages here:
    http://backports.cisbg.com/pool/main/n/ntfs-3g/

    Fuse2 packages are here:
    http://backports.cisbg.com/pool/main/f/fuse/

  4. Marcos says:

    If you want to mount a windows partition automatically when the system boots, you may edit /etc/fstab and add a line like:

    /dev/sda1 /mnt/xp ntfs-3g user,rw,suid 0 0

    (of course directory /mnt/xp should already exist).

  5. Nirandi says:

    This all worked using the ntfs-3g. but when i log in with my account it say i do not have privileges to mount the volume. What should i do?

  6. Pingback: default etch filesystem support

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s