I added a 1 TB hard drive to my desktop, Kubuntu can see it but I can not create folders or do anything with it. Can someone tell me what I am doing wrong?
I added a 1 TB hard drive to my desktop, Kubuntu can see it but I can not create folders or do anything with it. Can someone tell me what I am doing wrong?
Well, what did you do exactly? Plugging it in isn't enough. All the defaults from disk makers assume Windows, which doesn't match what a Linux user needs.
In Linux, there are many different ways to handle storage depending on your needs and how important the data might be. What is the purpose for this drive? Did you buy 2 of them, so you have somewhere for backups?
https://help.ubuntu.com/community/In...gANewHardDrive might be helpful. There is a how-to for almost any common activity you might want.
The short answer from that link:
* partition the drive
* create new file systems - ext4 if you don't have any good reason for something else. Do not use NTFS or FAT-whatever
* create a mount point (empty directory) for each new partition
* manually mount the partition(s) to the mount point(s), and manually setup any permissions.
If everything is working, you'll probably want to automate mounting. For internal HDDs, modify the fstab config file. For USB or other external devices, you probably want to use autofs. There are manpages for each and how-to guides a help.ubuntu.com for both.
NEVER unplug a USB storage device without umount'ing it first.
A few rules of thumb about mount locations from my multiple decades as a Unix admin:
* /media/ is for disks that the OS automatically mounts. Best to avoid it for any disks you manually want to mount.
* /mnt/ is for temporary mounts and used by admins to have temporary access to partitions. Not for permanent mounts.
* Best NOT to mount a new disk under 1 individual userid's HOME. This will likely create backup failures in the future. I prefer to either mount the the new storage for /home/ and upgrade all userids storage amount or mount it under /D/x1, x2, x3, x4 ... as more and more storage is added. Backup storage really should not be directly connected to the machine to prevent malware and crypto-locker stuff, but if you must, /B/x1, x2, x3, x4 ... you get the idea.
* Using symbolic links from the new storage to a HOME directory is fine for convenience reasons. I also like to use the cdpath environment variable for convenience.
* I always use LVM under the file systems to make resizing storage in different areas easier later. LVM also provides live backup techniques that cannot be added later. But LVM's added flexibility does have 1 downside. Added complexity. I wouldn't recommend it for someone having issues mounting storage.
Of course, others will have different experiences and different opinions.
Last edited by TheFu; June 24th, 2018 at 04:10 PM.
Have you partitioned it with gparted or other tools.
And then formatted it? Also ifusing Windows, then you may want NTFS. But if not using Windows do not use NTFS.
And if a Linux format given yourself ownership & permissions to use it? For each partition.
And if internal drive, you probably want to mount each partition using fstab, so you can give it a mount point that makes sense. I use /mnt/data, but some have very large music files may directly mount into /home/music or video or whatever data you have.
gparted & fdisk instructions:
https://help.ubuntu.com/community/In...gANewHardDrive
https://help.ubuntu.com/community/HowtoPartition/OperatingSystemsAndPartitions
GParted partitioning software - Full tutorial
http://www.dedoimedo.com/computers/gparted.html
Screenshots of using gparted
http://www.howtoforge.com/partitioning_with_gparted
Partitioning basics with some info on /data, older but still good bodhi.zazen
http://ubuntuforums.org/showthread.p...data+partition
http://www.dedoimedo.com/images/comp...e-extended.png
Ownership & permissions:
Seems like a better way as you have more control over what is executable. Isee post #8 & 10 by morbius1.
http://ubuntuforums.org/showthread.php?t=1795369
sudo chmod -R a+rwX,o-w /mnt/data
sudo chown -R $USER:$USER /mnt/data
#where $USER should be your login name
#or to see user
echo $USER
http://ubuntuforums.org/showthread.php?t=1983336
Create mount point, mount & edit fstab from user Morbius1 in Post # 6 - suggest using templates instead.
UEFI boot install & repair info - Regularly Updated :
https://ubuntuforums.org/showthread.php?t=2147295
Please use Thread Tools above first post to change to [Solved] when/if answered completely.
Thank you both very much! This did the trick,
sudo chmod -R a+rwX /media
Permissions were the problem. Thanks again!
Do you understand what sudo chmod -R a+rwX /media did?
That just gave anyone on the system the ability to write and delete to all files from /media down. That probably isn't really advisable. Basically it is chmod -R 777 which should almost never be used ... ever, unless you are setting up a system to be hacked.
I unplugged the drive because I am not understanding all this. Why is is such a task to add a hard drive for backups and storage? I need a more step by step explanation to understand how to fix this.
It is only confusing if you don't understand Unix file/directory permissions. If you do, then it makes perfect sense.
Linux is like Unix and multi-user from the ground up. This is different from that other popular OS. On Unix systems, file and directory permissions matter. They are the core for all system security. There isn't any way to avoid learning about these things, sorry.
It isn't hard, if you apply yourself and just learn it. https://help.ubuntu.com/community/FilePermissions
Actually, Unix file permissions are quite elegant. By default, new file systems are owned by root:root. There are reasons for that. Depending on the desired use for the storage, you might want to leave it that way and create subdirs to be used for different purposes and to have different owners and perhaps different groups in the permissions. We don't have enough information to know.
If you just want it to work and don't care about security, use 777 permissions.
If you want to "do it right", think multi-user and layout the purposes for the storage with the specific userids and groups which need to own and which need write access to the different areas. For backups, if the backups are at the system level, then root:root should be fine. Backups generally are performed with sudo/root, but it depends on how you are performing backups and which backup tools are being used.
With great power and great flexibility, comes some added complexity. That's the way of the world.
I am using a 240 GB SanDisk SSD as the drive for the OS. I want to use a 1 TB Toshiba SATA hard drive for music, backing up data, music and videos. I need to be able to create folders, copy files, play music and videos, etc.
It is my understanding that this is the same as /home defaults.
fred@bionic-z97:~$ sudo chmod a+rwX,o-w temp.txt
fred@bionic-z97:~$ ll t*
-rw-rw-r-- 1 fred fred 0 Jun 24 22:39 temp.txt
a means all or owner, group & other and then + means all get
rw or read & write but big X excludes execute unless already executable
and o-w excludes write on other
https://help.ubuntu.com/community/FilePermissions
Seems like a better way as you have more control over what is executable. See post #8 & 10 by morbius1 on correcting oldfred's use of 777.
http://ubuntuforums.org/showthread.php?t=1795369
Last edited by oldfred; June 25th, 2018 at 04:55 AM.
UEFI boot install & repair info - Regularly Updated :
https://ubuntuforums.org/showthread.php?t=2147295
Please use Thread Tools above first post to change to [Solved] when/if answered completely.
Thanks oldfred! I will try and put this all together as to how I can apply your instructions to my situation tonight after work. I get the basics of it but getting the drive mounted without breaking the system is still confusing me. In previous attempts I ended up with a system that would not boot up. You are right about having my permissions just like home, that is exactly what I want to do. I am probably making things way harder than they need to be trying to get my head around doing this from the command line.
Bookmarks