Friday, August 15, 2008

How to reach Windows partition from Linux, and vice-versa

How to Mount a Windows NTFS file system partition in Linux:
  1. fdisk -l to see which partition has the NTFS file system. For example, let's say, it's /dev/hda1
  2. mkdir /mnt/windows create a directory to mount the NTFS filesystem.
  3. mount /dev/hda1 /mnt/windows/ -t ntfs -o nls=utf8,umask=0222
    • -t option: type of the filesystem to be mounted
    • with -o option, you can specify several option seperated by commas.
    • with nls option, you can specify the io character set
    • using umask, set the file permission on the file system (the value is in octal). By default, only root has the access, above option gives permission to other users.
  4. You can access your Windows files using the directory /mnt/windows (which may correspond to C:\, D:\, etc.)
  5. To unmount the Windows NTFS partiton: umount /mnt/windows/

How to Access Files on your Linux Partition From Windows:

I find "explore2fs" very effective and simple if you'd like to access ext partitions. No installation needed.