LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 04-12-2015, 02:51 AM   #1
Liz99
LQ Newbie
 
Registered: Apr 2015
Posts: 11

Rep: Reputation: Disabled
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.

Have a great night, morning or afternoon!
 
Old 04-12-2015, 03:26 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,989

Rep: Reputation: 2217Reputation: 2217Reputation: 2217Reputation: 2217Reputation: 2217Reputation: 2217Reputation: 2217Reputation: 2217Reputation: 2217Reputation: 2217Reputation: 2217
From a terminal run the following display commands and post all the output
Code:
df -hT
sudo lsblk -f
 
Old 04-12-2015, 09:13 AM   #3
fatmac
Senior Member
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: AntiX
Posts: 1,979

Rep: Reputation: Disabled
You could change the ownership of the external drive to your user, see man chown.
 
Old 04-12-2015, 09:57 AM   #4
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 7,378

Rep: Reputation: 1414Reputation: 1414Reputation: 1414Reputation: 1414Reputation: 1414Reputation: 1414Reputation: 1414Reputation: 1414Reputation: 1414Reputation: 1414
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'.
 
Old 04-12-2015, 04:09 PM   #5
joe_2000
Member
 
Registered: Jul 2012
Location: Aachen, Germany
Distribution: Void, Arch, Debian
Posts: 859

Rep: Reputation: 245Reputation: 245Reputation: 245
To what filesystem did you format?

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:
Code:
mount -o uid=1000 /dev/sdb1 /media/my_drive
Note the mountpoint has to exist.
 
Old 04-19-2015, 10:14 PM   #6
Liz99
LQ Newbie
 
Registered: Apr 2015
Posts: 11

Original Poster
Rep: Reputation: Disabled
External Drive Output

I apologize for not getting back to you. I appreciate your help- believe me- and did not mean to leave you hanging.

First the terminal output for command:df -hT
sudo lsblk -f

ls@ls-MXC061 ~ $ 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
ls@ls-MXC061 ~ $ sudo lsblk -f

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
ls@ls-MXC061 ~ $ sudo lsblk -f
[sudo] password for ls:
NAME FSTYPE LABEL MOUNTPOINT
sda
sda1 ext4 /
sda2
sda5 swap [SWAP]
sr0
ls@ls-MXC061 ~ $


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 12:28 PM. Reason: Forgot to put entire output from terminal- added note
 
Old 04-20-2015, 09:20 AM   #7
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 7,378

Rep: Reputation: 1414Reputation: 1414Reputation: 1414Reputation: 1414Reputation: 1414Reputation: 1414Reputation: 1414Reputation: 1414Reputation: 1414Reputation: 1414
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:

Code:
sudo chown -R Liz99 /media/ls/Toshiba
 
Old 04-20-2015, 12:24 PM   #8
Liz99
LQ Newbie
 
Registered: Apr 2015
Posts: 11

Original Poster
Rep: Reputation: Disabled
External Drive Output and responses

Thank you all for such fast response!

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

Thank you for your help. It is truly appreciated!
Attached Thumbnails
Click image for larger version

Name:	Screenshot.png
Views:	24
Size:	213.7 KB
ID:	18172   Click image for larger version

Name:	Screenshot-1.png
Views:	15
Size:	215.8 KB
ID:	18173   Click image for larger version

Name:	Screenshot-2.png
Views:	15
Size:	229.8 KB
ID:	18174  
 
Old 04-20-2015, 01:21 PM   #9
robdogj
LQ Newbie
 
Registered: Apr 2015
Distribution: @ Work Red Hat & CentOS @home LinuxMint & PepperMint
Posts: 5

Rep: Reputation: 0
do you see the device when you run fdisk -l to verify where volume is located & what is the acutal filesystem?
 
Old 04-20-2015, 01:23 PM   #10
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,559

Rep: Reputation: 2127Reputation: 2127Reputation: 2127Reputation: 2127Reputation: 2127Reputation: 2127Reputation: 2127Reputation: 2127Reputation: 2127Reputation: 2127Reputation: 2127
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?

Please re-run "df -hT"
 
Old 04-20-2015, 02:29 PM   #11
Liz99
LQ Newbie
 
Registered: Apr 2015
Posts: 11

Original Poster
Rep: Reputation: Disabled
Hi:

fdisk -l shows ls@ls-MXC061 ~ $ fdisk -l
ls@ls-MXC061 ~ $

I unallocated sda5- did I do major damage?

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.

Thanks again-
 
Old 04-20-2015, 02:37 PM   #12
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,559

Rep: Reputation: 2127Reputation: 2127Reputation: 2127Reputation: 2127Reputation: 2127Reputation: 2127Reputation: 2127Reputation: 2127Reputation: 2127Reputation: 2127Reputation: 2127
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?
 
Old 04-20-2015, 02:44 PM   #13
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 7,378

Rep: Reputation: 1414Reputation: 1414Reputation: 1414Reputation: 1414Reputation: 1414Reputation: 1414Reputation: 1414Reputation: 1414Reputation: 1414Reputation: 1414
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.
 
1 members found this post helpful.
Old 04-20-2015, 04:36 PM   #14
Liz99
LQ Newbie
 
Registered: Apr 2015
Posts: 11

Original Poster
Rep: Reputation: Disabled
Hi,

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.
 
Old 04-20-2015, 05:59 PM   #15
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 7,378

Rep: Reputation: 1414Reputation: 1414Reputation: 1414Reputation: 1414Reputation: 1414Reputation: 1414Reputation: 1414Reputation: 1414Reputation: 1414Reputation: 1414
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.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I boot an os installed onto an external hard drive, pease? cousinlucky Linux - Hardware 16 09-22-2014 08:58 AM
ubuntu installed on external hard drive, can't startup without external hard drive. Vanostaajen Linux - Software 23 01-20-2009 10:59 AM
Ubuntu: Installed to external hard drive; boot to primary hard drive gives error 22 dcorb62 Linux - General 7 09-05-2007 12:28 AM
external enclosure for an internal hard drive vs external USB hard drive powah Linux - Hardware 1 03-10-2006 10:03 AM
accidentally installed linux on external hard drive oneferna Linux - General 2 01-28-2006 04:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration