Mounting a second SATA drive to 'My Computer'

I’ve just installed OS11 and have my swap/home/… partitions all on my primary sda drive. I have a second sdb drive installed with a single reiserfs partition (used to store my media).

I managed to mount the sdb drive to a folder to backup my sda files before my clean install from OS10.1 to 11, but now I’d like to mount this drive to ‘My Computer’ on the desktop.

My problem is that I am unexperienced with the terminal commands so can anyone please explain how to do this?

Thanks

[got nowhere when trying to find an existing post so apologies if this has been covered already!]

YYaST > Systrem > System Partitioner.

When all is fine it will show all your partitions. Select the one that cobvrs your second disk > Edit. Fill in where you want it mounted. Of course DO NOT FORMAT. Finish.

Ok that definitely makes things a lot easier, thanks. That now gets me half way there, I have read access but for some reason no write access.

Is this because I’m logged in as a user as opposed to root? Could you tell me how to assign write access to my user account?

cheers

I think you need to search google/linux for " edit fstab": edit fstab - Google Search. 1st one on the list (for me) seems a good place to start

Here is some of mine where I have “rw” to all my disks & partitions (as an example only):



/dev/disk/by-id/scsi-SATA_ST3500320AS_5QM02D0H-part5 /                    ext3       acl,user_xattr        1 1
/dev/disk/by-id/scsi-SATA_ST3500320AS_5QM02D0H-part2 /data                ext3       defaults              1 2
/dev/disk/by-id/scsi-SATA_ST3500320AS_5QM02D0H-part6 /home                ext3       acl,user_xattr        1 2
/dev/disk/by-id/scsi-SATA_Maxtor_6Y080M0_Y2G4VQ6E-part1 /windows/C           ntfs-3g    users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
/dev/disk/by-id/scsi-SATA_Maxtor_6Y080M0_Y2G4VQ6E-part5 /windows/D           vfat       users,gid=users,umask=0002,utf8=true 0 0
/dev/disk/by-id/scsi-SATA_SAMSUNG_HD501LJS0MUJ1MP885841-part5 /windows/E           vfat       users,gid=users,umask=0002,utf8=true 0 0

Make a backup 1st before you start editing:)
Don’t use mine: yours will be different (and that is just some of mine).

If you have problems, get back & someone will try & help:)

I think YaST will have made the fs read/write, but did the mount point exist before you called YaST or is it made by YaST?

When it was already there it may have no write access for everybody. So (as root) do an ls -l of the mount point (and the dirs in the path above it) to see who is the owner and what the access bits are. You can changewith chmod (or even change the owner with chown).

What if you have a separate hard drive hooked up, just for mass storage, and it doesn’t appear in /etc/fstab, and you don’t know its serial number (such as /dev/disk/by-id/scsi-SATA_ST3500320AS_5QM02D0H)?

You can use any of the /dev/disk/by… device files, they link to each other.
But did YaST not see it in YaST > System > System Partitioner?

Thanks, it works with the ‘chown’ command. And yes, the mount point was created myself in sudo terminal.

No need to edit fstab, YaST2 takes care of that :slight_smile:

I have a WD hard drive with my OS on it, then just recently I added a Seagate hard drive for storage. But the seagate hard drive doesn’t show up in /etc/fstab, just the WD:


/dev/disk/by-id/scsi-SATA_WDC_WD2501BB-00_WD-WCANK6434316-part2 /                    ext3       acl,user_xattr        1 1
/dev/disk/by-id/scsi-SATA_WDC_WD2500BB-00_WD-WCANK6434316-part3 /home                ext3       acl,user_xattr        1 2
/dev/disk/by-id/scsi-SATA_WDC_WD2500BB-00_WD-WCANK6434316-part1 swap                 swap       defaults              0 0
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0


It does show up in Yast partitioner, with the full device ID, So I guess I should add it to my fstab file somehow.

spetter0508 used YaST as shown above and seems to be satisfied with, why don’t you do likewise BNG22908?

spetter0508 used YaST as shown above and seems to be satisfied with, why don’t you do likewise BNG22908?

Thanks for the info, but I still don’t know how to get Yast to do that, so I’ll have to use fstab instead.

Let’s see if mounting the storage drive (sda1 is the only partition on it) works now that I changed fstab:


/dev/disk/by-id/scsi-SATA_WDC_WD2500BB-00_WD-WCANK6434316-part2 /                    ext3       acl,user_xattr        1 1
/dev/disk/by-id/scsi-SATA_WDC_WD2500BB-00_WD-WCANK6434316-part3 /home                ext3       acl,user_xattr        1 2
/dev/disk/by-id/scsi-SATA_WDC_WD2500BB-00_WD-WCANK6434316-part1 swap                 swap       defaults              0 0
/dev/disk/by-id/scsi-SATA_ST3160023A_5JS6HQ1K-part1             /media/sda1          ext3       acl,user_xattr        1 2
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0

Hmm, that did not work. I’ll have to figure out how to make Yast automatically mount it every time I start up.

Oh, I see what I was doing wrong. I had “do not mount at startup” checked. I unchecked it, and now it’s mounting at startup, which is what I wanted. Thanks for your help everyone!

YaST does not mount at all at startup. Mount at boot (normal file systems) is done via fstab.

When you want any help, please be more helpfull to us. When you say that working with YaST as shown here does not work for you then please tell what happened, what went wrong and where, etc. Only saying: “it does not work” will not get you any further.

Edit: missed your last post. Ok now

Ok, I’ll try to post more information in the future.

I’m still having a problem, which is that I have to be SuperUser to edit anything in my storage partition, sda1. I want to be able to write changes to it as a normal user.

I went to the /media directory and did ls -la to see the partitions:


linux:/media # ls -la
total 28
drwxr-xr-x  7 root root 4096 2008-06-29 16:27 .
drwxr-xr-x 21 root root 4096 2008-06-29 16:27 ..
drwx------  2 root root 4096 2008-06-14 16:17 disk
drwxr-xr-x  2 root root 4096 2008-02-26 20:37 dvd
-rw-r--r--  1 root root    0 2008-06-29 16:27 .hal-mtab
drwxr-xr-x  6 root root 4096 2008-06-22 21:32 sda1
drwxr-xr-x  2 root root 4096 2008-02-26 20:25 sdb1
drwxr-xr-x  2 root root 4096 2008-06-20 15:51 thumb

I want to be able to make folders and move files around in the sda1 partition without having to be SuperUser. I tried doing “chmod 775 /sda1”, but after that, here’s what it looked like:

linux:/media # ls -la
total 28
drwxr-xr-x  7 root root 4096 2008-06-29 16:27 .
drwxr-xr-x 21 root root 4096 2008-06-29 16:27 ..
drwx------  2 root root 4096 2008-06-14 16:17 disk
drwxr-xr-x  2 root root 4096 2008-02-26 20:37 dvd
-rw-r--r--  1 root root    0 2008-06-29 16:27 .hal-mtab
drwxrwxr-x  6 root root 4096 2008-06-29 16:41 sda1
drwxr-xr-x  2 root root 4096 2008-02-26 20:25 sdb1
drwxr-xr-x  2 root root 4096 2008-06-20 15:51 thumb

and it still would not let me create folders in sda1 without being SU.

I will try to figure this out by myself, I don’t expect you to do all the work for me. But if you see an obvious mistake I’m making, I wouldn’t mind if you pointed it out :slight_smile:

I suppose this is a typo in your post: chmod 775 /sda1.
Should be chmod 755 /media/sda1 or, while you are already in /media, chmod sda1.

It was 755 (rwxr-xr-x) and you made it 775 (rwxrwxr-x), I do not understand your **but after that, here’s what it looked like:
**. It looks exectly as it is and it is what you made it.

Why did you 775?? it means that the owner (user root) and those belonging to the group (group root) can read, write and search the directory and that the world (all other users) can only read and search. So obvious it should be 777 to make it world writeable!

Btw do you realy want to have that disk space at /media? When it is your space as normal user it looks more logical to me to mount it at e.g. /home/<user>/music or any other place and name inside your personal home directory. But that is your choice.

Oh, I didn’t know you could mount it anywhere. I thought you had to mount all hard drives and flash drives at /media. Also, I didn’t know that it was ok to chmod 777 an additional hard drive. I thought that was a security vulnerability that would make it susceptible to cracking.

Ok, I fixed my hard drive so that it’s a 777, and mounted in my home folder. Thanks for your help hcw!

I think you should forget some old habits from others Operating Systems. A partition (part of a disk, called hard drive by you, but floppies are the same), once mounted are a normal part of the directory tree. So you can let it be owned by any user. When it is mounted in the home dirctory of a user it you can also chown the directory to that user and then the user (or root) can chmod to something like 755. Same as any directory or file inside that users home directory. The same security as everywhere in the system.

/media is nothing particular, only a place where people happen to mount CDs and DVDs, but that is only a convention or habbit. There is no magic in computers! Why should /media be something different then /aap/noot/mies/wim?