LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 05-31-2005, 02:47 PM   #1
neosirex
LQ Newbie
 
Registered: May 2005
Posts: 2

Rep: Reputation: 0
How to write startup script to run NTFS


Hi i'm like a bigtime newbie to linux and i'm trying to write a startup script that will both run modprobe to run ntfs and then follow up by mounting the drives. Like i have no idea how to start writing the script but i think they should go into rc3.d and rc5.d right?

As of now the way i mount my ntfs drives is that i startup goto console and goto the etc folder and type "modprobe ntfs" and then that loads the ntfs module
then i have to mount each of the drives.

Any help would be appreciated!
 
Old 05-31-2005, 03:39 PM   #2
Tino27
Member
 
Registered: Aug 2003
Location: Akron, OH
Distribution: Slackware 14.2-stable, Ubuntu 16.04 LTS
Posts: 401

Rep: Reputation: 30
You didn't mention what distrobution you are trying to get this to work on. However, I can generally give you the two steps you need to take.

To get the ntfs module to load at boot time, you need to make sure that the appropriate line in /etc/rc.d/rc.modules is commented in (search for 'ntfs' inside the file). That is for Slackware. For other distros, check out the /etc/init.d directory. There will be a file that is similar to the one in Slackware -- it generally has 'modules' as part of its name.

The second part of the question is to get the partition mounted. For this, simply place an entry into the /etc/fstab file for the partition(s) you want mounted. You can tell the computer to automount the partition at boot-up or on demand. Simply do a 'man fstab' at the CLI to find out more information about how to alter the fstab file.
 
Old 05-31-2005, 04:49 PM   #3
neosirex
LQ Newbie
 
Registered: May 2005
Posts: 2

Original Poster
Rep: Reputation: 0
ok i guess i shoulda told you i'm running fedora 3, as for the rc modules file i can't find it anywhere
i see rc1, rc2, blah blah, rc local and rc.sysinit but no rc file with any type of modules in it.
 
Old 05-31-2005, 06:30 PM   #4
Tino27
Member
 
Registered: Aug 2003
Location: Akron, OH
Distribution: Slackware 14.2-stable, Ubuntu 16.04 LTS
Posts: 401

Rep: Reputation: 30
You can put the command in rc.local as well.

/sbin/modprobe ntfs
 
Old 05-31-2005, 07:25 PM   #5
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
If the kernel was compiled with auto module loading then you do not have to write a script to load NTFS during mounting. The kernel should be able to load the module to mount a partition.

If you want the NTFS partition to be mounted at bootup, just add a line in /etc/fstab. Let's say that the NTFS partiton is on /dev/hdb1 and you want to mount it on /mnt/windows. Also you made a directory called /mnt/windows.

/dev/hdb1 /mnt/windows ntfs ro,users,umask=222 1 2

The mounting command should tell the kernel that it needs the ntfs module. Hopefully, NTFS was compiled either as builtin or as a module.

Slackware also uses /etc/modules.conf (for 2.4.x) or /etc/modprobe.conf (for 2.6.x). Other distributions are the same depending on the setup or scripts that they use.
 
  


Reply



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
'cannot stat' script in /etc/rc.d/, try to run script at startup quintan Linux - Software 1 11-21-2005 02:53 AM
Run Script at Startup?? usaf_sp SUSE / openSUSE 5 11-11-2005 01:43 PM
where to write a startup script bnj Linux - Newbie 6 05-27-2005 08:10 AM
get a script to run on startup kram Debian 3 04-23-2005 02:23 PM
trying to write a startup script psytae Debian 5 09-09-2004 09:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:20 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
Open Source Consulting | Domain Registration