[SOLVED] Attempting to get an external Hard Drive to work for storage
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Attempting to get an external Hard Drive to work for storage
I have a used 500 GB external hard drive that I've been trying to use under Linux mint 18 1... I'm locked out of it for some reason. I can not drag and drop files into it, The "create folder" option is grayed out on the File menu. Why can't I write to it!?
I've goggled my fingers sore, but still have no idea what I need to do to get it working...
I first deleted the existing partition... Then...
In gparted I clicked on Device>and Created a Partition Table.
Next I created a new partition on sdb by going to Partition and selecting the ext4 partition...
This was done in Linux 18 1... Cinnamon version 4.4.0-53-Genetic
Last edited by Aspirer; 06-06-2017 at 10:16 PM.
Reason: Added more info.
With the drive connected, what is the output of these commands?
Code:
fdisk -l
cat /etc/mtab
You may have to issue the commands as root.
Be sure to surround the output of the commands with "code" tags, which become available when you click the "Go Advanced" button at the bottom of the "compose post" window.
With the drive connected, what is the output of these commands?
Code:
fdisk -l
cat /etc/mtab
You may have to issue the commands as root.
Be sure to surround the output of the commands with "code" tags, which become available when you click the "Go Advanced" button at the bottom of the "compose post" window.
I am not familiar with root... Never heard of it before..
If interested, I can give a more complete explanation of what you are doing. Basically, you have a permission problem which is typical when you format a new drive to a linux file system. You have to change the permissions on the partition for your external hard drive so you have write access on the partition. You do that by changing the permissions on the mount point of the external hard drive with the chmod command while the drive is mounted. We may be having some trouble determining the mount point of the external drive. From your screen shot it appeared to be "/media/marz/500 GB Storage". You have to be sure the external drive is powered on and mounted when you run the command or it won't work.
Edit: Reread your posts and screen shots and I think I see your problem. When you created the partition you also created a label for the partition which has spaces in the the label name, namely "500 GB Storage". When the bash shell encounters spaces like that it stops and tries to run the command on a file named "/media/marz/500" which does not exist. It's generally a better practice to not put spaces in partition labels for this reason. You can workaround it by running:
Code:
sudo chmod 777 /media/marz/500\ GB\ Storage/
Try that and see if it runs.
Last edited by kilgoretrout; 06-07-2017 at 07:33 AM.
You need to understand first that Mint and most any Linux system is created as a multi-user system and that in most cases, the standard user does not have full access to anything outside the /home/user directory (in your case /home/marz). You can give yourself access by either changing the owneershipt or changing the permisssions and in your case, changing the ownership would be simpler and cause fewer potential problems. Also, as pointed out above, when you are running commands in a terminal you should not have spaces in directory names. To avoid the problems you had in running these commands, put quotes around the command.
The fdsik -l command got an error because you tried to run it as a user not root using sudo.
Change the ownership of your directory mount point for the external drive partition:
Code:
sudo chown -R marz "/media/marz/500 GB Storage"
As pointed out above, case sensitivity applies so if it is "GB" not "gb" or "Storage" not "storage" you need to enter that correctly. The above would give the user "marz" full read/write access to that partition.
yancek, see my post. He has spaces in his partition label name. Mint's auto-mounter is creating a mount point at /media/marz/ with that partition label name complete with spaces. This is causing the error he's getting. You need to use the backslash escape character to get around the problem.
Edit: Reread your posts and screen shots and I think I see your problem. When you created the partition you also created a label for the partition which has spaces in the the label name, namely "500 GB Storage". When the bash shell encounters spaces like that it stops and tries to run the command on a file named "/media/marz/500" which does not exist. It's generally a better practice to not put spaces in partition labels for this reason. You can workaround it by running:
Code:
sudo chmod 777 /media/marz/500\ GB\ Storage/
Try that and see if it runs.
Thank you kilgoretrout...
Solved...
Thank you also to the rest of you who contributed to this thread...
You need to use the backslash escape character to get around the problem.
Putting quotes around the command accomplishes the same thing without the escape character on every Linux I've used.
Giving read/write/delete permissions to anyone with access to the computer (777 permissions) is generally not a good idea other than for purposes of testing or perhaps some insignificant files/directories. Doing it for an entire partition can lead to all kinds of problems is the user isn't careful.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.