Automatic mount hard disk in common with windows 10

hello guys, could not find a solution over internet and i aks here. I have three hard disk in common with win 10 (not for Os but for files). every time I have to use then on linux I have to insert a password and be aware that I did reboot after using windows (if I don’t, I cannot mount this drives).
so I ask:

  • is there a way to automatically mount the drives and don’t care if I reboot\shut down from win?
    thank you

for automatically mount a drive is /etc/fstab responsible and systemd cares about

  1. /etc/fstab
/dev/sdb3 /run/media/<user>/<devName> ext4 defaults 0 0
  1. or you try it with a script
mount /dev/sdb1 /run/media/<user>/<devName>

make it executable and put it to .config/autostart

2.1) and when you shutdown

ummount /run/media/<user>/<devName>

i suppose plasma provides a opportunity to execute the script at shutdown

Only the first one should be used, but with UUID. The “sda3” label is not permanent, it can change by simply connecting a sata cable to an other slot while UUID will always be the same.

So uuid for sda3 is:
sudo blkid | grep sda3

It is my output: /dev/sda3: UUID=“692955f8-1b41-41d4-b4d4-0d475f404040” BLOCK_SIZE=“4096” TYPE=“ext4” PARTUUID=“3e2b7cc7-03”

So the uuid is 692955f8-1b41-41d4-b4d4-0d475f404040, with that, the mount line will be this:

692955f8-1b41-41d4-b4d4-0d475f404040 /run/media/<user>/<devName> ntfs defaults,relatime 0 0

imho, i mount my drives under /mnt/whatever folders because /media in the unix filesystem is mostly for removable drives. But that’s just my habit.

*also, if the drive is an ssd, defaults,relatime sholud be defaults,relatime,discard

This happens because of Windows’ “Fast startup” option, that doesn’t really turn off your computer, but puts it in a sort of hibernation state.
You should disable it from Win.

More info here

Which Windows can turn back on without notice during a major update.

well this seems a good advice :slight_smile:
I try it and let you know!

This topic was automatically closed 170 days after the last reply. New replies are no longer allowed.