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.
How can I make this Data partition be readable and writeable? I tried the "chmod 777" command, but was unsure of what directory to type in . I tried several but the command wouldn't start. This partition is on the second hardrive. I am just trying to get more storage on the second hard drive, so I hope I partitioned correctly. The drive was originally mounted as usr, but I managed to shrink that and make a new partition named Data.
Partitions do not have ownerships or permissions, as they are just bits of disk.
Mount points (directories) do have ownerships/permissions - it is highly likely that
your data directory is owned by root and/or has no write access - especially if it is mounted as /data.
To see all relevant info, use a command entry screen and enter
The drive was originally mounted as usr, but I managed to shrink that and make a new partition named Data.
The output in your last post show sdb1 mounted at /usr and that is the only mount point on a second drive. If you have a second partition on that drive it won't show with df -h if it is not mounted. Did you create a data mount point? Where? Did you try to mount it? With what command.
The use of separate / and /usr partitions, whilst perfectly workable is rather unusual.
It's more usual to just treat /usr as a sub-directory of /
I'm guessing that your data partition is /dev/sdb2 - assuming that this is true...
If it was me...I would do
Code:
sudo mkdir /data
- this will put your data mount-point in /.
Then add an extra line in /etc/fstab which is similar to the /dev/sdb1 line, but changing sdb1 to sdb2 & changing /usr to /data
OK, I think I'm beginning to understand. This is the first time installing on a laptop with two hard drives. I have done four other installs but with only one drive. I thought I could have two home partitions, and when it wouldn't let me choose a second /home on the second drive I chose /usr. Now I know that was wrong.
Before I go any further here is the etc/mtab and proc/mounts info updated with the drive mounted if it makes any difference in which way I go with this.
JeremyBoden, I think I am starting to head in the right direction. I understand the first command, but not sure what you mean by adding in the extra line.
By doing the fix method will I still have access to storage on the first drive or will the /home be only on the second drive? It would seem like a waste of two 120 gig drives to only be able to write to one drive. Thanks for your help and patience!
The other parameters such as nosuid etc are a bit esoteric and not needed.
You can access data stored in /home/randy (1st disk) and also data in /media/randy/Data (2nd disk), simultaneously.
You can't have more than one partition mounted as /home at the same time - this would cause Linux to get confused!
Work for the future...
When you get it working, I would create some meaningful sub-directories in /media/randy/Data and read up about symbolic links.
JeremyBoden,
Still not sure exactly what to do. I think I understand the concept but not the execution of it.
So far I will:
#1----open terminal and type in "sudo mkdir /data" and let that run...
#2----then while still in the terminal type in "sudo text_editor_of_your_choice /etc/fstab"
(Do I type that in exactly? meaning the "text_editor_of_your_choice" part?) or (I use the program "Text Editor")and let that run...
I can then open the file, "/etc/fstab" and there should only be this one line..."/dev/sdb2 /media/randy/Data ext4 rw,errors=remount-ro 0 2"..... in it?
Is it just those two commands? Then I can access the second drive?
Sorry for the dumb questions....
Since you have chosen a mount-point of /media/randy/Data,
there is a slight amendment to #1:-
If you don't already have a directory called /media/randy/Data you need to create it
Code:
sudo mkdir /media/randy/Data
For #2, in addition to the current lines in /etc/fstab you need a line for /dev/sdb2
It should read
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.