LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 01-06-2011, 06:57 PM   #1
centosfan
Member
 
Registered: Jun 2003
Location: Golem city
Distribution: Server - Debian Desktop - Linux Mint
Posts: 219

Rep: Reputation: 32
Testing fstab without restart?


I need to do some changes to fstab,so i wondering is it possible to test it does it work without restating?Because if add something wrong then linux wont start ssh and i wont be able to access server remotely.What i want to do,is to mount /dev/shm with noexec,nosuid instead none.

Last edited by centosfan; 01-06-2011 at 07:44 PM.
 
Old 01-06-2011, 08:28 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Use umount and mount. No harm done to me.
Code:
$ grep shm /etc/fstab
tmpfs                   /dev/shm                tmpfs   rw,nosuid,nodev         0 0
$ mount | grep shm
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
$ sudo umount /dev/shm
$ mount | grep shm
$ sudo mount /dev/shm
$ mount | grep shm
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
 
0 members found this post helpful.
Old 01-06-2011, 08:53 PM   #3
novice06
Member
 
Registered: Mar 2006
Location: Singapore
Distribution: RHEL, CentOS
Posts: 132

Rep: Reputation: 23
You can try to mount, if there is any typo error or wrong directory, it will give you message at standard out.
mount -a
mount: mount point /boots does not exist
mount: mount point swap does not exist
 
0 members found this post helpful.
Old 01-07-2011, 12:41 PM   #4
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
My advice, don't do a mount -a unless you just have to, that's just bad practice if it's just one mount point you need to deal with. Read the man page to learn what the -a does and why you think it might not be a good idea to run on an existing running system.

If you want to test new mount options, don't even edit fstab until you know they work properly.

Just do something like:

mount -o rw,nosuid,noexec,remount /dev/shm

Test, if all seems good, then proceed with editing your fstab and go from that point on.
 
Old 01-07-2011, 01:24 PM   #5
centosfan
Member
 
Registered: Jun 2003
Location: Golem city
Distribution: Server - Debian Desktop - Linux Mint
Posts: 219

Original Poster
Rep: Reputation: 32
Yes i used command mount -o remount /dev/shm and it worked pretty fine.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Replace 'etch' with 'testing' in /etc/apt/sources.list to track 'testing' branch? Akhran Debian 3 04-09-2007 10:45 AM
fstab problem: mount: can't find dvd in /etc/fstab or /etc/mtab Nikon01 Slackware 5 11-17-2006 06:15 AM
How do I set the regulatory daemon to restart when I restart the network service? zahadumy Linux - Networking 0 11-05-2006 11:24 AM
Setup as getting debian testing files from ftp - will it stay with testing BrianHenderson Debian 2 09-02-2004 06:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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