Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
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 am running Redhat9 and I have 2 hard drives on my computer and I am trying to mount the partitions on my other hard drive so that a user other than root can have read/write/execute access to the mounted drive. I have succeeded in mounting the partitions w/ read/write/execute access for my other user, however it puts the drives on the desktop and I can't figure out how to move them, hide them, or make it so it doens't do that. Any suggestions welcome. Thanks in advance.
You'll need to play around with the "dreaded" command line for this.
Go to the command line either using Ctrl+Alt+F1 or open the Konsole. Use fdisk -l to see a listing of the available partitions. Note down the partition that you wish to mount, eg. hda1,hdb1,etc.
Then open the /etc/fstab either thru vi or some other editor. At the end, add a line as :
Suppose you wish to mount the hdb2 partition and the partition type is FAT32.
/dev/hdb2.
Use Tab(s) to get to the next column. Provide the mount point here.
/mnt/drivename.
Use Tab(s) to get to the next column. Provide the file system type here.
vfat
Use Tab(s) to get to the next column.
0 0
Press return.
Save the file and exit.
Go the the /mnt folder and create a directory here using
mkdir drivename
Whenever u wish to mount the drive, simple give the command mount /mnt/drivename
Yea that's basically how I did it originally, by putting it in the fstab file the way I did, it mounts automatically at startup, instead of haivng to type the mount command whenever I want to access the partitions, but the problem i was having was when I had it mount auto in the fstab file it placed the mounted harddrives on the desktop. Basically I would like to know if there was a way to take them off the desktop and still have read/write/execute access w/ my user (not root). At work we have to have about 8 drives mapped for some programs to work and we need to have read/write/execute to all drives, when I mapped them and gave them full permissions it puts all 8 on the desktop. I was hoping by figureing out how to do this @ home I could apply that knowledge to make it work at work. Does that make sense? Here's what my fstab file looks like for home.
Thanks alot Mathieu you are the man. It worked just the way I wanted it to. Do you think that will work for mounting network drives? Or will I have to supply username and password for that? Example:
the fdisk command is located in the /sbin/ folder and you have to be root to run it, so first i see your not logged in as root, so type: su -
and then your root password and then run fdisk
if it still says command not found then that means that /sbin is not in your PATH and you will have to specify the whole command like so :: /sbin/fdisk
which will then give you the output your looking for...
the command you were doing was fdisk, which is a windows command, you'll need to change the fstab file to mount drives.
to mount the drive you need to go to the directory /etc
there is a file in there called fstab, you need to edit that file to have drives mounted on boot, i believe after you change the fstab file you can mount the mount points you changed by doing the command:
mount -a
but i'm not entirely sure on that. Example of my fstab file:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.