Author Topic: Fstab mount options  (Read 2948 times)

Offline syborfical

  • Newly Subscribed
  • *
  • Posts: 1
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): 6
Fstab mount options
« on: July 18, 2015, 11:59:39 pm »
Hi wondering how I would get my mounts to show up in neno...

I have changed my FStab so my drivers are all mounted
eg UUID /mount point ext4 auto 0 2
which works fine

only issue I have every time I want to get something off my drive I have to go to /mnt/mount point for each drive...


Is there away so I can have a icon show up as another drive?

Offline AndyInMokum

  • Global Moderator
  • Hero
  • *****
  • Posts: 4889
  • Karma: 1058
  • "Keep on Rockin' in the Free World"
    • View Profile
  • Peppermint version(s): PM 9 & PM 10 (64-bit)
Re: Fstab mount options
« Reply #1 on: July 19, 2015, 12:36:21 am »
Hi syborfical , welcome to the Peppermint Forum 8)!  If your drives are mounting correctly, they should be visible in Nemo.  Check the left hand column in Nemo, under: Devices.  You may have to scroll down a little to make it visible.  If they aren't showing.  Please post the outputs with all your devices attached from:
Code: [Select]
sudo fdisk -lfollowed by
Code: [Select]
sudo blkidThe prefix, sudo is not needed if you have already created blkid for this session.  Finally, the contents of file
Code: [Select]
gedit /etc/fstabIgnore the, Gtk WARNING, it's irrelevant  :). Please encapsulate the outputs with the, # Insert Code function that is located above the,  :-[ embarrassed emoticon in the forum editor  ;).
Backup! Backup! Backup! If you're missing any of these -  you ain't Backed Up!
For my system info please L/click HERE.

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26452
  • Karma: 65531
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Fstab mount options
« Reply #2 on: July 19, 2015, 01:38:17 am »
2 options:-

a) Mount them in /media rather than /mnt .. mounts in /media are automatically added to the left hand column in Nemo on a system wide basis (for all user accounts) .. mounts in /mnt are not, so can be bookmarked on a per user basis.

b) Bookmark the mountpoints in Nemo .. this is what Bookmarks are for (for displaying directories on a per user basis)
« Last Edit: July 19, 2015, 02:02:37 am by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline zebedeeboss

  • Global Moderator
  • Hero
  • *****
  • Posts: 3233
  • Karma: 625
  • Life first... Peppermint a close 2nd :)
    • View Profile
  • Peppermint version(s): P10 / P9 Respin
Re: Fstab mount options
« Reply #3 on: August 07, 2015, 09:35:50 am »
OK - yes its me Mr 20TB+
I want to get to grips with fstab rather than using Disk Manager - as for whatever reason each time I restart the machine - it stalls during boot up and I have to press S a couple of times and then it carries on.
When it does this and I go to file manager not all drives are there.  Opening Disk Manager then throws up errors about this drive or the other not being present and I have to unmount every drive  save settings exit disk manager - restart disk manager and then go back in and put every usb drive back to ntfs-3g and then remount.

All is then good until I reboot.... here we go again with some drives not mounting.

I have an entry for one drive in fstab and it reads thus
Code: [Select]
#Entry for /dev/sdd1 :
UUID=26F0779FF0777441 /media/G ntfs-3g defaults,locale=en_GB.UTF-8 0 0

of course there are loads more. 

Q1  where do I get the UUID from
Q2 can I replicate the entry with the correct UUID and then give it the /media/blah blah
Q3 can I then simple add all drives incrementing /dev/sdd1   sde1 sdf1 sdg1 etc etc until all drives are in the fstab file

Disk Manager is just not cutting it
I though it might help if I showed all disks mounted in Disk Manager
Spoiler (click here to view / hide)
[close]

why do  n  o   p  show like that with no individual UUID?

Thanks in advance
« Last Edit: August 07, 2015, 09:56:17 am by zebedeeboss »
Be Kind Whenever Possible...   It is Always Possible - Dalai Lama

P10r x64 Desktop - AMD Threadripper 2950X - 64Gb RAM - NVIDIA RTX2080Ti 11Gb - 2 x 27" 4k

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26452
  • Karma: 65531
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Fstab mount options
« Reply #4 on: August 07, 2015, 01:48:56 pm »
Q1 -
Code: [Select]
sudo blkid
Q2 -
not sure what you mean ?

Q3 -
Add an entry .. save fstab .. run:
Code: [Select]
sudo mount -ato check for errors.here are no errors, move on to adding the next entry.
if t

that command is to load ALL mounts from fstab, so you can check them as you go
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline zebedeeboss

  • Global Moderator
  • Hero
  • *****
  • Posts: 3233
  • Karma: 625
  • Life first... Peppermint a close 2nd :)
    • View Profile
  • Peppermint version(s): P10 / P9 Respin
Re: Fstab mount options
« Reply #5 on: August 08, 2015, 12:13:55 am »
Hi

What I meant by Q 2 was  to copy and paste the correct entry already there - make it have the correct UUID and then amend the mount point.

But since then I have seen that 3 WD drives have the same UUID?

So I went playing....   found  "Disks" which gives a graphical display of all drives...  in there I can turn off auto mount and individually control each drive and where and how it mounts...   Also removed disk manager so as to avoid conflicts - Touch wood so far no problems... big test will be when I dip into windows and then come back... will let you know.

Apologies for the non technical descriptions - I was never into gobbledespeak

Edit: been to windows and back and all drives now seem fine - no stalling when machine boots and all available and ready once logged in   ;D
« Last Edit: August 08, 2015, 05:50:32 am by zebedeeboss »
Be Kind Whenever Possible...   It is Always Possible - Dalai Lama

P10r x64 Desktop - AMD Threadripper 2950X - 64Gb RAM - NVIDIA RTX2080Ti 11Gb - 2 x 27" 4k

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26452
  • Karma: 65531
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Fstab mount options
« Reply #6 on: August 08, 2015, 07:13:39 am »
Quote from: zebedeeboss
What I meant by Q 2 was  to copy and paste the correct entry already there - make it have the correct UUID and then amend the mount point.

You can safely make as many changes as you want to fstab before applying them .. they won't be applied until you either reboot or run "sudo mount -a"

Quote from: zebedeeboss
But since then I have seen that 3 WD drives have the same UUID?

NO 2 partitions should have the same UUID  :-\
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline zebedeeboss

  • Global Moderator
  • Hero
  • *****
  • Posts: 3233
  • Karma: 625
  • Life first... Peppermint a close 2nd :)
    • View Profile
  • Peppermint version(s): P10 / P9 Respin
Re: Fstab mount options
« Reply #7 on: August 08, 2015, 10:56:48 am »

NO 2 partitions should have the same UUID  :-\

check my spoiler post and it shows they do ?  unless I am reading it wrong
Be Kind Whenever Possible...   It is Always Possible - Dalai Lama

P10r x64 Desktop - AMD Threadripper 2950X - 64Gb RAM - NVIDIA RTX2080Ti 11Gb - 2 x 27" 4k

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26452
  • Karma: 65531
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Fstab mount options
« Reply #8 on: August 08, 2015, 01:24:43 pm »
I can see no 2 the same :-\

Quote
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>

#Entry for /dev/sda2 :
UUID=e336fbbb-c990-453f-9cc6-8957a30e842c   /   ext4   errors=remount-ro   0   1
#Entry for /dev/sdf1 :
UUID=08CE4C46CE4C2E6E   /media/L   ntfs-3g   defaults,locale=en_GB.UTF-8   0   0
#Entry for /dev/sda5 :
UUID=86E671E5E671D5C1   /media/Local_D   ntfs-3g   defaults,locale=en_GB.UTF-8   0   0
#Entry for /dev/sdb1 :
UUID=EE109EC9109E97E3   /media/Local_E   ntfs-3g   defaults,locale=en_GB.UTF-8   0   0
#Entry for /dev/sdc2 :
UUID=E62C18982C1865B9   /media/Local_F   ntfs-3g   defaults,locale=en_GB.UTF-8   0   0
#Entry for /dev/sdd1 :
UUID=26F0779FF0777441   /media/G   ntfs-3g   defaults,locale=en_GB.UTF-8   0   0
#Entry for /dev/sde1 :
UUID=C0563DB0563DA7D4   /media/K   ntfs-3g   defaults,locale=en_GB.UTF-8   0   0
#Entry for /dev/sdl1 :
UUID=18E2ED2DE2ED0FB4   /media/M   ntfs-3g   defaults,locale=en_GB.UTF-8   0   0
#Entry for /dev/sdm1 :
UUID=2AAC34CEAC3495F3   /media/O   ntfs-3g   defaults,locale=en_GB.UTF-8   0   0
/dev/sdn1   /media/J   ntfs-3g   defaults,locale=en_GB.UTF-8   0   0
/dev/sdo1   /media/I   ntfs-3g   defaults,locale=en_GB.UTF-8   0   0
/dev/sdp1   /media/P   ntfs-3g   defaults,locale=en_GB.UTF-8   0   0
#Entry for /dev/sdq1 :
UUID=86845A78845A6B27   /media/H   ntfs-3g   defaults,locale=en_GB.UTF-8   0   0
#Entry for /dev/sda3 :
UUID=fc002694-c0c1-45c7-83a1-aaf00db32109   /home   ext4   defaults   0   2
UUID=2e8b75fd-c45b-4971-8831-b63861395556   none   swap   sw   0   0

sdn1, sdo1, and sdp1 have been mounted via device node assignment rather than UUID .. this is perfectly valid, but these days Linux  errs towards UUID's because  device node assignments can unexpectedly change (say if you add drives and their order gets juggled about in the BIOS).
« Last Edit: August 08, 2015, 01:33:19 pm by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline zebedeeboss

  • Global Moderator
  • Hero
  • *****
  • Posts: 3233
  • Karma: 625
  • Life first... Peppermint a close 2nd :)
    • View Profile
  • Peppermint version(s): P10 / P9 Respin
Re: Fstab mount options
« Reply #9 on: August 17, 2015, 12:57:26 am »
Code: [Select]
/dev/sdd1: LABEL="M" UUID="18E2ED2DE2ED0FB4" TYPE="ntfs"
/dev/sde1: LABEL="K" UUID="C0563DB0563DA7D4" TYPE="ntfs"
/dev/sdh1: LABEL="G" UUID="26F0779FF0777441" TYPE="ntfs"
/dev/sdg1: LABEL="MJRO0813" UUID="78AC-892D" TYPE="vfat"
/dev/sdi1: LABEL="H" UUID="86845A78845A6B27" TYPE="ntfs"
/dev/sdf1: LABEL="L" UUID="08CE4C46CE4C2E6E" TYPE="ntfs"
/dev/sdn1: LABEL="O" UUID="2AAC34CEAC3495F3" TYPE="ntfs"
/dev/sdp1: LABEL="J" UUID="F474B7AA74B76DCC" TYPE="ntfs"
/dev/sdq1: LABEL="P" UUID="F474B7AA74B76DCC" TYPE="ntfs"
/dev/sdo1: LABEL="I" UUID="F474B7AA74B76DCC" TYPE="ntfs"

Sorry PCNetSpec,  havn't been around since your reply - here is the relevant output from blkid

As you can see the last 3 drives which are all WD 2TB USB drives, all the same model of Desktop Ext USB Drive and the all have the same UUID and just so you know it's the same on other Distro's too.

If there is something happening that should not, it's guaranteed to happen to me  ???
Be Kind Whenever Possible...   It is Always Possible - Dalai Lama

P10r x64 Desktop - AMD Threadripper 2950X - 64Gb RAM - NVIDIA RTX2080Ti 11Gb - 2 x 27" 4k

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26452
  • Karma: 65531
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Fstab mount options
« Reply #10 on: August 21, 2015, 02:48:35 pm »
Wow, I've never seen that before .. but apparently it IS possible on identical drives with identical partitioning schemes.

See here:
http://ubuntuforums.org/showthread.php?t=1378527
and
http://linux.die.net/man/8/tune2fs

and try running:
Code: [Select]
sudo tune2fs -U random /dev/sdp1and
Code: [Select]
sudo tune2fs -U random /dev/sdq1to generate random UUID's for those partitions.
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline zebedeeboss

  • Global Moderator
  • Hero
  • *****
  • Posts: 3233
  • Karma: 625
  • Life first... Peppermint a close 2nd :)
    • View Profile
  • Peppermint version(s): P10 / P9 Respin
Re: Fstab mount options
« Reply #11 on: August 22, 2015, 02:53:04 am »
HI
Thanks for looking into this for me

I get
Code: [Select]
zebedee@i5-peppermint6 ~ $ sudo tune2fs -U random /dev/sdp1
tune2fs 1.42.9 (4-Feb-2014)
tune2fs: Bad magic number in super-block while trying to open /dev/sdp1
Couldn't find valid filesystem superblock.

If I shrink one partition by 10mb and the other by 20mb will this change it enough to get a unique UUID no ?   or is it the Physical HDD UUID that is at fault.  its odd as I have two other sets of HDD that are the same make and model but don't suffer from this.  I wonder is it just a WD thing as the other two sets are Seagate drives
Be Kind Whenever Possible...   It is Always Possible - Dalai Lama

P10r x64 Desktop - AMD Threadripper 2950X - 64Gb RAM - NVIDIA RTX2080Ti 11Gb - 2 x 27" 4k

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26452
  • Karma: 65531
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Fstab mount options
« Reply #12 on: August 23, 2015, 08:57:22 am »
After reading this:
http://ubuntuforums.org/showthread.php?t=869801
I've come to the conclusion it's rather risky (involves 'dd')

if these drives are always going to be attached, and you don't mess with drive priority in the BIOS you're probably better off just mounting them those 3 partitions by device node assignment rather than UUID.

or possibly using the windows tool mentioned on page 2 of that topic.

[EDIT]

OK, I just tried the windows tool and it worked perfectly :)
(it only changes the last 8 digits of the UUID, and they must be hex)

In Windows, download this tool from Microsofts own sysinternals:
https://technet.microsoft.com/en-us/sysinternals/bb897436.aspx
unpack the "Volumeid.exe" exacutable to the root of your C:\ drive.

From now on I'm going to assume:-
/dev/sdp1 = P:\
in windows, and
/dev/sdq1 = Q:\
in windows .. otherwise adjust the following commands accordingly

Open cmd.exe "as Administrator", then change directory to the root of yuor C:\ drive with
Code: [Select]
cd C:\then run:
Code: [Select]
Volumeid P: 74B7-6DCAthen
Code: [Select]
Volumeid Q: 74B7-6DCBnow reboot to Peppermint and run:
Code: [Select]
sudo blkidand you should now get

/dev/sdp1: LABEL="J" UUID="F474B7AA74B76DCA" TYPE="ntfs"
/dev/sdq1: LABEL="P" UUID="F474B7AA74B76DCB" TYPE="ntfs"
/dev/sdo1: LABEL="I" UUID="F474B7AA74B76DCC" TYPE="ntfs"

change fstab accordingly
« Last Edit: August 23, 2015, 09:41:20 am by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline zebedeeboss

  • Global Moderator
  • Hero
  • *****
  • Posts: 3233
  • Karma: 625
  • Life first... Peppermint a close 2nd :)
    • View Profile
  • Peppermint version(s): P10 / P9 Respin
Re: Fstab mount options
« Reply #13 on: August 23, 2015, 11:56:05 am »
Hi PCNetSpec

Thank You - worked like a charm..  I just changed Q for J and I now have 3 WD 2Tb Ext HDD with unique UUID's that auto mount no problem.

Thanks again....   Eeeek  maybe Windows does have its uses ??   :P  :P

« Last Edit: August 23, 2015, 12:04:59 pm by zebedeeboss »
Be Kind Whenever Possible...   It is Always Possible - Dalai Lama

P10r x64 Desktop - AMD Threadripper 2950X - 64Gb RAM - NVIDIA RTX2080Ti 11Gb - 2 x 27" 4k

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26452
  • Karma: 65531
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Fstab mount options
« Reply #14 on: August 24, 2015, 03:54:24 am »
You're most welcome :)

Eeeek  maybe Windows does have its uses ??   :P  :P

tune2fs would have worked with Linux file systems, and there *is* a convoluted way to change NTFS UUID's under Linux but anything that involves dd I try not to suggest if there's any alternative (past experience of wiping my whole drive through a single typo  :o ).

In any case, "horse for courses" .. it's a Windows file system, so if Microsoft do a free tool for it and you have Windows available.......
;)
« Last Edit: August 24, 2015, 03:57:05 am by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec