Posted by: isaraffee | February 14, 2010

Accessing Windows Files from Ubuntu

Accessing Windows Files from Ubuntu

To see where your Windows partitions are type:

# fdisk -l

Disk /dev/sda: 60.0 GB, 60011642880 bytes

255 heads, 63 sectors/track, 7296 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Disk identifier: 0x0005b174

Device Boot Start End Blocks Id System

/dev/sda1 1 4391 35270676 83 Linux

/dev/sda2 * 4392 6992 20892532+ 7 HPFS/NTFS

/dev/sda3 6993 7296 2441880 5 Extended

/dev/sda5 6993 7296 2441848+ 82 Linux swap / Solaris

From the above output, we see that the NTFS partitions is at /dev/sda2.

Next create a mount point for the Windows partitions. You have to make a directory at /media directory.

root@ismail-laptop:~# cd /media/

root@ismail-laptop:/media# mkdir mywinxp

Now you need to edit the /etc/fstab to add the mount point of the Windows partition. It’s a good practice to make a copy of the file should anything happen to the original file.

root@ismail-laptop:~# cp -p /etc/fstab /etc/fstab.bak

root@ismail-laptop:~# vi /etc/fstab

Add the following line

/dev/sda2 /media/mywinxp ntfs users,rw,owner,umask=000 0 0

Save and quit. Then you need to reload the /etc/fstab to enable the partitions. Type:

#mount -a

If you don’t want to edit the /etc/fstab file, you can also type:

root@ismail-laptop:~# mount /dev/sda2 /media/mywinxp/

This will mount the Windows partitions but it is not permanent. Once you reboot your Linux, the Windows partitions will not be mounted automatically. You will have to manually mount it again.

Type mount to see the partitions that are mounted. In this example, the last line shows that the Windows partitions are mounted at /media/mywinxp.

root@ismail-laptop:~# mount

/dev/sda1 on / type ext3 (rw,relatime,errors=remount-ro)

tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)

proc on /proc type proc (rw,noexec,nosuid,nodev)

sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)

varrun on /var/run type tmpfs (rw,nosuid,mode=0755)

varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)

udev on /dev type tmpfs (rw,mode=0755)

tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)

devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)

fusectl on /sys/fs/fuse/connections type fusectl (rw)

lrm on /lib/modules/2.6.28-13-generic/volatile type tmpfs (rw,mode=755)

securityfs on /sys/kernel/security type securityfs (rw)

binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)

gvfs-fuse-daemon on /root/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev)

/dev/sda2 on /media/mywinxp type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)

Now let’s access the Windows files.

root@ismail-laptop:~# cd /media/mywinxp/

root@ismail-laptop:/media/mywinxp# ll -rt

total 2095457

-rwxrwxrwx 1 root root 47564 2004-08-04 06:38 NTDETECT.COM

-rwxrwxrwx 1 root root 250032 2004-08-04 06:59 ntldr

drwxrwxrwx 1 root root 4096 2009-07-15 02:56 System Volume Information

drwxrwxrwx 1 root root 0 2009-07-15 04:29 temp

drwxrwxrwx 1 root root 0 2009-07-15 05:16 RECYCLER

-rwxrwxrwx 1 root root 210 2009-07-15 05:36 boot.ini

drwxrwxrwx 1 root root 8192 2010-02-01 12:12 Program Files

drwxrwxrwx 1 root root 4096 2010-02-01 17:54 Documents and Settings

-rwxrwxrwx 1 root root 2145386496 2010-02-11 22:31 pagefile.sys

drwxrwxrwx 1 root root 40960 2010-02-11 23:10 WINDOWS

Yes we can list the Windows files. You can also use the file manager, Nautilus to access the files.

An icon on the Destop will also appear

Accessing Windows XP files from Linux

To umount the Windows partition, type:

root@ismail-laptop:/media/mywinxp# cd
root@ismail-laptop:~# umount /media/mywinxp/


Leave a Reply

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

You are commenting using your 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


%d bloggers like this: