Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 02-23-2013, 09:45 PM   #1
Registered: Jun 2012
Distribution: Kali 2.0, Arch
Posts: 39

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, 09:53 PM   #2
Senior Member
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 4,706

Rep: Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741
Your /etc/fstab would look like this:
# /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.

2 members found this post helpful.
Old 02-25-2013, 04:33 PM   #3
Registered: Jun 2012
Distribution: Kali 2.0, Arch
Posts: 39

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

Rep: Reputation: 686Reputation: 686Reputation: 686Reputation: 686Reputation: 686Reputation: 686
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.


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

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 08:38 PM
Way to make autofs mount to specific USB flash drive to specific folder? utahnix Linux - Software 2 11-24-2010 06:27 PM
command to display the device-fs-uuid-mount point htamayo Linux - Newbie 2 10-26-2010 03:44 PM
How to make a specific command(s) work for specific users or group only naren_0101bits Linux - General 3 08-28-2005 06:22 PM
How to make a specific command(s) work in a specific shell only naren_0101bits Linux - Newbie 3 08-28-2005 02:24 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:27 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration