Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 02-17-2009, 07:53 AM   #1
LQ Newbie
Registered: Jul 2007
Posts: 3

Rep: Reputation: 0
Do I have to re-mount a windows NTFS partition every time I boot up?

I just loaded Ubuntu 8.1 as a dual-boot system with XP. To get access to my windows files from Linux I mounted a windows NTFS file partition, which worked exactly as described. However, when I restart the computer the directory is there, with a padlock icon next to it, but it is empty. Do I need to re-mount this partition every time I start my computer?

Old 02-17-2009, 08:46 AM   #2
Registered: May 2008
Location: California, USA
Distribution: Ubuntu 8.10
Posts: 247

Rep: Reputation: 49
It sounds like you need to add your Windows partition to your /etc/fstab file, and then it will be automatically mounted on start up. How about doing:
gksudo gedit /etc/fstab
And then add the following lines:
# Mounting Windows partition:
/dev/sda1 /media/Windows	 ntfs defaults,uid=0,gid=46,auto,rw,nouser,umask=007 0 0
So change sda1 to your Windows partition, and also make sure whichever directory you want to mount it to exists. In other words, in the above example the /media/Windows directory needs to exist so you can mount to it. You can create a directory with:
sudo mkdir /media/Windows
Anyway, let me know how that goes.
Old 02-17-2009, 09:40 AM   #3
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 680Reputation: 680Reputation: 680Reputation: 680Reputation: 680Reputation: 680
Instead of `uid=0' use 'uid=<yourusername>'. If your default group is the same, you can use the same for 'gid='.
Old 02-19-2009, 06:47 PM   #4
LQ Newbie
Registered: Jul 2007
Posts: 3

Original Poster
Rep: Reputation: 0
Hi, CJS and jschiwal:

Thanks for the advice. I tried using the code you suggested but the partition would not load on startup. The code I used to mount the partition, on directory "/media/windows" is:

"mount /dev/sda2 /media/windows/ -t ntfs -o nls=utf8,umask=0222"

This code works fine but I have to re-enter it each time I boot up. Are there some variations in the code you suggested that would work like the line above?

Thanks again for your help. So far I much prefer Linux to Windows, and I was hoping to use this partition access to limit the amount of time I would need to boot into XP. It won't be the end of the world if I can't get this to work, but it would be nice if I could.
Old 02-19-2009, 08:19 PM   #5
Senior Member
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
Please read carefully what others have already told you.
You need to edit fstab and add a line like this;
/dev/sda2       /media/windows      ntfs-3g defaults        0       0
Problem solved.
Old 02-20-2009, 09:43 AM   #6
LQ Newbie
Registered: Jul 2007
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks, alan ri. I tried the code you suggested and it worked beautifully.

Just to be clear, I had previously edited my /etc/fstab to add the exact code that CJS recommended, both with and without the new userid and groupid suggested by jschiwal. I don't know what all of the parameters are for in his code but the windows partition was not showing up. I provided the code I had used for the temporary partition mounting only because it worked and there are similar parameters. I'm new to Linux and trying to learn as quickly as I can, but sometimes the code is difficult to follow.

In any event, thanks again for the code you provided. I'm finding the Linux community is much more knowledgeable and helpful than I expected.



dual boot, ntfs, partitions

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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mount windows partition on boot LDJ Ubuntu 3 02-13-2007 12:28 AM
Fedora, Fuse, on boot windows partition mount beep-beep Linux - General 3 01-22-2007 02:13 PM
cannot mount Windows (NTFS) partition SharX Linux - General 14 06-21-2006 03:12 AM
How to mount Windows NTFS partition?? crash_override_me Ubuntu 13 12-10-2005 01:40 PM
Can I mount my windows NTFS partition from Linux? jdruin Fedora 14 04-21-2004 11:49 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:54 AM.

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