[RISOLTO] Disabilitare automount HD-Partizioni al boot

Forum italiano degli utenti MX
Message
Author
User avatar
penguin
Posts: 260
Joined: Wed Jan 04, 2017 3:15 pm

Re: Disabilitare automount HD-Partizioni al boot

#21 Post by penguin »

No lo so che cose ha i instalato tu balarm

vedi il mio gnome-disk
You do not have the required permissions to view the files attached to this post.

User avatar
fehlix
Developer
Posts: 10310
Joined: Wed Apr 11, 2018 5:09 pm

Re: Disabilitare automount HD-Partizioni al boot

#22 Post by fehlix »

penguin wrote: Sat Nov 03, 2018 1:53 pm No lo so che cose ha i instalato tu balarm
vedi il mio gnome-disk
(let me answer in English):
What I undestand so far the OP has tried:
- Gnome disk utility, but had some issues with mounting requiring password
- Disk manager not showing "internal drives" at all
- disabling Thunar automount, with no result

What I suggest now is to fix the issue
- either within the BIOS or the motherbord (if that's an eSATA related issue)
or (recommended)
- add a udev-rule to have udisk see the internal drives as non-removable

The suggested solution, would make
- Disk manager behave normal as it should be
- Thunar automounter would not mount internal drives
and last but not least the OP would have "normal" system.

The Gnome-disk-utility would provide one solution, but would not make the whole drive as internal, e.g. if the user create another partition, this would suddenly become another removable drive.

The udev-rule solution would transform the "removable" internal drive into an normal internal drive seen by all system elements as non-removable and perhaps provide the OP a normal behaving system.
:puppy:
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

balarm
Posts: 147
Joined: Thu Dec 07, 2017 3:15 pm

Re: Disabilitare automount HD-Partizioni al boot

#23 Post by balarm »

As i said before the desktop pc is in other location, not in my flat now. I used gnome-disk, it works fine, and as fehlix said the internal drive was mounted in /mnt and it asked me the passwd of root. This is what I ask to the desktop PC, the root passwd to mount the internal drive and windows partition, in normal condition then without the use of gnome-disk. I also took a look at /etc/udevil (file.conf) to understand something but my knowledge is not enough about this field.
So I think that fehlix's suggestion as got the goal, the solution.
@penguin, @fehlix :Have a nice Sunday.
Thanks for your patience.
mx Kernel: 4.19.0-6-amd64 x86_64 bits: 64 Desktop: Xfce 4.14.2
Distro: MX-19.3x64 patito feo October 21 2019
Machine: Type: Laptop System: LENOVO product: 1951A47 v: ThinkPad T60

User avatar
fehlix
Developer
Posts: 10310
Joined: Wed Apr 11, 2018 5:09 pm

Re: Disabilitare automount HD-Partizioni al boot

#24 Post by fehlix »

To prepare a udev-rule to change removable state behaviour of internal drives,
please do post the text output of this command chain within a terminal as a normal user

Code: Select all

set -x; lsblk -f; lsblk -l -o 'NAME,LABEL,MODEL,VENDOR,RM,HOTPLUG' /dev/sd?; udevadm info /dev/sda; udevadm info /dev/sdb; set +x
Do copy and paste the above line.
Note to paste within terminal: press Ctrl + Shift + V
Thanks
:puppy:
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

balarm
Posts: 147
Joined: Thu Dec 07, 2017 3:15 pm

Re: Disabilitare automount HD-Partizioni al boot

#25 Post by balarm »

I' ll post the output of the command tomorrow evening.
Do I have to insert any USB for the udev-rule too or isn't it necessary???
I took some screenshots of gnome-disk ( for penguin) and removable drives setted as you suggested in post #14 but probably aren't necessary.
Let me know.
Thanks in advance for your work.
mx Kernel: 4.19.0-6-amd64 x86_64 bits: 64 Desktop: Xfce 4.14.2
Distro: MX-19.3x64 patito feo October 21 2019
Machine: Type: Laptop System: LENOVO product: 1951A47 v: ThinkPad T60

User avatar
fehlix
Developer
Posts: 10310
Joined: Wed Apr 11, 2018 5:09 pm

Re: Disabilitare automount HD-Partizioni al boot

#26 Post by fehlix »

balarm wrote: Mon Nov 05, 2018 3:25 pm I' ll post the output of the command tomorrow evening.
Do I have to insert any USB for the udev-rule too or isn't it necessary???
No, we don't needed any USB device. The udev-rule, we are going to build, will only "fix" both of those internal devices /dev/sda and /dev/sdb,
so that udisks will handle them properly as internal and will not pass them further to get handled as removable devices.
:puppy:
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

balarm
Posts: 147
Joined: Thu Dec 07, 2017 3:15 pm

Re: Disabilitare automount HD-Partizioni al boot

#27 Post by balarm »

Here's the output of the desktop pc

Code: Select all

set -x; lsblk -f; lsblk -l -o 'NAME,LABEL,MODEL,VENDOR,RM,HOTPLUG' /dev/sd?; udevadm info /dev/sda; udevadm info /dev/sdb; set +x

mx17@mx:~
$ set -x; lsblk -f; lsblk -l -o 'NAME,LABEL,MODEL,VENDOR,RM,HOTPLUG' /dev/sd?; udevadm info /dev/sda; udevadm info /dev/sdb; set +x
+ lsblk -f
NAME   FSTYPE LABEL                    UUID                                 MOUNTPOINT
sda                                                                         
├─sda1 ntfs   Riservato per il sistema 2CF49002F48FCC90                     /media/mx17/Riservato pe
├─sda2 ntfs                            F248A33E48A30089                     /media/mx17/F248A33E48A3
└─sda3 ext4   rootMX17.1               21fa092a-80cb-40aa-8c5f-c91f280d58a9 /
sdb                                                                         
└─sdb1 ntfs   DATIN                    47BC4E88177B6DEE                     /media/mx17/DATIN
sdg                                                                         
└─sdg1 ntfs   W7ProAgo64wpi            1E3E165D3E162E71                     /media/mx17/W7ProAgo64wp
sr0                                                                         
sr1                                                                         
+ lsblk -l -o NAME,LABEL,MODEL,VENDOR,RM,HOTPLUG /dev/sda /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf /dev/sdg
NAME LABEL                    MODEL            VENDOR   RM HOTPLUG
sda                           ST3160815AS      ATA       1       1
sda1 Riservato per il sistema                            1       0
sda2                                                     1       0
sda3 rootMX17.1                                          1       0
sdb                           Hitachi HDT72103 ATA       1       1
sdb1 DATIN                                               1       0
sdg                           DataTraveler 3.0 Kingston  1       1
sdg1 W7ProAgo64wpi                                       1       1
+ udevadm info /dev/sda
P: /devices/pci0000:00/0000:00:05.0/ata1/host0/target0:0:0/0:0:0:0/block/sda
N: sda
S: disk/by-id/ata-ST3160815AS_9RX9HBV1
S: disk/by-path/pci-0000:00:05.0-ata-1
E: DEVLINKS=/dev/disk/by-path/pci-0000:00:05.0-ata-1 /dev/disk/by-id/ata-ST3160815AS_9RX9HBV1
E: DEVNAME=/dev/sda
E: DEVPATH=/devices/pci0000:00/0000:00:05.0/ata1/host0/target0:0:0/0:0:0:0/block/sda
E: DEVTYPE=disk
E: ID_ATA=1
E: ID_ATA_DOWNLOAD_MICROCODE=1
E: ID_ATA_FEATURE_SET_AAM=1
E: ID_ATA_FEATURE_SET_AAM_CURRENT_VALUE=0
E: ID_ATA_FEATURE_SET_AAM_ENABLED=0
E: ID_ATA_FEATURE_SET_AAM_VENDOR_RECOMMENDED_VALUE=208
E: ID_ATA_FEATURE_SET_HPA=1
E: ID_ATA_FEATURE_SET_HPA_ENABLED=1
E: ID_ATA_FEATURE_SET_PM=1
E: ID_ATA_FEATURE_SET_PM_ENABLED=1
E: ID_ATA_FEATURE_SET_SECURITY=1
E: ID_ATA_FEATURE_SET_SECURITY_ENABLED=0
E: ID_ATA_FEATURE_SET_SECURITY_ERASE_UNIT_MIN=0
E: ID_ATA_FEATURE_SET_SECURITY_FROZEN=1
E: ID_ATA_FEATURE_SET_SMART=1
E: ID_ATA_FEATURE_SET_SMART_ENABLED=1
E: ID_ATA_SATA=1
E: ID_ATA_SATA_SIGNAL_RATE_GEN1=1
E: ID_ATA_SATA_SIGNAL_RATE_GEN2=1
E: ID_ATA_WRITE_CACHE=1
E: ID_ATA_WRITE_CACHE_ENABLED=1
E: ID_BUS=ata
E: ID_MODEL=ST3160815AS
E: ID_MODEL_ENC=ST3160815AS\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
E: ID_PART_TABLE_TYPE=dos
E: ID_PART_TABLE_UUID=90909090
E: ID_PATH=pci-0000:00:05.0-ata-1
E: ID_PATH_TAG=pci-0000_00_05_0-ata-1
E: ID_REVISION=4.ADA
E: ID_SERIAL=ST3160815AS_9RX9HBV1
E: ID_SERIAL_SHORT=9RX9HBV1
E: ID_TYPE=disk
E: MAJOR=8
E: MINOR=0
E: SUBSYSTEM=block
E: TAGS=:systemd:
E: USEC_INITIALIZED=8722625

+ udevadm info /dev/sdb
P: /devices/pci0000:00/0000:00:05.0/ata2/host1/target1:0:0/1:0:0:0/block/sdb
N: sdb
S: disk/by-id/ata-Hitachi_HDT721032SLA360_STF202ML2YM4NP
S: disk/by-id/wwn-0x5000cca346e9a5a8
S: disk/by-path/pci-0000:00:05.0-ata-2
E: DEVLINKS=/dev/disk/by-id/ata-Hitachi_HDT721032SLA360_STF202ML2YM4NP /dev/disk/by-id/wwn-0x5000cca346e9a5a8 /dev/disk/by-path/pci-0000:00:05.0-ata-2
E: DEVNAME=/dev/sdb
E: DEVPATH=/devices/pci0000:00/0000:00:05.0/ata2/host1/target1:0:0/1:0:0:0/block/sdb
E: DEVTYPE=disk
E: ID_ATA=1
E: ID_ATA_DOWNLOAD_MICROCODE=1
E: ID_ATA_FEATURE_SET_AAM=1
E: ID_ATA_FEATURE_SET_AAM_CURRENT_VALUE=254
E: ID_ATA_FEATURE_SET_AAM_ENABLED=0
E: ID_ATA_FEATURE_SET_AAM_VENDOR_RECOMMENDED_VALUE=128
E: ID_ATA_FEATURE_SET_APM=1
E: ID_ATA_FEATURE_SET_APM_ENABLED=0
E: ID_ATA_FEATURE_SET_HPA=1
E: ID_ATA_FEATURE_SET_HPA_ENABLED=1
E: ID_ATA_FEATURE_SET_PM=1
E: ID_ATA_FEATURE_SET_PM_ENABLED=1
E: ID_ATA_FEATURE_SET_PUIS=1
E: ID_ATA_FEATURE_SET_PUIS_ENABLED=0
E: ID_ATA_FEATURE_SET_SECURITY=1
E: ID_ATA_FEATURE_SET_SECURITY_ENABLED=0
E: ID_ATA_FEATURE_SET_SECURITY_ERASE_UNIT_MIN=108
E: ID_ATA_FEATURE_SET_SECURITY_FROZEN=1
E: ID_ATA_FEATURE_SET_SMART=1
E: ID_ATA_FEATURE_SET_SMART_ENABLED=1
E: ID_ATA_ROTATION_RATE_RPM=7200
E: ID_ATA_SATA=1
E: ID_ATA_SATA_SIGNAL_RATE_GEN1=1
E: ID_ATA_SATA_SIGNAL_RATE_GEN2=1
E: ID_ATA_WRITE_CACHE=1
E: ID_ATA_WRITE_CACHE_ENABLED=1
E: ID_BUS=ata
E: ID_MODEL=Hitachi_HDT721032SLA360
E: ID_MODEL_ENC=Hitachi\x20HDT721032SLA360\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
E: ID_PART_TABLE_TYPE=dos
E: ID_PART_TABLE_UUID=0335a4fd
E: ID_PATH=pci-0000:00:05.0-ata-2
E: ID_PATH_TAG=pci-0000_00_05_0-ata-2
E: ID_REVISION=ST2OA3AA
E: ID_SERIAL=Hitachi_HDT721032SLA360_STF202ML2YM4NP
E: ID_SERIAL_SHORT=STF202ML2YM4NP
E: ID_TYPE=disk
E: ID_WWN=0x5000cca346e9a5a8
E: ID_WWN_WITH_EXTENSION=0x5000cca346e9a5a8
E: MAJOR=8
E: MINOR=16
E: SUBSYSTEM=block
E: TAGS=:systemd:
E: USEC_INITIALIZED=7082610

+ set +x
mx17@mx:~
$ 
mx Kernel: 4.19.0-6-amd64 x86_64 bits: 64 Desktop: Xfce 4.14.2
Distro: MX-19.3x64 patito feo October 21 2019
Machine: Type: Laptop System: LENOVO product: 1951A47 v: ThinkPad T60

User avatar
fehlix
Developer
Posts: 10310
Joined: Wed Apr 11, 2018 5:09 pm

Re: Disabilitare automount HD-Partizioni al boot

#28 Post by fehlix »

OK, to have udisks handle both /dev/sda and /dev/sdb as internal fixed disks do this:
Open terminal and run:

Code: Select all

gksudo -k featherpad /etc/udev/rules.d/10-fix-esata.rules 
WIth open editor paste this into the editor:

Code: Select all

# udsiks2 rule for mark esata device for not-automounting and non-removable
#
# /dev/sda
DEVPATH=="/devices/pci0000:00/0000:00:05.0/ata1/host0/*", ENV{UDISKS_AUTO}="0", ENV{UDISKS_SYSTEM}="1"
# /dev/sdb
DEVPATH=="/devices/pci0000:00/0000:00:05.0/ata2/host1/*", ENV{UDISKS_AUTO}="0", ENV{UDISKS_SYSTEM}="1"

Save and close featherpad.
Still within open terminal run this:

Code: Select all

sudo udevadm control --reload
And show what was written here again by copy/paste output here:

Code: Select all

cat /etc/udev/rules.d/10-fix-esata.rules
reboot to check / verify outmount of the drives is not performed.
If succeffull, next step to make reserved partion /dev/sda1 not shown in Thunar filemanager - later
:puppy:
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

balarm
Posts: 147
Joined: Thu Dec 07, 2017 3:15 pm

Re: Disabilitare automount HD-Partizioni al boot

#29 Post by balarm »

Question: if i don't find "exist" the file "/etc/udev/rules.d/10-fix-esata.rules" do I have to create it and consequently act next steps you suggested?
Thanks
mx Kernel: 4.19.0-6-amd64 x86_64 bits: 64 Desktop: Xfce 4.14.2
Distro: MX-19.3x64 patito feo October 21 2019
Machine: Type: Laptop System: LENOVO product: 1951A47 v: ThinkPad T60

User avatar
fehlix
Developer
Posts: 10310
Joined: Wed Apr 11, 2018 5:09 pm

Re: Disabilitare automount HD-Partizioni al boot

#30 Post by fehlix »

balarm wrote: Tue Nov 06, 2018 5:31 pm Question: if i don't find "exist" the file "/etc/udev/rules.d/10-fix-esata.rules" do I have to create it and consequently act next steps you suggested?
Thanks
OK, my bad. Changed instructions:
first create empty file:

Code: Select all

sudo touch /etc/udev/rules.d/10-fix-esata.rules 
now open and edit:

Code: Select all

gksudo -k featherpad /etc/udev/rules.d/10-fix-esata.rules
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

Post Reply

Return to “Forum Italiano”