How to Mount a Windows Drive in Linux Mint

gloriousigor
  11 years ago
  10

Scenario: My computer had Linux Mint installed already, and I wanted to copy some files from a second drive that was formatted NTFS, a Windows drive. Coming from a Windows background, I was not sure at first whether it would be possible without a special utility. The answer is that not only is it possible, it is easy and takes less than one minute!

An added complication to my scenario was that, as per an earlier tutorial, I had installed pysdm to permit auto-mounting, but the drive did not automount, probably due to a permission error, which became clear to me later.

When Linux booted, I clicked on the new icon for the recently attached Windows NTFS drive, only to receive the following error message:

"Unable to mount location

Error mounting: mount exited with exit code 1: helper failed with:
mount: only root can mount /dev/sda1 on /media/sda1"

This is a helpful error message, and I kept it open rather than clicking Close. I opened a terminal window, moving and resizing to place it directly below the error message. Using the above information, I entered the following command, which solves everything:

sudo mount /dev/sda1 /media/sda1

What does sudo mean? Whenever Linux talks about root, what it means is the admin password must be entered to perform said action, because root is protected. I interpret sudo as an acronym meaning [as] super user, do. I don't know whether that was the original meaning, but it makes sense to me.

I chose  "mount" as the verb based upon the error message above as well as my research on various web sites. From what I understand, a drive must be mounted in order for Linux to access it. Mounting seems to be a way of integrating a drive or other media into the Linux file hierarchy, which is important for permissions and other rules. I imagine anyone getting into Linux like me must be hitting search engines pretty regularly, unless they have a book. The Linux Mint web site is a valuable resource for us all, and even web sites for other linux distros also have useful information that is applicable to Mint, because all are based upon the Linux kernel and share many things in common.

I know how to supply parameters to mount due to the fact I can enter: "info mount" to learn about how mount accepts parameters. Sometimes the help can be pretty verbose and searching web sites is faster to find practical information.

My command in English would read something like this: "I am the super user and I can prove it with my password, so go ahead and ask me for it if you like. As super user, I want you to mount the drive known as /dev/sda1 as '/media/sda1' so that I can access it."

Now you know in Windows reading a drive from a different OS would be a major headache. But after the above command, I input my admin password at the prompt and bingo. Easy street. I love Linux Mint! It is getting better, and I look forward to the future for even more simplicity.

I believe there is a way to get around the file permission hurdle to permit pysdm to automount, thus saving the above step, but I have not researched this yet because I was interested in learning how to do things the manual way. This is a quick and easy method for a Linux novice to access a drive without having to install pysdm or do anything else besides one command. I hope this helps other Linux novices like myself that are dealing with a similar issue.

Comments
gloriousigor 11 years ago

Lord Mozart, I'm sure your comments will be helpful to others and thank you for making this tutorial even better! In my case, I was mounting a drive on a temporary basis just to transfer files. My method of backing up drives is the same with Linux as with Windows. I connect a drive, boot, clone or transfer depending on whether I want the OS and its settings (=clone), shut down, and disconnect, and the backup drive sits on a shelf collecting dust and taking it easy until the next scheduled backup.


Lord_Mozart 11 years ago

Here is another method that you might be unaware of. When you are installing Linux Mint (or any other linux distro), you can choose to have any drive automatically mounted at bootup time, and avoid the need to install pysdm or any other drive mounting software.

When the installer begins, choose "something else" from the "installation type" menu (3rd screen), and then select the drive(s) that you want mounted at bootup time. For example, I have a total of three drives in my computer: /dev/sda, /dev/sdb and /dev/sdc. /dev/sda is my Linux Mint install drive and has a / (root) partition for the system files, a /home partition for my personal files, and a swap partition. /dev/sdb and /dev/sdc are both backup and storage drives, and both currently have just one partition each.

The partitions are listed under each drive and show up as /dev/sdb1 and /dev/sdc1. Other partitions that you may have would show up as /dev/sdb2 /dev/sdb3 etc. Simply select the partition(s) of the particular drive(s) that you want mounted and click the "change" button. Choose the SAME type of file system and size that the drive currently has, and give them a mount point.

IF YOU CHOOSE A DIFFERENT FILE SYSTEM, THE DRIVES WILL BE FORMATTED TO THE NEW FILE SYSTEM AND YOU WILL ERASE AND LOSE EVERYTHING ON THEM. ALWAYS DOUBLE OR TRIPLE CHECK!

My drives are labeled "Secondary" and "tertiary" for easy visual identification, so I mount them as /secondary and /tertiary but could equally choose any other mount point such as /media/secondary for example.

WARNING: ENSURE THAT YOU DO NOT TICK THE FORMAT BOX OR YOU WILL FORMAT THE DRIVE AND LOSE EVERYTHING ON IT.

Finally, select /dev/sda as the drive to install grub on, and AFTER CHECKING EVERYTHING IS OK AND WHAT YOU INTEND TO DO, click on the install button. You will get a notice box outlining all of the changes you are about to make.

CHECK CAREFULLY THE DETAILS ARE CORRECT. You can click the "Go Back" button to go back to the previous step and make any necessary alterations.

Click the "Continue" button to proceed with the installation. Note: WHEN YOU CLICK THE "CONTINUE" BUTTON, YOU HAVE REACHED THE POINT OF NO RETURN. IF YOU HAVE NOT CHECKED THAT ALL IS WELL, IT WILL BE TOO LATE TO PREVENT DRIVES WITH INFO THAT YOU WANTED TO KEEP FROM BEING FORMATTED SO ALWAYS CHECK.

The rest of the installation will be exactly the same as the other installation methods, and once completed, and the computer rebooted, your drives will automatically be mounted every time you boot your computer, and you will have all necessary permissions to access your drive(s). You can then make bookmarks in nautilus or other file manager for easy one-click access.

If uncertain about this process try it out in virtualbox first with two or three extra virtual hard drives with some random files on them. It does work without a hitch, as this is how I always set up my computer, but can appear to be a bit daunting and scary the first time you do it, so I recommend trying it several times in a Virtualbox computer first before trying it for real. I hope you find this useful. Happy Linux Mint-ing. :)


danichimc 11 years ago

Good !


dakotakid 11 years ago

very concise and useful, regards