Welcome!

The kernel problem with recent updates has been solved. Find the solution here

Important information
-- Required MX 15/16 Repository Changes
-- Information on torrent hosting changes
-- Information on MX15/16 GPG Keys
-- Spectre and Meltdown vulnerabilities

News
-- Introducing our new Website
-- MX Linux on social media: here

Current releases
-- MX-18.3 Point Release release info here
-- Migration Information to MX-18 here
-- antiX-17.4.1 release info here

New users
-- Please read this first, and don't forget to add system and hardware information to posts!
-- Here are the Forum Rules

(SOLVED) how to auto mount ntfs partition at startup - live mx w/ persitence

User avatar
Laurentius
Forum Regular
Forum Regular
Posts: 112
Joined: Sat Jan 20, 2018 9:44 pm

(SOLVED) how to auto mount ntfs partition at startup - live mx w/ persitence

#1

Post by Laurentius » Tue Dec 11, 2018 1:50 pm

Hello.
At one of my jobs i am using mx usb live with persistence. the persitence system files are in a partition of the internal hard drive: MX-Persist
I would like to auto mount on start up an ntfs partition of the hdd where my data (as the windows 10 system files) is stored.

I have tried with Disk manager and with fstab, with no success. If I then mount it manually (click on the desktop icon or on thunar after session starts, it mounts on the mount point I have set on fstab, but not automatically.

I there something special on live/persistence that makes this happen? In other installed systems i have not had this problem.

this is how my /etc/fstab currently look like:

Code: Select all

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

UUID=4F97F7862F9D5E8B /media/WIN500 ntfs-3g defaults,auto,windows_names 0 0
I notice there is also a similar file called /etc/fstab-disk-manager-save (empty)

Code: Select all

# /etc/fstab: static file system information
#
# Created by make-fstab on Thu Dec  6 11:43:25 -03 2018

# <file system>                            <mount point>                               <type>     <options>                       <dump/pass>
Here is some system info:

Code: Select all

$ inxi -F
System:    Host: mx1 Kernel: 4.15.0-1-amd64 x86_64 bits: 64 Desktop: Xfce 4.12.3 
           Distro: MX-17.1_x64 Horizon March 14  2018 
Machine:   Type: Desktop Mobo: ECS model: H110M4-C23 v: 1.0 serial: <root required> 
           UEFI [Legacy]: American Megatrends v: 5.12 date: 12/15/2016 
CPU:       Topology: Quad Core model: Intel Core i7-7700 bits: 64 type: MT MCP 
           L2 cache: 8192 KiB 
           Speed: 1501 MHz min/max: 800/4200 MHz Core speeds (MHz): 1: 1500 2: 1500 3: 1500 
           4: 1502 5: 1500 6: 1500 7: 1500 8: 1500 
Graphics:  Device-1: Intel driver: i915 v: kernel 
           Display: x11 server: X.Org 1.19.2 driver: modesetting unloaded: fbdev,vesa 
           resolution: 1366x768~60Hz 
           OpenGL: renderer: Mesa DRI Intel Kabylake GT2 v: 4.5 Mesa 13.0.6 
Audio:     Device-1: Intel Sunrise Point-H HD Audio driver: snd_hda_intel 
           Sound Server: ALSA v: k4.15.0-1-amd64 
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet driver: r8169 
           IF: eth0 state: up speed: 100 Mbps duplex: full mac: f4:4d:30:aa:3b:21 
           Device-2: Qualcomm Atheros AR9485 Wireless Network Adapter driver: ath9k 
           IF: wlan0 state: down mac: 9a:85:b7:39:d0:89 
Drives:    Local Storage: total: 960.35 GiB used: 5.58 GiB (0.6%) 
           ID-1: /dev/sda vendor: Toshiba model: DT01ACA100 size: 931.51 GiB 
           ID-2: /dev/sdb type: USB vendor: Kingston model: DataTraveler 2.0 size: 28.84 GiB 
Partition: ID-1: / size: 6.09 GiB used: 1.97 GiB (32.4%) fs: overlay dev: ERR-102 
Sensors:   System Temperatures: cpu: 34.5 C mobo: 29.8 C 
           Fan Speeds (RPM): N/A 
Info:      Processes: 246 Uptime: 11m Memory: 7.68 GiB used: 797.0 MiB (10.1%) Shell: bash 
           inxi: 3.0.25 
Last edited by Laurentius on Tue Dec 11, 2018 7:04 pm, edited 2 times in total.

balarm
Forum Regular
Forum Regular
Posts: 122
Joined: Thu Dec 07, 2017 3:15 pm

Re: how to auto mount ntfs partition at startup - live mx w/ persitence

#2

Post by balarm » Tue Dec 11, 2018 3:45 pm

Mx-tool tweak > other tab > check : allow mount internal drive to users no root > click Apply.
mx1 Kernel: 4.15.0-1-amd64 x86_64 bits: 64 Desktop: Xfce 4.12.3
Distro: MX-17.1_x64 Horizon December 15, 2017
Machine: Device: laptop System: LENOVO product: 1951A47 v: ThinkPad T60

User avatar
Laurentius
Forum Regular
Forum Regular
Posts: 112
Joined: Sat Jan 20, 2018 9:44 pm

Re: how to auto mount ntfs partition at startup - live mx w/ persitence

#3

Post by Laurentius » Tue Dec 11, 2018 4:20 pm

balarm wrote:
Tue Dec 11, 2018 3:45 pm
Mx-tool tweak > other tab > check : allow mount internal drive to users no root > click Apply.
Thank you, balarm. Tried that following your advise. No luck.
Anyway, I don't think it is a matter of allowing user to mount partitions. fstab is root mounting partitions. The question is why isn't it mounting automatically and it requires user intervention.

User avatar
BitJam
Forum Veteran
Forum Veteran
Posts: 3341
Joined: Sat Aug 22, 2009 11:36 pm

Re: how to auto mount ntfs partition at startup - live mx w/ persitence

#4

Post by BitJam » Tue Dec 11, 2018 4:35 pm

Laurentius wrote:
Tue Dec 11, 2018 1:50 pm
this is how my /etc/fstab currently look like: [...] /media/WIN500 [...]
IIUC, directories under /media are created on an as-needed basis for dynamically mounting file systems. That directory (/media) is always cleared on every live boot by mounting a small tmpfs file system there. This is also a safeguard to prevent a catastrophic system crash if a user tries to copy lots of data to drive that is not actually mounted. This may be slightly inconvenient for you now but it solves and prevents a lot of problems and confusion.

I suggest you change the directory in your fstab entry to /mnt/WIN500 and create that directory with

Code: Select all

sudo mkdir -p /mnt/WIN500
You can then test this with:

Code: Select all

sudo mount /mnt/WIN500
df -h /mnt/WIN500
sudo umount /mnt/WIN500
df -h /mnt/WIN500
You could use almost any other directory (that you create once manually) which is not under /media or any other temporary file system.

IIUC, /media is for dynamically mounting partitions. Its subdirectory mountpoints are created and destroyed as needed while /mnt/ is for more permanent mounts like you want to do with WIN500.

There are other options available depending on how dynamic versus permanent you want that mountpoint to be.

HTH
Will I cry when it's all over?
When I die will I see Heaven?

balarm
Forum Regular
Forum Regular
Posts: 122
Joined: Thu Dec 07, 2017 3:15 pm

Re: how to auto mount ntfs partition at startup - live mx w/ persitence

#5

Post by balarm » Tue Dec 11, 2018 4:38 pm

I had the opposite of problem; I found the internal drives/partition automounted.
I setted some parameters in the BIOS to solve.
viewtopic.php?f=14&t=46746&start=40#p466675.
mx1 Kernel: 4.15.0-1-amd64 x86_64 bits: 64 Desktop: Xfce 4.12.3
Distro: MX-17.1_x64 Horizon December 15, 2017
Machine: Device: laptop System: LENOVO product: 1951A47 v: ThinkPad T60

User avatar
Laurentius
Forum Regular
Forum Regular
Posts: 112
Joined: Sat Jan 20, 2018 9:44 pm

Re: how to auto mount ntfs partition at startup - live mx w/ persitence

#6

Post by Laurentius » Tue Dec 11, 2018 6:32 pm

BitJam wrote:
Tue Dec 11, 2018 4:35 pm

I suggest you change the directory in your fstab entry to /mnt/WIN500 and create that directory with

Code: Select all

sudo mkdir -p /mnt/WIN500
That worked.
BitJam wrote:
Tue Dec 11, 2018 4:35 pm
IIUC, /media is for dynamically mounting partitions. Its subdirectory mountpoints are created and destroyed as needed while /mnt/ is for more permanent mounts like you want to do with WIN500.

There are other options available depending on how dynamic versus permanent you want that mountpoint to be.
HTH
Thank you for your reply and explanation. It seems your understanding is right.

What i would like to get now is the partition shown on Thunar's "Devices". I think mount points under /media do that by default and others need some extra tweak. That's why on installed systems i had always used /media.
Maybe, when back at the office, I will change the mount point to /home/my-user/WIN500 which I think, would achieve that, according to this mint forum post https://forums.linuxmint.com/viewtopic. ... 7#p1455937, as for the moment, this is a Single user system. (other users of the same pc will boot on windows).

Will let you know.

Thank you.

User avatar
fehlix
Forum Veteran
Forum Veteran
Posts: 4262
Joined: Wed Apr 11, 2018 5:09 pm

Re: how to auto mount ntfs partition at startup - live mx w/ persitence

#7

Post by fehlix » Tue Dec 11, 2018 7:41 pm

Laurentius wrote:
Tue Dec 11, 2018 6:32 pm
Maybe, when back at the office, I will change the mount point to /home/my-user/WIN500 which I think, would achieve that, according to this mint forum post https://forums.linuxmint.com/viewtopic. ... 7#p1455937, as for the moment, this is a Single user system. (other users of the same pc will boot on windows).
The way I would do this is a combination of BitJam's advice to mount under /mnt
plus some additonal mount option to get :
- the mounted partition properly shown in Thunar
- have proper owner ship of user on files and folder (e.g not owned by root, and no files are wrongly marked as executable!)

So to take your example from the opening post I would do this

Code: Select all

sudo mkdir /mnt/WIN500
and adjust /etc/fstab to have this entry
for the automaticaly mounted and shown in Thunar, with proper permissions for the default user with user-id=1000:

Code: Select all

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

UUID=4F97F7862F9D5E8B /mnt/WIN500 ntfs-3g uid=1000,gid=1000,dmask=027,fmask=137,nosuid,nodev,nofail,x-gvfs-show,x-gvfs-name=WIN500,auto,windows_names 0 0
:puppy:
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

User avatar
Fornhamfred
Forum Regular
Forum Regular
Posts: 219
Joined: Sun May 02, 2010 12:49 pm

Re: how to auto mount ntfs partition at startup - live mx w/ persitence

#8

Post by Fornhamfred » Wed Dec 12, 2018 12:29 pm

Entry deleted

User avatar
Laurentius
Forum Regular
Forum Regular
Posts: 112
Joined: Sat Jan 20, 2018 9:44 pm

Re: how to auto mount ntfs partition at startup - live mx w/ persitence

#9

Post by Laurentius » Wed Dec 12, 2018 1:55 pm

fehlix wrote:
Tue Dec 11, 2018 7:41 pm

and adjust /etc/fstab to have this entry
for the automaticaly mounted and shown in Thunar, with proper permissions for the default user with user-id=1000:

Code: Select all

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

UUID=4F97F7862F9D5E8B /mnt/WIN500 ntfs-3g uid=1000,gid=1000,dmask=027,fmask=137,nosuid,nodev,nofail,x-gvfs-show,x-gvfs-name=WIN500,auto,windows_names 0 0
:puppy:
That works, fehlix. Thanks.
I hadn't noticed that files were owned by root on the previous setup (and writable by everyone), as I could create and delete files.

All the files of that partition are mounted as owned by me now... Even other user's and windows system files...
I'll have to be careful.

User avatar
LastSioux
Forum Novice
Forum  Novice
Posts: 2
Joined: Fri Jan 04, 2019 7:58 am

Re: how to auto mount ntfs partition at startup - live mx w/ persitence

#10

Post by LastSioux » Mon Jan 07, 2019 10:25 am

Laurentius wrote:
Wed Dec 12, 2018 1:55 pm
fehlix wrote:
Tue Dec 11, 2018 7:41 pm

and adjust /etc/fstab to have this entry
for the automaticaly mounted and shown in Thunar, with proper permissions for the default user with user-id=1000:

Code: Select all

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

UUID=4F97F7862F9D5E8B /mnt/WIN500 ntfs-3g uid=1000,gid=1000,dmask=027,fmask=137,nosuid,nodev,nofail,x-gvfs-show,x-gvfs-name=WIN500,auto,windows_names 0 0
:puppy:
That works, fehlix. Thanks.
I hadn't noticed that files were owned by root on the previous setup (and writable by everyone), as I could create and delete files.

All the files of that partition are mounted as owned by me now... Even other user's and windows system files...
I'll have to be careful.
UUID=4F97F7862F9D5E8B /mnt/WIN500 uid=1000,gid=1000,dmask=027,fmask=137,nosuid,nodev,nofail,x-gvfs-show,auto, 0 0
In my case works this

Post Reply

Return to “Hardware /Configuration”