Re: How to NOT automatically mount a specific partition of an external device?
Steve
I use a line in /etc/fstab like this for just this purpose:
UUID= /mount/point/you/want ext4 defaults,noexec,noauto 0
2
Rememer to mkdir -p the mount point you want. And it doesn't have to
be /media.
The noexec means nothing can run from the device - not even root. You
may not want that situation
All the best
Keith Bainbridge
keith.bainbridge.3216@gmail.com
0447 667 468
On Wed, 24 Nov 2021 09:57:23 +0100 steve <dlist@bluewin.ch> wrote:
>>Hi,
>>
>>I have an external ssd with two partitions. One is for Windows and the
>>other one is an ext4 partition for data.
>>
>>Every time I plug in this ssd (via usb3), both partitions are mounted
>>automatically.
>>
>>mount command gives:
>>
>>/dev/sdh1 on /media/steve/Samsung_T5 type fuseblk
>>(rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2)
>>/dev/sdh2 on /media/steve/T5Linux type ext4
>>(rw,nosuid,nodev,relatime,stripe=8191,uhelper=udisks2)
>>
>>I don't need /dev/sdh1 under linux (it's mainly my son's game stuff).
>>I also see sometimes errors in /var/log/syslog related to that
>>partition.
>>
>>So is there a way to automatically mount /dev/sdh2 but not /dev/sdh1?
>>
>>Thanks
>>
>>steve
>>
>>
Reply to: