issue auto mounting to dir w/ a space in name[SOLVED]

Archived topics about LMDE 1 and LMDE 2
Locked
wm_domino

issue auto mounting to dir w/ a space in name[SOLVED]

Post by wm_domino »

have no issues mounting the drive using fstab as long as the directory's name doesn't have a space in it.

been trying to use: Storage Drive

i think the issue is in fstab, the mount location part of the line has no issues with:

/mnt/Storage

but i've tried using "Storage Drive" and Storage\020Drive and both return errors

the first indicates line 14 in fstab is bad on restart and it doesn't mount.
the second indicates dir doesn't exist and fails to mount also.

i'm sure this is just a case of my syntax in fstab. please help.
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.
Habitual

Re: issue auto mounting to dir w/ a space in name

Post by Habitual »

maybe

Code: Select all

Storage\ Drive/
?

P.S. HTML code in shell usually is not a good idea "Storage\020Drive"
wm_domino

Re: issue auto mounting to dir w/ a space in name

Post by wm_domino »

didn't work, returns a 'line 14 in fstab is bad'.
Habitual

Re: issue auto mounting to dir w/ a space in name

Post by Habitual »

Did you / can you try:

Code: Select all

"Storage\ Drive/"
wm_domino

Re: issue auto mounting to dir w/ a space in name

Post by wm_domino »

didn't work either, returns same error on boot.
altair4
Level 20
Level 20
Posts: 11426
Joined: Tue Feb 03, 2009 10:27 am

Re: issue auto mounting to dir w/ a space in name

Post by altair4 »

/mnt/Storage\020Drive
That's the traditional way one adds a line in fstab where something has a space in it.

Did you actually create that mountpoint?

What is the output of this command:

Code: Select all

ls -al /mnt
If it's not there then create it:

Code: Select all

sudo mkdir "/mnt/Storage Drive"
BTW, your life will be immensely easier if you adopt the Linux way of doing things and avoid spaces in names whenever possible.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
HughT

Re: issue auto mounting to dir w/ a space in name

Post by HughT »

man fstab says
If the name of the mount point contains spaces these can be escaped
as `\040'.
altair4
Level 20
Level 20
Posts: 11426
Joined: Tue Feb 03, 2009 10:27 am

Re: issue auto mounting to dir w/ a space in name

Post by altair4 »

HughT wrote:man fstab says
If the name of the mount point contains spaces these can be escaped
as `\040'.
You are quite correct - my mistake. "\040", "%20" when and where to use each one always confuses me. In this case I made some kind of hybrid out of the two.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
wm_domino

Re: issue auto mounting to dir w/ a space in name

Post by wm_domino »

total 16
drwxr-xr-x 4 root root 4096 Jun 22 13:56 .
drwxr-xr-x 22 root root 4096 Jun 22 13:12 ..
drwxr-xr-x 4 root root 4096 Jun 21 12:32 Storage
drwxr-xr-x 2 phil phil 4096 Jun 22 13:56 Storage Drive


and yes, it seems '/mnt/Storage\040Drive' works...

thanks so much!
HughT

Re: issue auto mounting to dir w/ a space in name[SOLVED]

Post by HughT »

you're welcome. don't forget to edit the title of your first post as SOLVED.
Locked

Return to “LMDE Archive”