LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Automount NTFS Partition at Startup (https://www.linuxquestions.org/questions/linux-newbie-8/automount-ntfs-partition-at-startup-730738/)

SMB3 06-04-2009 03:16 PM

Automount NTFS Partition at Startup
 
Hey,

I just install Mandriva Spring Edition 2009 for my brother. He used to run XP, with two partitions. One of them was the C drive with all the windows contents, and the other drive was just used for media.
So I formatted the C drive and installed mandriva on it, and left the media partition alone, as it has over 100gb of stuff.

Anyway, first I had a problem with the drive opening up in mandriva, but the help from rev918 at http://www.linuxquestions.org/questi...rtiton-612726/ I was able to fix it.

But now you have to open up Home and click the drive everytime you turn on the computer, so it mounts or something.

So I'm trying to find out how to make it just mount on startup.

I've been searching, and reading posts. From what I understand I have to edit the fstab file.
So my fstab file is below:

# Entry for /dev/sda1 :
UUID=0e40db07-1d63-46d2-b556-88429a0460d8 / ext3 relatime 1 1
none /proc proc defaults 0 0



So I'm not sure what I'm supposed to add to this file. If someone can please help me out, and tell me what I need to add to make that partition automount at startup, that would be great. :)

Thanks.

nuwen52 06-04-2009 04:10 PM

Assuming that the ntfs partition is /dev/sda2, I think something like:

/dev/sda2 /windows ntfs defaults 0 0

Might work. The obvious other part is to do a "mkdir /windows" first. I'd have a definite answer if I had my laptop with me. I do the same thing on that. But, I don't have my laptop's windows partition mount at startup. This should. Also, /windows should be replaced with whatever mount point you want to use.

mostlyharmless 06-04-2009 05:55 PM

I would recommend setting the mount "ro" or using ntfs-3g.

SMB3 06-04-2009 06:38 PM

Thanks for the replies.

I would assume the partition is at /dev/sda2, but how can I check?

And I should make a folder in the partition called windows?


Quote:

Originally Posted by mostlyharmless (Post 3563428)
I would recommend setting the mount "ro" or using ntfs-3g.

I am quite a newb at this, I have no idea what that means.

samnjugu 06-04-2009 06:42 PM

I used to have the same setup on one of my machines the following should work.
#mkdir /mnt/windows

Edit fstab and add the following
/dev/sda2 /mnt/windows ntfs-3g defaults 0 0

Remember if it's another partition it will be something like sda2 or if it's another drive completely it might be sdb1.

samnjugu 06-04-2009 06:46 PM

to check just do
#mkdir /mnt/windows
#mount -t ntfs-3g /dev/sda2 /mnt/windows

mostlyharmless 06-04-2009 10:08 PM

Quote:

I am quite a newb at this, I have no idea what that means.
Oh, sorry. Well the ntfs access included normally in the kernel, that is in the OS, is not really safe to use to write to an ntfs filesystem. You should therefore mount these as "ro" or read-only, like this
/dev/sda2 /windows ntfs ro 0 0
If you want to write to the filesystem it is recommended that you use ntfs-3g. You can search for it on the web; they have a site www.ntfs-3g.org. You'll have to install it, probably, I don't know if Mandriva includes it or not. There are instructions for that, if needed on the web site. Basically you use it like
/dev/sda2 /windows ntfs-3g defaults 0 0
as pointed out above, but there are other options you might want to consider.

rikxik 06-04-2009 10:48 PM

1. Login as usual (without adding anything to /etc/fstab).
2. Open up Home and click on the drive to mount it (what you have been doing already).
3. Now open a terminal and run command "mount". This will show you all the mounted partitions. Look for the one with "ntfs". Note down the /dev/*** part. This is how you find out if its /dev/sda2 or whatever.
4. Now you can edit fstab as advised by others. If you are not comfortable using command line editors, you can run "gksu gedit /etc/fstab". Make sure you take a safe copy of /etc/fstab before you edit it.

divyashree 06-04-2009 11:43 PM

Quote:

Originally Posted by SMB3 (Post 3563302)
Hey,

I just install Mandriva Spring Edition 2009 for my brother. He used to run XP, with two partitions. One of them was the C drive with all the windows contents, and the other drive was just used for media.
So I formatted the C drive and installed mandriva on it, and left the media partition alone, as it has over 100gb of stuff.

Anyway, first I had a problem with the drive opening up in mandriva, but the help from rev918 at http://www.linuxquestions.org/questi...rtiton-612726/ I was able to fix it.

But now you have to open up Home and click the drive everytime you turn on the computer, so it mounts or something.

So I'm trying to find out how to make it just mount on startup.

I've been searching, and reading posts. From what I understand I have to edit the fstab file.
So my fstab file is below:

# Entry for /dev/sda1 :
UUID=0e40db07-1d63-46d2-b556-88429a0460d8 / ext3 relatime 1 1
none /proc proc defaults 0 0



So I'm not sure what I'm supposed to add to this file. If someone can please help me out, and tell me what I need to add to make that partition automount at startup, that would be great. :)

Thanks.

U just enter this in ur /etc/fstab :
Quote:

/dev/sda2 /mnt/windows ntfs-3g quiet,defaults,locale=en_US.utf8,umask=0 1 2
If u have ntfs-3g for mounting ntfs partition and a mount point as /mnt/windows ,where to be mounted


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