LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-02-2009, 08:00 PM   #1
manuleka
Member
 
Registered: Feb 2009
Posts: 114

Rep: Reputation: 16
mounting a partition as a folder on home diretory


i've got an unused partition which i'd like to mount as a folder

can someone give me a quick instruction on this?

it is a NTFS partition (empty) and i would like to have it permanently mounted as a diretory on home/user

i know i'd have to also edit fstab but clueless on what to add/edit on the file

thanks for any help
 
Old 06-02-2009, 08:22 PM   #2
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 69
Okay, thats simple enough, you'll need to know the device name for your partition, then it should be something like this:

Code:
/dev/sda3       /home/mountpoint           ntfs    defaults        0       2
To get the device name, you want
Code:
fdisk -l
it should (hopefully) be obvious which is right, though you can try them all if you want

To ensure you can mount ntfs, you want to:
Code:
grep ntfs /proc/filesystems
If nothing is returned, you don't have support. In which case, just install the driver
 
Old 06-02-2009, 08:31 PM   #3
manuleka
Member
 
Registered: Feb 2009
Posts: 114

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by jamescondron View Post
Okay, thats simple enough, you'll need to know the device name for your partition, then it should be something like this:

Code:
/dev/sda3       /home/mountpoint           ntfs    defaults        0       2
this looks like the line for fstab correct?

i understand the first few portions of the line
/dev/sdax
/home/mountpoint
ntfs

which in my case is:
/dev/sda9
/home/manu/Download
ntfs - for filesystem type

but i don't get the 0 and 2 part? and what they apply to... are 0 and 2 standard? or it depends on the configurations of my drive?

fdisk -l reports this:

Code:
 sudo fdisk -l
[sudo] password for manu: 

Disk /dev/sda: 640.1 GB, 640135028736 bytes
255 heads, 63 sectors/track, 77825 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00024aa9

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        5099    40957686    7  HPFS/NTFS
/dev/sda2            5100       77824   584163562+   f  W95 Ext'd (LBA)
/dev/sda5            5100       17847   102398278+   7  HPFS/NTFS
/dev/sda6           17848       17872      200781   83  Linux
/dev/sda7           17873       33680   126977728+  8e  Linux LVM
/dev/sda8           63111       77824   118190173+   7  HPFS/NTFS
/dev/sda9           33681       63110   236396443+   7  HPFS/NTFS

Partition table entries are not in disk order
Quote:
Originally Posted by jamescondron View Post
To ensure you can mount ntfs, you want to:
Code:
grep ntfs /proc/filesystems
what do you mean by this? is it to do with automatically mounting ntfs using fstab? at the moment i can mount it by just clicking on the drive... i have a few other ntfs partitions (obviously from above fdisk -l report)

Last edited by manuleka; 06-02-2009 at 08:37 PM.
 
Old 06-02-2009, 09:20 PM   #4
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 69
Have you even tried to add this to fstab? There are generally instructions in there. From my fstab:

Code:
jc@jcmain:~$ cat /etc/fstab 
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
The man page is pretty good, too.

fdisk -l was merely to suss out which the partition was.

As I thought I'd made clear, that command, should it return nothing, means you have to download the driver for ntfs. If it returns anything, you don't have to do anything.
 
Old 06-03-2009, 12:45 AM   #5
manuleka
Member
 
Registered: Feb 2009
Posts: 114

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by jamescondron View Post
Have you even tried to add this to fstab? There are generally instructions in there. From my fstab:

Code:
jc@jcmain:~$ cat /etc/fstab 
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
The man page is pretty good, too.

fdisk -l was merely to suss out which the partition was.

As I thought I'd made clear, that command, should it return nothing, means you have to download the driver for ntfs. If it returns anything, you don't have to do anything.
grep ntfs /proc/filesystems

returns nothing but i checked and i already have ntfs-3g installed
 
Old 06-03-2009, 12:51 AM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
Since the directory is empty, why not reformat it using a native linux filesystem such as ext3?
 
Old 06-03-2009, 01:15 AM   #7
manuleka
Member
 
Registered: Feb 2009
Posts: 114

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by jschiwal View Post
Since the directory is empty, why not reformat it using a native linux filesystem such as ext3?
because i'm running dual boot... and i want to be able to access alot of the files that will be going into this partition!

sharing with windows, i think it's easiest to keep it at ntfs...

by the way here's my fstab file after adding two lines:

Code:
# /etc/fstab
# Created by anaconda on Sat May 23 14:34:07 2009
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or vol_id(8) for more info
#
/dev/VolGroup00/LogVol00 /                       ext3    defaults        1 1
/dev/VolGroup00/LogVol02 /home                   ext3    defaults        1 2
UUID=b41c7594-4029-45ac-b477-ddea259b6289 /boot                   ext3    defaults        1 2
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
/dev/VolGroup00/LogVol01 swap                   swap   	defaults        0 0
/dev/sda8	/home/manu/Extras		ntfs	defaults	1 2
/dev/sda9	/home/manu/Download		ntfs	defaults	1 2
now i aligned my new line with above lines using tab - does that matter?

Last edited by manuleka; 06-03-2009 at 01:27 AM.
 
Old 06-03-2009, 01:31 AM   #8
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Tabs are fine in fstab
 
Old 06-03-2009, 01:31 AM   #9
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,274

Rep: Reputation: 148Reputation: 148
some kernel versions support only to read (not write) even after having installed ntfs-3g, i faced this experienced on some RHEL versions
 
Old 06-03-2009, 01:43 AM   #10
manuleka
Member
 
Registered: Feb 2009
Posts: 114

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by kirukan View Post
some kernel versions support only to read (not write) even after having installed ntfs-3g, i faced this experienced on some RHEL versions
have no problem with read/write into the partition
 
Old 06-03-2009, 01:45 AM   #11
rikxik
Member
 
Registered: Dec 2007
Posts: 88

Rep: Reputation: 19
Quote:
Originally Posted by manuleka View Post
because i'm running dual boot... and i want to be able to access alot of the files that will be going into this partition!

sharing with windows, i think it's easiest to keep it at ntfs...
Its easiest if the partition is formatted as FAT32 - almost 100% works w/o any need for loading special modules etc. Whats stopping you from formatting this partition as FAT32 - both Linux and Windows can happily read/write? I'm using such partition for my music files - can read/write from both OSs w/o any issues.

Last edited by rikxik; 06-03-2009 at 01:46 AM.
 
Old 06-03-2009, 02:31 AM   #12
manuleka
Member
 
Registered: Feb 2009
Posts: 114

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by rikxik View Post
Its easiest if the partition is formatted as FAT32 - almost 100% works w/o any need for loading special modules etc. Whats stopping you from formatting this partition as FAT32 - both Linux and Windows can happily read/write? I'm using such partition for my music files - can read/write from both OSs w/o any issues.
aah never thought about that... too late already loaded my ntfs partition with 68GB data...

ntfs works fine for me tho - so far
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mixed mounting of automount and fstab in one folder? &different home folder using NIS herofmm Linux - Software 0 04-06-2009 11:00 AM
new home folder on new partition njac Linux - General 2 07-04-2008 09:46 AM
Can't allow partion permissions for a vfat partition, mounted as my home folder DrD Linux - General 19 07-26-2006 12:26 PM
Mounting home folder BruceC Other *NIX 2 09-30-2005 04:12 PM
Mounting folder in vfat partition as read-only m3rc_2003 Linux - Newbie 2 11-30-2003 01:09 AM


All times are GMT -5. The time now is 04:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration