LinuxQuestions.org
Help answer threads with 0 replies.
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
 
LinkBack Search this Thread
Old 02-23-2013, 08:45 PM   #1
EStyles
LQ Newbie
 
Registered: Jun 2012
Distribution: BackTrack5R3 Gnome/64
Posts: 28

Rep: Reputation: Disabled
Question Is it possible to make a system only mount specific uuid's?


I'm not sure if this is the best section to post this question but I am wondering if it is possible to make my system mount only specific uuid's. For instance if I were to make a list of the uuid's of my devices and store it somewhere on my system could I make it so that my system would only mount the devices with those uuid's and ignore any other devices? Let me know if I need to attempt to explain better.
 
Old 02-23-2013, 08:53 PM   #2
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Lenny/Squeeze/Wheezy/Sid
Posts: 3,975

Rep: Reputation: 476Reputation: 476Reputation: 476Reputation: 476Reputation: 476
Your /etc/fstab would look like this:
Code:
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# /dev/sda3       /               ext3    errors=remount-ro 0       1
UUID=bf8c8574-0f87-4e5f-b6dc-5556717422a8       /               ext3    errors=remount-ro 0       1
# /dev/sda6       /home           ext3    defaults        0       2
UUID=3e3e8e5b-55d5-4ad6-9b83-1d65e1daeeee       /home           ext3    defaults        0       2
# /dev/sda7       /usr            ext3    defaults        0       2
UUID=4489365e-ca85-47eb-879d-c887a9490e16       /usr            ext3    defaults        0       2
# /dev/sda8       /var            ext3    defaults        0       2
UUID=4285d595-b920-4100-a449-30a7b0a5c812       /var            ext3    defaults        0       2
# /dev/sda9       /movies         ext3    defaults        0       2
UUID=64fb12d8-1ace-44d2-be6d-6bb331f2ec82       /movies         ext3    defaults        0       2
# /dev/sda5       none            swap    sw              0       0
UUID=39949c15-6db9-4a7a-afca-912165f30fe4       none            swap    sw              0       0
Note the comment '#' before /dev/sdaN

Obviously your partitions, mount points and UUIDs are different. You obtain the UUIDs with the blkid command.

jlinkels
 
2 members found this post helpful.
Old 02-25-2013, 03:33 PM   #3
EStyles
LQ Newbie
 
Registered: Jun 2012
Distribution: BackTrack5R3 Gnome/64
Posts: 28

Original Poster
Rep: Reputation: Disabled
Thanks for the reply. Seems to be working for me. :-)
 
Old 02-25-2013, 05:34 PM   #4
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 1,353

Rep: Reputation: 205Reputation: 205Reputation: 205
You can add noauto to have them NOT auto mount on boot. Probably safer than having a commented / missing entry in /etc/fstab. Unless you add user or group, only root should have the option to mount them. But root has the option to do that even if they are not in the /etc/fstab.

The blkid plus UUID route is definitely the way to go. My desktop flip flops the dev names on my drives because I have an older machine with a mixture if IDE (pata) and SATA drives. And if you boot with a usb stick plugged in, it gets a different /dev/ name than if you plug it in after booting.
 
  


Reply

Tags
mount, restrict, uuid


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How to mount by-uuid if the device won't show in /dev/disk/by-uuid untill after blkid /dev/sd* ? masmddr Linux - General 4 01-10-2011 07:38 PM
Way to make autofs mount to specific USB flash drive to specific folder? utahnix Linux - Software 2 11-24-2010 05:27 PM
command to display the device-fs-uuid-mount point htamayo Linux - Newbie 2 10-26-2010 02:44 PM
How to make a specific command(s) work for specific users or group only naren_0101bits Linux - General 3 08-28-2005 05:22 PM
How to make a specific command(s) work in a specific shell only naren_0101bits Linux - Newbie 3 08-28-2005 01:24 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration