Added a second hard drive and can not access it.

Asked by BrianO

Added a second hard drive and formatted it to EXT3. Wanted it to mount at boot and now having problems. I also got some permission errors with the main drive but they seem to have cleared.

brian@brian-desktop:~$ fdisk -l
Cannot open /dev/sda
Cannot open /dev/sdb

I can mount sda volume and view contents, but when I try to mount sdb I get "you are not privledged to mount this volume"

# /etc/fstab: static file system information.
#
# -- This file has been automaticly generated by ntfs-config --
#
# <file system> <mount point> <type> <options> <dump> <pass>

proc /proc proc defaults 0 0
# Entry for /dev/sda5 :
UUID=d4d6788b-b1bd-4248-acc7-6e3087eccf53 / ext3 relatime,errors=remount-ro 0 1
# Entry for /dev/sda6 :
UUID=255f1f9a-290a-4bc0-9169-e9f4defcf01e none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/sdb1 /media/Data ext3 defaults 01

P.S. When this issue is resolved I will also be adding an LG DVD burner.

thanks,
Brian

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu util-linux Edit question
Assignee:
No assignee Edit question
Solved by:
Wyatt Smith
Solved:
Last query:
Last reply:
Revision history for this message
Caesar (shcaesar) said :
#1

Hi Brian0,

First, you need root privilege to make sure you can access any info you want. Thus, 1. add "sudo" before you issue any command like fdisk or, 2. login as root before you perform those operations.

Second, if you have formated you HD, typically, when you after resizing a partition, you need to recalculate there UUIDs for the fstab. The utility to calculate a UUID is vol_id (sudo vol_id /dev/sd[a,b][1-9]).

Good luck!

Revision history for this message
Best Wyatt Smith (wyatt-smith) said :
#2

Your /etc/fstab is missing a space between the 0 and 1, please edit with these parameters

gksu gedit /etc/fstab

Then change last line to

/dev/sdb1 /media/Data ext3 relatime,errors=remount-ro 0 1

Then to mount all drives in fstab, from the terminal type

sudo mount -a

To change ownership and permission

sudo chown -R $USER:$USER /media/Data
sudo chmod -R 750 /media/Data

To mount the drive manually

sudo mkdir /media/Data
sudo mount -t ext3 /dev/sdb1 /media/Data

Hope this helps

Revision history for this message
BrianO (orfordbf) said :
#3

Wyatt,

Modified fstab successfully by got the following errors:

brian@brian-desktop:~$ sudo mount -a
[sudo] password for brian:
mount: mount point /media/Data does not exist
brian@brian-desktop:~$ sudo chown -R $USER:$USER /media/Data
chown: cannot access `/media/Data': No such file or directory
brian@brian-desktop:~$ sudo chmod -R 750 /media/Data
chmod: cannot access `/media/Data': No such file or directory
brian@brian-desktop:~$

Caesar,

Not sure what you mean but I ran it as follows?

brian@brian-desktop:~$ sudo vol_id /dev/sd[a,b][1-9]
ID_FS_USAGE=filesystem
ID_FS_TYPE=vfat
ID_FS_VERSION=FAT16
ID_FS_UUID=3B28-11DB
ID_FS_UUID_ENC=3B28-11DB
ID_FS_LABEL=
ID_FS_LABEL_ENC=
ID_FS_LABEL_SAFE=

Revision history for this message
BrianO (orfordbf) said :
#4

also adding:
brian@brian-desktop:~$ sudo fdisk -l
[sudo] password for brian:

Disk /dev/sda: 10.2 GB, 10254827520 bytes
255 heads, 63 sectors/track, 1246 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x4e584ab5

   Device Boot Start End Blocks Id System
/dev/sda1 * 1 5 40131 c W95 FAT32 (LBA)
/dev/sda2 6 1246 9968332+ 5 Extended
/dev/sda5 6 1187 9494383+ 83 Linux
/dev/sda6 1188 1246 473886 82 Linux swap / Solaris

Disk /dev/sdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xa90f112d

   Device Boot Start End Blocks Id System
/dev/sdb1 1 9729 78148161 83 Linux

Revision history for this message
Wyatt Smith (wyatt-smith) said :
#5

Sorry, you must create the directory for the mountpoint first. Please create the following directory

sudo mkdir /media/Data

Then retry the other commands

Revision history for this message
BrianO (orfordbf) said :
#6

Thanks to both of you, especially Wyatt.

To recap the steps that worked:
1) open terminal
2) "sudo mkdir /media/Data"
3) "gksu gedit /etc/fstab"
4) edit file by adding the line "/dev/sdb1 /media/Data ext3 relatime,errors=remount-ro 0 1" making sure the drive reference IS actually sdb1 from Partition Editor
5) "sudo mount -a" to mount all drives listed in fstab
6) "sudo chown -R $USER:$USER /media/Data" & "sudo chmod -R 750 /media/Data" to change ownership

After rebooting the computer, all drives show on the desktop and are accessible.

Thanks again,
Brian

Revision history for this message
BrianO (orfordbf) said :
#7

Thanks Wyatt Smith, that solved my question.