[SOLVED] I Installed an external Hard drive using Gparted. I cannot move files to the external
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
I Installed an external Hard drive using Gparted. I cannot move files to the external
Hello.
I have checked the other threads and either I have missed my answer or did not understand that it was the answer. I apologise in advance if I am being a repeater:
The Problem: I am running 17 mint. I installed a toshiba external Hard Drive using Gparted- Fast and easy, BUT, somehow I installed the external as root, I cannot move files to the external because I am not root? Under permissions it states that the Owner Cannot Be Determined.
Any help would be great.
As a general rule in Linux, anything outside the /home/user directory will be owned by root so as indicated above, you need to either give your user(s) permissions to access the formatted filesystem on the partition(s) on the drive or change ownership to a different user. The other option is to obviously access as root and with Mint that would mean using 'sudo'.
Some filesystems (e.g. fat32) do not fully support the Linux file permission system. You may have to mount them with additional flags to make them appear as owned by your user. Assuming your user has the default single-user user id of 1000, and your drive appears under sdb1 you can mount it to /media/my_drive with the following command:
I read man chown. I was unsure of some of the instructions (sorry) ** Thank you for the link- what a great resource!!**
The file is located: /media/ls/toshiba
The mount point does not exist. When I mount the Toshiba there is a hidden file Lost and Found. I don't have permission to open it.
I tried Gparted.
2 partitions are currently active on device /dev/sda
A new partition table cannot be created when there are active partitions. Active partitions are those that are in use, such as a mounted file system, or enabled swap space.
Use Partition menu options, such as unmount or swapoff, to deactivate all partitions on this device before creating a new partition table. I did unmount the external before using Gparted. Given all the mistakes I have made I was afraid to try swap off or anything else and make it worse.
In gparted it shows:
/dev/sda2 extended
/dev/sda5 linux-swap
That is all the information that I can find at this point.
I hope this helps you to see where I went wrong. Again, sorry for the wait- I really do appreciate your help.
Last edited by Liz99; 04-20-2015 at 11:28 AM.
Reason: Forgot to put entire output from terminal- added note
Anything under the /media directory such as "/media/ls/toshiba" would be owned by root so you either need to change the owner of the file(s) or change permissions. If 'toshiba' is a directory, you can ascertain the owner:group with this command:
Code:
ls -ld /media/ls/toshiba
You can change ownership with the following, replace Liz99 with your actual user name:
I followed your instructions and these are the results:
ls@ls-MXC061 ~ $ su
Password:
ls-MXC061 ls # sudo chown -R ls /media/ls/Toshiba
chown: cannot access ‘/media/ls/Toshiba’: No such file or directory
ls-MXC061 ls # ls -ld /media/ls/toshiba
ls: cannot access /media/ls/toshiba: No such file or directory
ls-MXC061 ls #
This what it looks like when I open it in the terminal: ls@ls-MXC061 /media/ls/toshiba $
apt-get, and wget are the only commands I know. I am still reading up on wget. I apologise again for only knowing that I love mint but haven't taken the time to understand it more fully.
I know you are busy and donate your time to help us. I did look up the installation instructions on google. Usually I just enter my error or mistake into search and find past threads marked "resolved" and do the fix without having to ask. This time I couldn't find what I needed or understood, so again I apologise for taking your time.
To the question of where I mounted to: ls@ls-MXC061 ~ $ sudo bash
[sudo] password for ls:
ls-MXC061 ~ # mount -o uid=1000 /dev/sdb1 /media/my_drive
mount: mount point /media/my_drive does not exist
ls-MXC061 ~ #
I have attached screen shots of gparted for you to accurately see what I am trying to explain
Please DO NOT mess with sda. All of your screen shots show output for sda, sda is NOT your external drive, it's your system drive. If you mess up sda, your system will not boot. sdb is your external drive.
The output from your commands is very odd. Earlier you showed that sdb1 was mounted at "/media/ls/toshiba":
Code:
$ df -hT
Filesystem Type Size Used Avail Use Mounted on
/dev/sda1 ext4 90G 30G 55G 36 /
none tmpfs 4.0K 0 4.0K 0 /sys/fs/cgroup
udev devtmpfs 483M 12K 483M 1% /dev
tmpfs tmpfs 100M 1.3M 99M 2% /run
none tmpfs 5.0M 0 5.0M 0% /run/lock
none tmpfs 497M 76K 497M 1% /run/shm
none tmpfs 100M 40K 100M 1% /run/user
/dev/sdb1 ext4 459G 70M 435G 1% /media/ls/toshiba
But now your system is saying that "/media/ls/toshiba" does not exist:
Code:
# ls -ld /media/ls/toshiba
ls: cannot access /media/ls/toshiba: No such file or directory
What changed? Is the external drive still plugged in? Is it mounted? If so, where?
ls@ls-MXC061 ~ $ df -hT
Filesystem Type Size Used Avail Use Mounted on
/dev/sda1 ext4 90G 37G 49G 44% /
none tmpfs 4.0K 0 4.0K 0% /sys/fs/cgroup
udev devtmpfs 483M 12K 483M 1% /dev
tmpfs tmpfs 100M 1.3M 99M 2% /run
none tmpfs 5.0M 0 5.0M 0% /run/lock
none tmpfs 497M 76K 497M 1% /run/shm
none tmpfs 100M 36K 100M 1% /run/user
ls@ls-MXC061 ~ $ sudo lsblk -f
[sudo] password for ls:
NAME FSTYPE LABEL MOUNTPOINT
sda
sda1 ext4 /
sda2
sdb
sdb1 ext4 toshiba
sr0
ls@ls-MXC061 ~ $
The only difference from then to now was unallocating sda5. I did not have the external hooked last night or now. Other than that I left it alone when I saw I changed the sda5. The media not showing a directory is the same as last night, I just didn't think to include it at the time. I am sorry, if I did more, I don't remember it. I knew this was way over my head and I don't like to tinker. The unallocation bit was a button hit twice by accident.
I wish I could tell you more. Thanks so much for helping. If I have messed things up too badly, I made a full back up prior to the installation, just in case, and can do a re-install.
sda5 was your swap partition. You no longer have a swap, which is not a good idea, and since you didn't remove it correctly your system might not boot anymore. I don't have experience with creating a swap partition on a system that is already set up and running (and configured to use a different swap partition), but I'm sure somebody else here has.
fdisk needs to be run as root, that's why there was no output.
Your external drive was clearly connected when you posted the earlier df output, as it shows up in the list, and an "ls" would not have failed with a "No such file or directory" error. It looks like it's attached now as well, since it shows up in your lsblk output, it just isn't mounted. Is the drive really not attached? If that's the case, the lsblk output doesn't make sense, and why are you trying to debug an external drive without it connected anyway?
In post 6 above you showed that sdb1, the partition on your external drive, had a mount point of:
Quote:
/media/ls/toshiba
You can't make any changes to it if it isn't plugged in as suggested above. If you have it plugged in, with the newer Ubuntus such as Mint, it should show under /media/ls (ls being your user name?) and the permissions will be root:root. I don't know why Ubuntu does this but that's the way it works. So plug it in and change owner:group.
I knew I had it plugged in. It is a little confusing for me. Yes, it is plugged in. Why would I not have it plugged in is a good question. I confused unmounted with unplugged. I installed it incorrectly, then I didn't know what to do with it.I should have paid more attention to the right terms- you don't read minds and can only go by what we give you. I also should have printed out what I changed when it went wrong and didn't. I really do apologise. My system boots up just fine. As suggested I will change ownership using root. I didn't realize it was a permission problem. I thought I made my external unable to be used with mint.
Thanks so much- I will change the permissions and report back. You really do help- an amazing amount- and you are appreciated.
In general terms, any time you create a new partition on a Linux system it will only be writeable by root or by using sudo with systems like Mint. You need to change the owner and or permissions to suit your needs. You will generally if not always see a lost+found directory in a newly created partition and it has it's purpose but you can research that later if you want.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.