LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   fstab problems (https://www.linuxquestions.org/questions/linux-newbie-8/fstab-problems-813164/)

damonx 06-09-2010 11:36 AM

fstab problems
 
I have two external hard drives connected to my computer. One of them is FAT32 and the other NTFS. Right now the box they're connected to is acting as a sort of "file server" for my network. Anyway, I added the two drives to the fstab file, but there's just one problem. Being the noob that I am, I'm not sure what the correct nomenclature is for this, but the "designations" of the drives (e.g. /dev/sdb1/) seem to flip flop at random. On one reboot the FAT32 is /dev/sdb1/ and the NTFS is sdc1 and the next it's visa versa.

My question is, is there any way to make it so that these two drives get the same designation every time the computer reboots?

I could just convert the FAT32 to NTFS, but I haven't gotten around to that yet. The main thing is I have them mounting to particular directories. One that is writable (The FAT32) and the other would be read only.

crts 06-09-2010 11:50 AM

Hi,

you could use the UUID to identify and mount them.
Read
Code:

man UUID
man blkid

Adjust your fstab accordingly.

Hope this helps.

[EDIT]
You might need to be root for blkid to work, at least on my system I cannot use it as normal user.

damonx 06-09-2010 12:31 PM

Well, I think I did this right, but even still it doesn't seem to work. I'm a little curious about the two UUID's, since they seem to be in two completely different formats. Anyway, with these two entries the drives should mount to their respective directories on startup, nay?

Code:

FED2-EA7D      /mnt/exchange  vfat auto,rw,fat=32,umask=000,noexec,quiet 1 1

74EC7C4DEC7C0B9C /mnt/leechme2  ntfs ro,auto 1 1

Also, thank you for the fast response. :)

EDIT: Also, if you're curious about the options on the fat32, I was having some trouble getting the that drive to be writeable as a samba share and I read elsewhere that those options would allow me to change the permissions of the mounted directory. Anyway, just a side note.

crts 06-09-2010 12:50 PM

Quote:

Originally Posted by damonx (Post 3998050)
Well, I think I did this right, but even still it doesn't seem to work. I'm a little curious about the two UUID's, since they seem to be in two completely different formats. Anyway, with these two entries the drives should mount to their respective directories on startup, nay?

Code:

FED2-EA7D      /mnt/exchange  vfat auto,rw,fat=32,umask=000,noexec,quiet 1 1

74EC7C4DEC7C0B9C /mnt/leechme2  ntfs ro,auto 1 1

Also, thank you for the fast response. :)

EDIT: Also, if you're curious about the options on the fat32, I was having some trouble getting the that drive to be writeable as a samba share and I read elsewhere that those options would allow me to change the permissions of the mounted directory. Anyway, just a side note.

OK, assuming that one of your drives is /dev/sda1, what is the output of
Code:

blkid /dev/sda1
Here is some sample output of my drive:
Code:

blkid /dev/sda1
/dev/sda1: UUID="317q543b-14v8-1j9n-ab36-2r67h390g712" TYPE="ext2"

... and the corresponding entry in fstab
Code:

...
UUID=317q543b-14v8-1j9n-ab36-2r67h390g712 /boot ext2  defaults  0  2
...


damonx 06-09-2010 01:04 PM

Success. Was just a case of user error. I forgot to put in the UUID= in front of the UUID, heh. Thanks for the help.


All times are GMT -5. The time now is 07:53 AM.