[SOLVED]Mount 4 NTFS partitions as a folder in root directory

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
PROMAN8625
Level 1
Level 1
Posts: 1
Joined: Sun Jun 26, 2022 11:46 am

[SOLVED]Mount 4 NTFS partitions as a folder in root directory

Post by PROMAN8625 »

Mount 4 NTFS partitions as a folder in root directory

i have a windows pc with 4 partitions and now moved to linux mint with an ssd upgrade
ssd have LM and hdd have windows' 4 ntfs partitions
i want to mount them under root directory instead of /media/name/whatever

i have latest 64 bit LM
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.
valouch
Level 2
Level 2
Posts: 95
Joined: Sun Jul 11, 2021 6:36 am

Re: Mount 4 NTFS partitions as a folder in root directory

Post by valouch »

To mount partition in kernelspace:

-- check volume uuid
sudo blkid
-- open /etc/fstab file
sudo xed /etc/fstab
-- insert similar line into /etc/fstab (change first two params accordingly)
UUID=A640085140082B1F /Disk_D ntfs-3g defaults 0 0
-- reboot

Do this for each of your ntfs partitions.
User avatar
AndyMH
Level 21
Level 21
Posts: 13503
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Mount 4 NTFS partitions as a folder in root directory

Post by AndyMH »

You might want to amend

Code: Select all

UUID=A640085140082B1F /Disk_D ntfs-3g defaults 0 0
to

Code: Select all

UUID=A640085140082B1F /Disk_D ntfs-3g defaults,uid=1000,gid=1000 0 0
ntfs does not support linux file permissions, this tells linux who owns it.

You will need to create the folder /Disk_D.

If you want read/write access from linux, assume win10, you will need to disable fast start in win.

Instead of rebooting, you can sudo mount -a, this forces the system to reread fstab.

Make a copy of fstab before you change it, that way if you screw up and the system won't boot, you can boot your mint install stick and revert to the original fstab.

Personally not a good idea to mount in /, usual places are /mnt, /media (/media/you is not a good choice, that's where linux automounts) or somewhere in home, but it's your machine.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
valouch
Level 2
Level 2
Posts: 95
Joined: Sun Jul 11, 2021 6:36 am

Re: Mount 4 NTFS partitions as a folder in root directory

Post by valouch »

You will need to create the folder /Disk_D.
- No, it is created during reboot automatically.

uid=1000,gid=1000
- Setting not necessary if you do not need permissions mapping.
User avatar
AndyMH
Level 21
Level 21
Posts: 13503
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Mount 4 NTFS partitions as a folder in root directory

Post by AndyMH »

Well that surprised me :oops: You are right. After a reboot the folder does get created (it will fail if you do a sudo mount -a without creating the folder or rebooting). You can read/write without uid=1000,gid=1000 although anything you create is owned by root. Add those back in and reboot, then anything created is owned by you.

I've done what I suggested for years, did this change recently, like in the last 3-4 years?
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
altair4
Level 20
Level 20
Posts: 11419
Joined: Tue Feb 03, 2009 10:27 am

Re: Mount 4 NTFS partitions as a folder in root directory

Post by altair4 »

It's a systemd thing. On a reboot it will run some systemctl commands ( daemon-reload & restart local-fs.target ) and create the mount point if it doesn't exist.

I personally prefer your method of creating the mount point and the mount -a command so if there is an issue with what I have done I can find out before a reboot when all hell can break out.

Although NTFS will mount with 777 permissions by default the problem is the Trash Bin. Like everything else it's owned by root unless you specify otherwise so if you want to send something to the trash you will get:
Trash.png
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
User avatar
AndyMH
Level 21
Level 21
Posts: 13503
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Mount 4 NTFS partitions as a folder in root directory

Post by AndyMH »

Well that explains things, I always do a mount -a to test before a reboot.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
Locked

Return to “Storage”