Please Help me with Partitions!!
Hey guys i just installed Linux Mint 18 for the first time, and i am having a problem with partitions,
during installation i made 4 partitions 1 / 2 /home 3 /swap area 4 /datapartition the problem i am facing i with data partition is that i can't use it! i can't move/copy any data to that folder while the whole partition is empty! please help me here. Thank You! |
First, is the data partition mounted? Second, what are the permissions for the mount point? Does the user trying to use that directory have the necessary permissions?
|
Hi naumanafsar! I just wanted to say 'Welcome'. And encouragement on 'digging thru' whatever 'puzzles' Linux presents;) Are you familiar with 'the terminal'/CLI? One way I approach things it to try to provide a way for others to visualize and even reproduce my problem situation. Also I try to compose optimal web-search keywords, to demonstrate the issue. **Are there any error messages?** Do you have a way to copy and paste info here (delimited with [CODE]...[/CODE] tags)? Like:
Code:
df /datapartition; ls -ld /datapartition Best Wishes! Looking forward to hearing back from you. ENJOY your Linux 'journey'! |
Hi, Welcome to LQ,
During installation, did you tell Mint where your "home" partition is to be mounted? For the "data" partition, it is probably best if you just used the file manager/browser to mount it and get access to it. Now if the partition already has a filesystem on it, e.g. ext4, then only root has permission to write to that partition. Then, you have to log in as root in a terminal and create a directory there, then change the ownership of the directory so that you get permission to read and write to that particular directory. Then you can put all your files inside that directory. Do you have any notion of the command line? Check these out in the meantime: http://www.tldp.org/LDP/GNU-Linux-To...html/x9543.htm http://www.tldp.org/HOWTO/Hard-Disk-Upgrade/mount.html |
Here's the thing. By default /data is a directory located in a system area of Linux. As such, Mint will have set up the filesystem on the related partition as owned and modifiable by the root user, not you as an ordinary user. That is why you cannot change anything in it without some modifications.
In Mint, I find it's best to mount data partitions to /media, and to do this automatically through the /etc/fstab file. But first things first. We need to find out which device contains the data partition in question, mount it in /media, and take ownership of it. Can you please post the output from the following commands, which will enable us to get info on the data partition: sudo parted -l ls -l /dev/disk/by-label |
>"By default /data is a directory located in a system area of Linux."
Oh, you mean: a newly-made /data would be in 'the root' ..., like: mkdir /MYwhatever; df /MYwhatever shows it 'in' / == 'root' filesystem! (until `mount` of a fs on it) I was about ready to RUN back to my 1990's SunOS4.x, when `df /data` failed on my new Mint18.1 ;) /dev/disk/by-label wasn't there: only: by-id by-path by-uuid. Try: ls -l /dev/disk/* (tho it may NOT give any 'useful' info here :( Try: lsblk -fp ;) ) |
A path to anything in Linux starts with the root directory (/). Everything in Linux is a file. When you create a partition you are setting aside an area of the disk and creating a file system on it. It is unreachable until you 'mount' it somewhere. Most partitions can be mounted almost anywhere. Most partitions, when created during installation, are owned by the root user. Most partitions can only be mounted by the root user without using special options. So, if you have a partition mounted at /data (a directory directly below the root directory) it is probably owned by the root user until and unless you change the ownership with the chown command and/or change permissions with the chmod command. At this point you need to learn about the Linux permission system (just google linux permissions) and read the manual pages for chown and chmod ('man chown' and 'man chmod'). It is really important that you understand these before you go much further as it has a lot to do with the security of your system. Without knowing this you can screw things up royally.
|
Yes /datapartition is mounted and root owns all the permissions
i tried chmod command but this is the result Quote:
|
ls -l /dev/disk/by-label is not working on my Linux 18 so i tried ls -l /dev/disk/* and here's the output
Code:
/dev/disk/by-id: |
Repeating my #3?:
Code:
df /datapartition; ls -ld /datapartition lsattr /datapartition Did you `sudo` the chown? What exact chown command did you enter? [chmod?] Which of sda5,6,7 is your /datapartition? (is that it's exact name?) #7 is a good 'warning';) |
That's strange, because /dev/disk/by-label works fine on my Mint 18.1 installation. It's an easy way to get at the filesystem labels. Unless of course none of your filesystems actually have labels. The only reason I asked for that was so that we could quickly make sure which was your data partition, but there are other ways of doing that.
How about the output from sudo parted -l? That will give us a list of all your partitions in a nice handy format complete with filesystem types and partition sizes. |
In order to avoid confusion, naumanafsar, I'll leave you in the hands of Jjanel. After all, he was here first. Let us know if he is unable to resolve your issue.
|
parted -l is not useful here, because it doesn't provide any *mount* info.
no;) it's time for me to sleep, and hydrurga knows way more Linux than I do (I only know old Unix:() p.s. I added two more commands to my #10 ... |
what is going on here?
4 partitions: only 3 mounted? your fstab should be simple 1 hard drive 4 partitions: in lue of UUID which can be used to replace this simple set up. Code:
#root your fstab should look something similar to that if MINT is using UUID same set up. UUID replaces /dev/sdxx a mixing of the two device and UUID example (my fstab) Code:
UUID=a2af02da-4b76-467a-b63b-0b0ec296ca0d / ext4 defaults 0 1 create a directory on the system side to mount your data to. Done in root or user with root permissions of course. Code:
#chmod 755 /media/data -R |
BW! My HERO! Good AM! by the way, are you ever going to read my Blog4u/PM/email? :D May I sleep now?
|
All times are GMT -5. The time now is 03:34 AM. |