How to gain full access to internal HDD's

Asked by SK

I am running Ubuntu 9 64bit. My machine has 3 internal HDD.

Ubuntu was installed on one of them which I can access, however, I cannot access the other two.

Root can mount and write to them, but I cannot.

I need them to mount at system startup and allow me to write to them.

I am mainly a Windoz user (sorry), so am used to having access to all drives right after the OS has been installed. :-)
_____________________

Contents of fstab:

# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# / was on /dev/sda1 during installation
UUID=1cc382a1-fb02-4071-a8b2-bcce64b37c55 / ext3 relatime,errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=9efe9ac8-6128-4d31-a486-337dd09348bf none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
____________________

I look forward to your help in this matter.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
SK
Solved:
Last query:
Last reply:
Revision history for this message
Bart de Koning (bratdaking) said :
#1

Hey,

You are on the right track - you can enter them in the fstab file manually
open a terminal. First you have to make directories where you want to mount (connect them to the file tree) the drives
a standard place is /mnt/whatever-you-like, another is /media/whatever-you-like. The latter is used actually by hotplugable media like SD cards and DVD's. Ubuntu should make automatic mounting points for your other drives there. Isn't that happening?

If you want to mount them on /mnt/whatever-you-like, typ "cd /mnt"
and make dirs for all the partitions that you want to mount, like "sudo mkdir data"

now enter "blkid" the UUID's of the partitions are important
open the fstab file in an editor with administrator rights by entering the next command:
sudo gedit /etc/fstab
now you can add the UUID's for your other partitions like (go to the terminal select the UUID, go back to gedit and push the middle mouse button to copy&paste, ctrl-shift-c in the terminal and ctrl-c in gedit works also, but be carefull ctrl-c in the terminal stops the running program, so it kills gedit then):
UUID=numbers-and-letters[tab]/mnt/data[tab]ext3[tab]relatime[tab]0[tab]2
let me explain:
UUID=identifier
/mnt/data=mounting point, only one partition per point
ext3 = the filesystem, could also be FAT32, or NTFS for Windows
relatime = additional options, for FAT32 and NTFS don't use relatime, but defaults, you could use defaults,noexec,uid=1000,gid=1000 (for not executing binaries, and userid 1000 and groupid 1000, that way the main user is able to write and read files), more options are possible, typ "man mount" for a complete updated list
0 = option for backups, a backup system that is not really in use anymore, at least I don't use it
2 = for file system checking during boot, it will be the second drive that will be checked

more info: https://help.ubuntu.com/community/Fstab

So with the options uid, and gid you can set the id's for the partition (you can find your ID number in the administration, users and groups module), for FAT32 or NTFS that could be handy, for other filesystems I do not recommend such a thing as the ownership of the file is incorporated already in the filesystem.
 If you want to have write acces to a folder on such a system change the ownership of the folder and files by using "sudo chown yourname:yourname name-file-or-folder", in case of a folder use "sudo chown -R yourname:yourname name-folder", this way underlying files and folders are also recursively changed.

Hope this answered your question and I hope it was a little clear...
Cheers

Revision history for this message
SK (skeatinge) said :
#2

Hello Bart,

Thank you for the fast reply. I have added the following to my fstba and then rebooted:

UUID=de2e479d-8ae8-48ef-9fde-4500ff35e1ab /mnt/sdb ext3 relatime,errors=remount-ro 0 2
UUID=ea188926-45a7-49c2-bbea-5fe2486b2c2a /mnt/sdc ext3 relatime,errors=remount-ro 0 3

My two additional HDD are no longer displayed in my computer list, however, they are now accessible via their mount points on startup.

Unfortunately, I still cannot write to them. I couldn't quite understand if I needed to add uid=1000,gid=1000 to the fstab or use chown or use something else, so could you please clarify this for me.

SK

Revision history for this message
midnightflash (midnightflash) said :
#3

Try

     umask=000

instead of uid or gid.
That should everyone give all rights. (Just be aware... the folders might have their own right too. So it might be neccessary to use

        sudo chmod -777 /mnt/sdc/bla...

too)

Revision history for this message
SK (skeatinge) said :
#4

In the end, I used chown user:group /mnt/sdb chown user:group /mnt/sdc

I then created a folder in each, created a link of that folder, and cut & pastd the link to my desktop.