this post was submitted on 04 Jan 2024
21 points (92.0% liked)

Linux

48193 readers
1922 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Here's the entry in the fstab file for mounting my hard drive. I have bolded the name of the hard drive (that's what it shows up as on the dock when it isn't mounted):

UUID=D4C0A66EC0A65710 /media/lucky/New Volume ntfs rw,auto,users,exec,nls=utf8,umask=003,gid=46,uid=1000    0   0

After making that entry in fstab, I execute the, systemctl daemon-reload, command, and then mount -a, afterwards which gives me this error.

top 16 comments
sorted by: hot top controversial new old
[–] shortdorkyasian@lemmy.world 23 points 10 months ago (1 children)

Does this help? https://superuser.com/questions/527495/how-to-mount-partition-with-spaces-in-path

Looks like you need \040 in place of the space.

Honestly, I would just change the name of the mount directory so there's no space.

[–] mmababes@lemmy.world 15 points 10 months ago* (last edited 10 months ago)

This worked.

I edited the fstab file:

UUID=D4C0A66EC0A65710 /media/lucky/New\040Volume/ ntfs rw,auto,users,exec,nls=utf8,umask=003,gid=46,uid=1000 0 0

My hdd is now automatically mounted by Debian.

Thank you!

[–] fxt_ryknow@lemmy.world 9 points 10 months ago (1 children)

Issue is with the space in "New Volume", I bet. Should likely be /media/lucky/New\ Volume

Or, I vaguely remember having to add like \040 or something in place of the space. I've dealt with this in the past... And found it easier to use a "-" instead of a space... Or no space at all, obviously.

[–] mmababes@lemmy.world 4 points 10 months ago (1 children)

Using \040 instead of single or double quotes resolved my issue.

Now Debian automounts the hdd.

[–] fxt_ryknow@lemmy.world 2 points 10 months ago

Good deal. After my post I saw someone else had also suggested the \040, prior to me... I just hadn't read all the comments. Glad it's sorted.

[–] RatsOffToYa@lemmy.world 6 points 10 months ago (3 children)

Is it literally named new volume? If so perhaps the space is throwing things off. Try quoting the whole path perhaps?

[–] mmababes@lemmy.world 2 points 10 months ago* (last edited 10 months ago)

Yup, that's the name.

I changed the entry on fstab to this (tried it with both single quotes and double quotes) and I'm stilling getting the parse error:

UUID=D4C0A66EC0A65710 "/media/lucky/New Volume" ntfs rw,auto,users,exec,nls=utf8,umask=003,gid=46,uid=1000 0 0

Btw I'm using the ntfs-3g driver, if that helps.

[–] FigMcLargeHuge@sh.itjust.works 2 points 10 months ago* (last edited 10 months ago) (1 children)

And dump the asterisks if that is the actual entry.

[–] mmababes@lemmy.world 1 points 10 months ago

The asterisks are not in fstab file. I just added them here to emphasize the name of the hdd.

[–] gregorum@lemm.ee 1 points 10 months ago* (last edited 10 months ago) (1 children)

sometimes there are those times when you've been at it for 6-8 hours straight with no break, and you keep staring at that one line in your config, trying so hard to see this mistake. is it a comma out of place? did i missplell something? no? and you're staring at it so long that you just don't see the glaringly obvious:

***New Volume***

it's that one remnant that you probably copy/pasted from a tutorial page and you're too brain-fried to consider that it's a part of the line you should have changed, so you're not looking at it, but there it is. but, hey, that's why forums like this exist: to get a fresh pair of eyes on the problem.

we've all been there.

[–] mmababes@lemmy.world 4 points 10 months ago* (last edited 10 months ago) (1 children)

There were no asterisks in the fstab file, I just placed them here to emphasize the name of the hdd.

Btw I got Debian to automount the hdd (thanks to @shortdorkyasian) by adding this entry to the fstab file:

UUID=D4C0A66EC0A65710 /media/lucky/New\040Volume/ ntfs rw,auto,users,exec,nls=utf8,umask=003,gid=46,uid=1000 0 0

Using \040 instead of a space or quotes (single or double) made it work.

[–] gregorum@lemm.ee 3 points 10 months ago

lmao, ok i see.

in any case, i'm very glad that you got your drive mounted!

[–] ozoned@lemmy.world 2 points 10 months ago* (last edited 10 months ago) (1 children)

You've made a directory path literally called

/media/lucky/New Volume

?

That REALLY doesn't seem like a good idea considering that *'s are wildcards for anything, and Linux isn't really fond of spaces.

The error basically tells you that you have an error on line 18, which I'm assuming is this line you're stating and that it's ignored that line so that it can still go on and mount other things.

Most likely you'd want something like:

# mkdir /media/lucky/NewVol

and then your fstab would be:

UUID=D4C0A66EC0A65710 /media/lucky/NewVol ntfs rw,auto,users,exec,nls=utf8,umask=003,gid=46,uid=1000 0 0

Also do you have a lib or something for linux to handle NTFS file system types? I haven't run Windows in 17 years now, so I don't have a clue if Linux can natively handle NTFS.

You can also run:

# lsblk

or

# blkid

to get the storage information and verify the storage UUID is correct.

[–] mmababes@lemmy.world 1 points 10 months ago* (last edited 10 months ago) (1 children)

That REALLY doesn’t seem like a good idea considering that *'s are wildcards for anything, and Linux isn’t really fond of spaces.

There are no asterisks in the fstab file. I put them here to emphasize the name of the hdd (I edited my original post to remove them to avoid confusing people).

Also do you have a lib or something for linux to handle NTFS file system types?

I'm using the ntfs-3g driver.

Btw this is what the entry on fstab looks like now but I'm still getting the parsing error:

UUID=D4C0A66EC0A65710 "/media/lucky/New Volume" ntfs rw,auto,users,exec,nls=utf8,umask=003,gid=46,uid=1000 0 0

[–] ozoned@lemmy.world 2 points 10 months ago (1 children)

But you have a space in there. I don't know how spaces are handled in fstab. You'll either need to quote it or at least escape the space:

UUID=D4C0A66EC0A65710 '/media/lucky/New Volume' ntfs rw,auto,users,exec,nls=utf8,umask=003,gid=46,uid=1000 0 0

OR

UUID=D4C0A66EC0A65710 /media/lucky/New\ Volume ntfs rw,auto,users,exec,nls=utf8,umask=003,gid=46,uid=1000 0 0

The space is absolutely an issue in fstab as it's thinking "Volume" is the filesystem type and ntfs goes into your options, etc.

[–] mmababes@lemmy.world 2 points 10 months ago* (last edited 10 months ago)

But you have a space in there. I don’t know how spaces are handled in fstab. You’ll either need to quote it or at least escape the space

Instead of using spaces or quotes (single or double), I used \040 (as @shortdorkyasian) said and that made all the difference:

UUID=D4C0A66EC0A65710 /media/lucky/New\040Volume/ ntfs rw,auto,users,exec,nls=utf8,umask=003,gid=46,uid=1000 0 0