How do i add a NTFS (windows) hard drive in mint?

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
jtmtnman

How do i add a NTFS (windows) hard drive in mint?

Post by jtmtnman »

So ive learned about the FSTAB file and how to edit it. I updated the ntfsprogs i think. I'm not sure what exactly im doing wrong. Everytime i try to mount, i get a cant find drive, special drive, or drive doesnt exist. Any help would be apreciated.

Heres my FSTAB.

# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda1 during installation
UUID=cad9de5f-3322-4d88-bc57-a0a5bfec7003 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=120a5f6f-14f1-4a91-981f-0d21e261c5c5 none swap sw 0 0
# /dev/sdb1 /mnt ntfs-3g defaults,locale=en_US.UTF-8 0 0

It recognizes the drive in fdisk.

Disk /dev/sdb: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders, total 390721968 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x38ef9d17

Device Boot Start End Blocks Id System
/dev/sdb1 * 8819685 390716864 190948590 7 HPFS/NTFS/exFAT
/dev/sdb2 63 8819684 4409811 b W95 FAT32
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
altair4
Level 20
Level 20
Posts: 11453
Joined: Tue Feb 03, 2009 10:27 am

Re: How do i add a NTFS (windows) hard drive in mint?

Post by altair4 »

I would suggest identifying the partition with a UUID number rather than the /dev/sdxy identifier. Since this is the partition that the Windows OS lives in you also need to add some options to prevent bad things from happening.

Run the following command to find the UUID number for that partition:

Code: Select all

sudo blkid -c /dev/null
Then create a full mount point:

Code: Select all

sudo mkdir /mnt/WinC
Then instead of this:
/dev/sdb1 /mnt ntfs-3g defaults,locale=en_US.UTF-8 0 0
Add this to the end of fstab:

Code: Select all

UUID=DA9056C19056A3B3 /mnt/WinC ntfs defaults,nls=utf8,umask=000,uid=1000,windows_names 0 0
Changing DA9056C19056A3B3 to the correct UUID number

When that's all done unmount the partition if you currently have it mounted and run the following command:

Code: Select all

sudo mount -a
That command will test the new line in fstab for errors and if there are none silently mount the partition with the new parameters - without requiring a reboot.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: How do i add a NTFS (windows) hard drive in mint?

Post by Flemur »

I prefer using informative labels to UUIDs, which are just nonsense numbers: you can use gparted to label the partitions.

$ sudo mkdir /NTFS
$ sudo chown yourusername /NTFS

Lines in /etc/fstab:
LABEL=DATA /DATA ext4 defaults 0 0
LABEL=NTFS /NTFS ntfs noauto 0 0

"noauto" means the partition has to be mounted manually:
$ sudo mount /NTFS
use "defaults" instead of "noauto" and it'll mount at boot.

Here the partition labeled "NTFS" is an ntfs copy/backup of the always-mounted ext4 partition labeled "DATA", containing music, videos, etc - I don't want it mounted unless I'm doing a backup: /NTFS will be empty until the partition is mounted.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
DataMan

Re: How do i add a NTFS (windows) hard drive in mint?

Post by DataMan »

-Or-

If you really want to get down to a lower level of no nonsense, you can always use the old fashioned /dev identifier in fstab as in

Code: Select all

/dev/sdb1 /mnt/Win7 ntfs-3g defaults,locale=en_US.utf8 0 0
:lol:

-DataMan
altair4
Level 20
Level 20
Posts: 11453
Joined: Tue Feb 03, 2009 10:27 am

Re: How do i add a NTFS (windows) hard drive in mint?

Post by altair4 »

UUID = Universally Unique IDentifier.

Booting has become a complex thing over time and the old way of identifying partitions as /dev/sdxy had to be abandoned as given the right circumstances sda could become sdb and mess everything up which may be the problem in this thread. So the Linux installer for example now creates mount instructions in fstab specifying partitions by UUID.

There is nothing wrong with using labels if the partition has a label but then it becomes incumbent on the user to make sure multiple partitions don't have the same label.

The only consistent way to make sure a given partition is identified correctly is by using a UUID which is as much a "nonsense number" as a social security number is to a human.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
DataMan

Re: How do i add a NTFS (windows) hard drive in mint?

Post by DataMan »

Seeing Altair's posting, I forgot to mention that I have a dedicated /boot partition that is running the legacy GRUB. I suspect the new and "improved" GRUB needs the uuid (not speaking from first hand experience).

-DataMan
Locked

Return to “Beginner Questions”