Sunday, November 22, 2009

mount windows partitions on Linux (Debian)

Install the necessary pakages (both are *important*)
#apt-get install libfuse2

#apt-get install ntfs-3g
 to find the drive use:
#fdisk -l | grep NTFS
/dev/sda1               1        5222    41945683+   7  HPFS/NTFS
/dev/sda5            5223        7833    20972826    7  HPFS/NTFS
/dev/sda6            7834       10444    20972826    7  HPFS/NTFS
/dev/sda7           13056       15013    15727603+   7  HPFS/NTFS

then mount the drive using command: (assuming that /home/rajz/disk folder exists. If not create it . mkdir /home/rajz/disk )
#mount -t ntfs-3g /dev/sda1 /home/rajz/disk
To unmount a drive (remember its umount & not unmount )
#umount /dev/sda1
To auto mount a dive at start up u have to edit /etc/fstab add following lines. Assuming that if i want to auto-mount  /dev/sda1 on /home/rajz/disk. You have to be a root user to edit that file. Use your favorite editor. I'm using gedit for now.
#gedit /etc/fstab
make changes like:

/dev/sda1       /home/rajz/disk           ntfs-3g    defaults        0       2

After making changes to file (if u want mount it after unmounted ). use simply. (lengthy command is not needed now as linux knows about sda1 & its filesystem, its mount point or target)
#mount /dev/sda1
Thanks to beginlinux.wordpress.com

No comments:

Post a Comment

Installing Gitlab Server

Let me walk through the steps. sudo apt-get install curl openssh-server ca-certificates curl -sS https://packages.gitlab.com/install/...