fstab edit for ntfs mount [SOLVED]

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
Catchpole
Level 4
Level 4
Posts: 349
Joined: Sat Dec 24, 2011 4:15 am
Location: Leeds UK

fstab edit for ntfs mount [SOLVED]

Post by Catchpole »

How can I auto mount my second ntfs hard drive by editing the fstab file?
I want to access it from /media/windows/c in the command line.

I've created the mount point "/media/windows/c" and tried two differnt entries in fstab:
(At different times. Without the #)

Code: Select all

#/dev/sdb1      /media/windows/c        ntfs    defaults        0       0
#UUID=A8ECC8EAECC8B3BA  /media/windows/c ntfs   auto,users,utf8 0       0
However both give an error when booting. (press S to skip mounting)
I know I can do this with the GUI but I'm trying to learn more about the command line.

What am I doing wrong?
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.
Desktop Computer:
Motherboard = Gigabyte GA-H61M-USB3V
CPU = Intel i3-3240 3.4GHz
Monitor = BENQ BL2411PT rev 00-012-AL
Mint 21.3 Virginia "Mate desktop" (64bit)
Memory = 12GB
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: fstab edit for ntfs mount

Post by altair4 »

I don't like the options list in the second one but before recommending something else would you please post the output of the following command:

Code: Select all

sudo blkid -c /dev/null
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
User avatar
Catchpole
Level 4
Level 4
Posts: 349
Joined: Sat Dec 24, 2011 4:15 am
Location: Leeds UK

Re: fstab edit for ntfs mount

Post by Catchpole »

Hi altair4,

The output of the blkid is:

Code: Select all

/dev/sda1: UUID="f497a324-fbed-49e2-87ba-4368c0261d8c" TYPE="ext4" 
/dev/sda5: UUID="7e38860f-8a3a-4390-ae73-eb3ba751a243" TYPE="swap" 
/dev/sdb1: UUID="A8ECC8EAECC8B3BA" TYPE="ntfs" 
/dev/sdb2: LABEL="New Volume" UUID="CC2A34262A341046" TYPE="ntfs"/dev/sda1: UUID="f497a324-fbed-49e2-87ba-4368c0261d8c" TYPE="ext4" 
/dev/sda5: UUID="7e38860f-8a3a-4390-ae73-eb3ba751a243" TYPE="swap" 
/dev/sdb1: UUID="A8ECC8EAECC8B3BA" TYPE="ntfs" 
/dev/sdb2: LABEL="New Volume" UUID="CC2A34262A341046" TYPE="ntfs"
Desktop Computer:
Motherboard = Gigabyte GA-H61M-USB3V
CPU = Intel i3-3240 3.4GHz
Monitor = BENQ BL2411PT rev 00-012-AL
Mint 21.3 Virginia "Mate desktop" (64bit)
Memory = 12GB
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: fstab edit for ntfs mount

Post by altair4 »

Well, I still don't like the options you used but it should have worked.

** If you have mounted it manually or through the file manager unmount it.

** Then go back into fstab and remove the # in front of the line specifying the UUID and save it.

** Then run the following command:

Code: Select all

sudo mount -a
If it gives you an error message post it.

If it came back to the prompt then it should have mounted the partition to /media/windows/c.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
User avatar
Catchpole
Level 4
Level 4
Posts: 349
Joined: Sat Dec 24, 2011 4:15 am
Location: Leeds UK

Re: fstab edit for ntfs mount

Post by Catchpole »

Hi altair4,

I followed your instructions and found that I had put the mount point in "mnt" and not "media".
So that part of the problem is solved.

The options I used were from an example and were added in desperation because of the original problem of not mounting at boot time.
I am the only user of the computer and so there is no security problem. I'll investigate the options later and modify accordingly.

So I have two questions:

Is there a recommendation of where to mount a second ntfs hdd?

If I leave the "options" open, will the system use its own default settings?
Desktop Computer:
Motherboard = Gigabyte GA-H61M-USB3V
CPU = Intel i3-3240 3.4GHz
Monitor = BENQ BL2411PT rev 00-012-AL
Mint 21.3 Virginia "Mate desktop" (64bit)
Memory = 12GB
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: fstab edit for ntfs mount

Post by altair4 »

In reverse order:

** You can't leave the "options" list blank because the system is pretty persnickety about the syntax of that line and it's expecting something to be there.

** You can use "defaults" as in:

Code: Select all

UUID=A8ECC8EAECC8B3BA  /mnt/windows/c ntfs   defaults 0       0
That will mount the partition with owner=root and with permissions of 777.

** My recommendation is to use the following:

Code: Select all

UUID=A8ECC8EAECC8B3BA  /mnt/windows/c ntfs   defaults,nls=utf8,umask=000,uid=1000,windows_names 0 0
umask=000 - will produce the same 777 permissions as the default but I like to state it explicitly so I know what I've done.

uid=1000 - will change ownership from root to you. I do that in case I want to create a samba share of the partition and to remove the error message if I send something to the trash.

windows_names - prevents you from creating a file with certain characters in the name that Windows cannot interpret and as a result discards.

BTW, not a big fan of mounting the partition the Windows OS itself lives in as writable but it seems this is the only ntfs partition you have.

** You can really mount a partition anywhere you want.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
User avatar
Catchpole
Level 4
Level 4
Posts: 349
Joined: Sat Dec 24, 2011 4:15 am
Location: Leeds UK

Re: fstab edit for ntfs mount [SOLVED]

Post by Catchpole »

altair4,
Thanks very much for your help and expertise.
Its increased my knowledge somewhat but I've still got a long way to go.
Desktop Computer:
Motherboard = Gigabyte GA-H61M-USB3V
CPU = Intel i3-3240 3.4GHz
Monitor = BENQ BL2411PT rev 00-012-AL
Mint 21.3 Virginia "Mate desktop" (64bit)
Memory = 12GB
Locked

Return to “Installation & Boot”