What's wrong with this mount command? [SOLVED]

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
mrodent
Level 2
Level 2
Posts: 89
Joined: Sun Jan 01, 2017 7:59 am

What's wrong with this mount command? [SOLVED]

Post by mrodent »

There is an NTFS partition named "Shared". The directory /home/mike/Shared/ has been created... in fact a simpler mount command works OK

(as root:)

Code: Select all

~ # mount LABEL="Shared"  /home/mike/Shared/  ntfs  rw,nosuid,nodev,relatime,user_id=mike,group_id=mike,permissions,allow_other,noatime 0 2
response:
"Usage:..."

I am trying to mount this NTFS partition and then use the MySQL databases there. As per this answer at Stack Exchange.

As I say this works OK:

Code: Select all

~ # mount LABEL="Shared"  /home/mike/Shared/
In fact the "command" in this SE answer is meant to be a line in /etc/fstab. As mentioned in my comments there, I find that Linux won't then boot if I do that, so I'm trying to work out a) how to achieve the same thing "manually" and b) how then to include a suitably tweaked version of the line in fstab and get it to work.

The line as written there doesn't seem to correspond to the "usage" of the `mount` command.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Version: Linux Mint 20 Ulyana, 64-bit; Cinnamon 4.6.6; Machine: ASUSTek, PRIME Z270-A, Quad Core, Intel Core i7-7700
GPU: NVIDIA GP106 [GeForce GTX 1060 6GB]; total drive space: 5.5 TB (2 SSDs + 1 internal HD + 1 external HD);
UEFI dual boot w/ W10
deepakdeshp
Level 20
Level 20
Posts: 12341
Joined: Sun Aug 09, 2015 10:00 am

Re: What's wrong with this mount command?

Post by deepakdeshp »

To know about the commands

Code: Select all

man fstab 
.

Code: Select all

man mount
will give the man pages. Reading entries in fstab will give a good picture about the usage.
After making any changes in fstab run

Code: Select all

 sudo mount -a
which will act on any additions in fstab
The expected result and mounted devices can be checked with

Code: Select all

mount
command
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help.
Regards,
Deepak

Mint 21.1 Cinnamon 64 bit with AMD A6 / 8GB
Mint 21.1 Cinnamon AMD Ryzen3500U/8gb
mrodent
Level 2
Level 2
Posts: 89
Joined: Sun Jan 01, 2017 7:59 am

Re: What's wrong with this mount command?

Post by mrodent »

Thanks...

I seem to have got some way there. This works:

Code: Select all

mount -o rw,nosuid,nodev,relatime,user_id=mike,group_id=mike,permissions,allow_other,noatime LABEL="Shared"  /home/mike/Shared/
... but I'm not sure what those two numbers are doing (" ...,noatime 0 2 ...") or how they should be incorporated. I'm sure examining those man pages will be good for me, and about to do that right now. As an out-of-his-depth newb trying to accomplish a thorny but essential step for my transition to Linux (share MySQL between W10 and Linux on a dual-boot, as described in the SE answer), it'd be nice to be just handed the answer ... !
Version: Linux Mint 20 Ulyana, 64-bit; Cinnamon 4.6.6; Machine: ASUSTek, PRIME Z270-A, Quad Core, Intel Core i7-7700
GPU: NVIDIA GP106 [GeForce GTX 1060 6GB]; total drive space: 5.5 TB (2 SSDs + 1 internal HD + 1 external HD);
UEFI dual boot w/ W10
Mute Ant

Re: What's wrong with this mount command?

Post by Mute Ant »

The numbers on the end... 0 2 ...are for when the line is part of fstab. They don't mean anything to the mount command.
mrodent
Level 2
Level 2
Posts: 89
Joined: Sun Jan 01, 2017 7:59 am

Re: What's wrong with this mount command?

Post by mrodent »

Great, thanks. You've helped me solve the "manual" mounting issue at least.

Well the bad news is that, in my quest then to get the MySQL server working, I'm still, even after mounting with all those options, getting the following when going "mysql -u root -p":
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
... whether I try this as "mike" (preceded by sudo) or as root.

:(
Version: Linux Mint 20 Ulyana, 64-bit; Cinnamon 4.6.6; Machine: ASUSTek, PRIME Z270-A, Quad Core, Intel Core i7-7700
GPU: NVIDIA GP106 [GeForce GTX 1060 6GB]; total drive space: 5.5 TB (2 SSDs + 1 internal HD + 1 external HD);
UEFI dual boot w/ W10
Locked

Return to “Beginner Questions”