PDA

View Full Version : [ubuntu] 8.10 Cant mount second hard drive



James42
December 7th, 2008, 07:11 PM
I recently made the switch to Ubuntu 8.10 and I cant access my second hard drive. I have tried formating it ext3 and ext2 but neither worked. it appears on my desktop but when I mount it I cant write anything to it all the permissions belong to root. could somebody please help a noob in need.

Pumalite
December 7th, 2008, 07:58 PM
What's the format at the moment?

taurus
December 7th, 2008, 08:00 PM
Leave it as either ext2 or ext3. Then, add an entry in /etc/fstab to have it mount automatically each time you boot Ubuntu. Now, all you have to do is to change the mount point of that drive from root to your login name, giving you full access to that drive/mount point without using sudo or gksudo.


sudo fdisk -l
sudo blkid
cat /etc/fstab
id

James42
December 7th, 2008, 08:14 PM
Leave it as either ext2 or ext3. Then, add an entry in /etc/fstab to have it mount automatically each time you boot Ubuntu. Now, all you have to do is to change the mount point of that drive from root to your login name, giving you full access to that drive/mount point without using sudo or gksudo.


sudo fdisk -l
sudo blkid
cat /etc/fstab
id

Could you explain in detail how to do this? I am a brand-new Linux user, and am not familiar with it.

Thanks.

taurus
December 7th, 2008, 08:33 PM
Open a terminal, Applications -> Accessories -> Terminal, and type in one line at a time. Post the outputs here and I (or somebody else) will walk you through adding your second harddrive to your /etc/fstab so it would mount automatically upon boot.

James42
December 7th, 2008, 08:43 PM
joe@joe:~$ sudo fdisk -l
[sudo] password for joe:

Disk /dev/sda: 80.0 GB, 80032038912 bytes
255 heads, 63 sectors/track, 9730 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x87ab87ab

Device Boot Start End Blocks Id System
/dev/sda1 1 9328 74927128+ 83 Linux
/dev/sda2 9329 9730 3229065 5 Extended
/dev/sda5 9329 9730 3229033+ 82 Linux swap / Solaris

Disk /dev/sdb: 203.9 GB, 203928109056 bytes
255 heads, 63 sectors/track, 24792 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x5f587a83

Device Boot Start End Blocks Id System
/dev/sdb1 1 24792 199141708+ 83 Linux
joe@joe:~$ sudo blkid
/dev/sdb1: UUID="f75ddf72-138b-4ca9-a9a8-571cd6d5b9c8" TYPE="ext3" SEC_TYPE="ext2"
/dev/sdc1: UUID="3bf2b557-0073-4a40-a50f-787b6bafb178" SEC_TYPE="ext2" TYPE="ext3"
/dev/sda1: UUID="3bf2b557-0073-4a40-a50f-787b6bafb178" SEC_TYPE="ext2" TYPE="ext3"
/dev/sda5: TYPE="swap" UUID="2f910e11-9d97-403a-b8a3-4dfc40836237"
joe@joe:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sdb1
UUID=3bf2b557-0073-4a40-a50f-787b6bafb178 / ext3 relatime,errors=remount-ro 0 1
# /dev/sdb5
UUID=2f910e11-9d97-403a-b8a3-4dfc40836237 none swap sw 0 0
/dev/sda /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
joe@joe:~$ id
uid=1000(joe) gid=1000(joe) groups=4(adm),20(dialout),24(cdrom),46(plugdev),10 8(lpadmin),123(admin),124(sambashare),1000(joe)
joe@joe:~$

taurus
December 7th, 2008, 08:50 PM
Looks like you want to add /dev/sdb1. From a terminal, edit your /etc/fstab


gksudo gedit /etc/fstab
and add this line to the end of it.



UUID=f75ddf72-138b-4ca9-a9a8-571cd6d5b9c8 /media/sdb1 ext3 defaults 0 2
Save it and close down gedit editing window. Then, create a new mount point and mount it.


sudo mkdir /media/sdb1
sudo mount -a
df -h
The last step is to change the ownership of /media/sdb1 from root to your login name, joe, so you can write to it anytime you want.

Run


sudo chown -R joe:joe /media/sdb1
ls -la /media
You should see from the output of the second command (above) that you are now the owner of /media/sdb1. Test it by copying something to /media/sdb1 as joe.

James42
December 7th, 2008, 08:55 PM
Thanks a ton, it works perfectly. :)

I really appreciate the help, I'm completely new to this.

skatinskill262
December 7th, 2008, 08:58 PM
I have the same problem, could i post my outputs here?

I understand where you got some of the code out of his outputs but not all of it.

EDIT: Actually, i can't post the outputs here. I have no way of connecting to the internet on the computer with my mounting problem, internet is another problem im having on that ubuntu computer.

taurus
December 7th, 2008, 09:00 PM
I have the same problem, could i post my outputs here?

I understand where you got some of the code out of his outputs but not all of it.

Sure, if you want to piggyback on his thread. ;)

skatinskill262
December 7th, 2008, 09:08 PM
well i was using the live CD to resurrect my Windows OS that was stuck in a neverending reboot cycle, but when i got ubuntu up and running i went to places > computer and all it says was my RW drive and my CDROM drive, and filesystem. My 120gb hd wasnt shown like it should be, says the tutorial i was following. Through troubleshooting i found that my harddrive is /dev/sda1. Gparted recognizes it, but i went through the applications to find a mounting app, which i did, but it needs the internet to install.

Which i then tried, and i have no connection to my wired router/home network/or internet.

taurus
December 7th, 2008, 09:15 PM
So you want to mount /dev/sda1 which is a ntfs filesystem so you can recover your files from it. You can try to force mount it with


sudo mkdir /media/windows
sudo mount -t ntfs-3g /dev/sda1 /media/windows -o force
df -h

skatinskill262
December 7th, 2008, 09:18 PM
im sorry i didn't clarify, /dev/sda1 is a fat32

would i just replace ntfs with fat32 in the code?

taurus
December 7th, 2008, 09:24 PM
sudo mkdir /media/windows
sudo mount -t vfat /dev/sda1 /media/windows -o umask=000
df -h

lovelyvik293
December 7th, 2008, 09:25 PM
If it's FAT32 then just delete the ntfs-3g part of the command you dont have to mention the drive format.

skatinskill262
December 7th, 2008, 09:32 PM
if i did this correctly, putting each line in individually in the terminal. the first line gave me no output, set second line gave me a big list of the correct usage of the command 'mount' and the third one game me some percentages.

EDIT: found a typo, the hard drive is now mounted. thank you.
now im gonna go rumble through the forums to find out how to connect to my home network =]

sphynx_25
March 24th, 2009, 12:16 AM
Hey all,

I had the exact same problem as described in this thread so I followed the advice given and lo and behold it worked, my second drive is now mounted.

Unfortunately, I don't seem to have permission to do anything. There is one folder in there "lost+found" which appeared by itself. If I try to open it I am told I do not have permission to view the contents of that folder. Options such as create folder, etc. are also not available. It seems I can't read or write to this directory, even though I followed the same steps given to grant permission.

Any advice would be greatly appreciated guys.
El.

--- I had forgotten that I had already posted this problem in another thread. It's sorted now. Thanks anyway ^-^ ---