LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 10-07-2003, 06:36 PM   #1
darkknight_9
Member
 
Registered: Dec 2002
Distribution: Fedora Core 3
Posts: 34

Rep: Reputation: 15
mount --bind olddir newdir --> anyway to do this at startup ?


Anyway I can remount a part of the file system somewhere else during bootup ?

The shell command is:

Quote:
mount --bind <OLD_DIR> <NEW_DIR>
Thanks,
Darkknight
 
Old 10-08-2003, 03:55 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,569

Rep: Reputation: 171Reputation: 171
You can have any command running during startup. You just need to put it somewhere in the startup scripts. I recommend adding your command to /etc/rc.d/rc.local file.
 
Old 10-08-2003, 05:25 PM   #3
darkknight_9
Member
 
Registered: Dec 2002
Distribution: Fedora Core 3
Posts: 34

Original Poster
Rep: Reputation: 15
An entry in the fstab works fine. I don't know what I tried the first time but the following entry works:

Code:
source_dir  dest_dir  none  ro,bind  0 0

Thanks for the reply though. I had no idea how to run arbitrary commands at startup .
 
Old 04-17-2004, 09:20 PM   #4
sruckh
LQ Newbie
 
Registered: Nov 2003
Posts: 14

Rep: Reputation: 0
what about the halt script

If you have added the bind statement to the fstab, then you get errors when shutting down the system (shutdown -i6 -g0 -y).

Is there away to get rid of these errors? I believe the erros are probably from the halt script. I assume that once the real file system is umounted that an error is generated when trying to umount the bind-ed filesystem.

Has anyone else seend this error?
 
Old 04-21-2005, 06:35 PM   #5
darkknight_9
Member
 
Registered: Dec 2002
Distribution: Fedora Core 3
Posts: 34

Original Poster
Rep: Reputation: 15
If I'm not mistaken, the order matters in fstab. Try shifting the entries around a little.
 
  


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
why won't rc.bind start on startup? gsgleason Slackware 1 10-24-2004 01:30 PM
mount --bind, vfat and permissions jobano Linux - General 0 05-24-2004 10:53 AM
persistent mount --bind linuxnube Linux - Software 0 05-12-2004 09:24 PM
How to add BIND DNS server to startup in Red Hat? BxBoy Linux - Networking 4 03-01-2004 01:33 PM
mount --bind on boot tp6400 Linux - Newbie 1 01-25-2004 10:41 PM


All times are GMT -5. The time now is 10:19 AM.

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