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

All Gurus once were Newbies
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. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read this

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

Postby jtmtnman on Tue Feb 26, 2013 8:09 pm

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
jtmtnman
Level 1
Level 1
 
Posts: 1
Joined: Tue Feb 26, 2013 7:48 pm

Linux Mint is funded by ads and donations.
 

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

Postby altair4 on Wed Feb 27, 2013 7:32 am

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.
altair4
Level 15
Level 15
 
Posts: 5515
Joined: Tue Feb 03, 2009 10:27 am

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

Postby Flemur on Wed Feb 27, 2013 10:35 am

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.
Mint 16/Xfce/fluxbox, Manjaro/fluxbox, LMDE/MATE
User avatar
Flemur
Level 5
Level 5
 
Posts: 588
Joined: Mon Aug 20, 2012 9:41 pm

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

Postby DataMan on Wed Feb 27, 2013 11:52 am

-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
Linux'd since 2005 Linux ID 422356 Ubuntu ID 15015
User avatar
DataMan
Level 6
Level 6
 
Posts: 1192
Joined: Thu Dec 04, 2008 6:47 am
Location: Carmel, Indiana USA at /var/www

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

Postby altair4 on Wed Feb 27, 2013 12:50 pm

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.
altair4
Level 15
Level 15
 
Posts: 5515
Joined: Tue Feb 03, 2009 10:27 am

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

Postby DataMan on Wed Feb 27, 2013 1:58 pm

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
Linux'd since 2005 Linux ID 422356 Ubuntu ID 15015
User avatar
DataMan
Level 6
Level 6
 
Posts: 1192
Joined: Thu Dec 04, 2008 6:47 am
Location: Carmel, Indiana USA at /var/www


Return to Newbie Questions

Who is online

Users browsing this forum: Hecubus, Pierre, sadhu and 36 guests