unable to write to second hard drive

Asked by pete smout

Hi,
I've added a second (160gb) hard disc into my machine (running ubuntu 8.10) for storage of files but am unable to write any file to it!! apparently I dont have permission! having played around a bit I am unable to change permissions by right-clicking on the icon and going to the permissions tab as is says permissions could not be determined. I have root user privileges and the sudo password to hand and have tried mounting the disk from the terminal using 'sudo mount' and can still not write anything to the disk!

The disk is formatted using GParted to EXT3 (although this I can do again as I have not put anything onto it yet, if this is incorrect!)

I'm sure it is something I have overlooked as I am still a relative noobie to this wonderful world of LInux / Ubuntu, and would be grateful if anyone can show me where I'm going wrong.

Many thanks in advance for any suggestions

Pete

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu util-linux Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

You need to add an entry in /etc/fstab to add the options you need to allow writability to the partition at mount time (you don't mount drives)

If you can give the output of:

mount; sudo fdisk -l; sudo blkid; cat /etc/fstab

Then I can advise

Revision history for this message
pete smout (petersmout03) said :
#2

thanks for the help, here's the output of the request......

pete@Petes-PC:~$ mount; sudo fdisk -l; sudo blkid; cat /etc/fstab
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
/proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,nosuid,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
rootfs on / type rootfs (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
lrm on /lib/modules/2.6.27-16-generic/volatile type tmpfs (rw,mode=755)
securityfs on /sys/kernel/security type securityfs (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/pete/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=pete)
/dev/sdb1 on /media/disk type ext3 (rw,nosuid,nodev,uhelper=hal)
[sudo] password for pete:

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x70987098

   Device Boot Start End Blocks Id System
/dev/sda1 * 1 60235 483837606 83 Linux
/dev/sda2 60236 60801 4546395 5 Extended
/dev/sda5 60236 60801 4546363+ 82 Linux swap / Solaris

Disk /dev/sdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xcdb1cdb1

   Device Boot Start End Blocks Id System
/dev/sdb1 1 19456 156280288+ 83 Linux
/dev/sda1: UUID="09d12038-d238-42b6-a626-c8c194dbc6e6" TYPE="ext3"
/dev/sda5: TYPE="swap" UUID="a1130256-5348-47ae-aeb8-1a1b7da18366"
/dev/sdb1: UUID="dade41a6-f538-4722-9062-c166c3db4b82" SEC_TYPE="ext2" TYPE="ext3"
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda1
UUID=09d12038-d238-42b6-a626-c8c194dbc6e6 ext3 relatime,errors=remount-ro 0 1
# /dev/sda5
UUID=a1130256-5348-47ae-aeb8-1a1b7da18366 none swap sw 0 0
/dev/scd1 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
pete@Petes-PC:~$

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

ok great run:

sudo mkdir /media/usb; gksudo gedit /etc/fstab

add these 2 lines:

# /dev/sdb1
UUID=dade41a6-f538-4722-9062-c166c3db4b82 /media/usb ext2 user,uid=1000,rw 0 0

Press enter on the end of the line too. Save the new file and close gedit, then reboot. When you now attach the device, the partition UUID will be seen and noticed in fstab, then mounted using the settings defined there.

Revision history for this message
pete smout (petersmout03) said :
#4

hi,
me again.....tried that now i get .......

Invalid mount option when attempting to mount the volume.

probably my fault! After a short time i get this error....

  DBus error org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

my 'fstab' file now look like this

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda1
UUID=09d12038-d238-42b6-a626-c8c194dbc6e6 ext3 relatime,errors=remount-ro 0 1
# /dev/sdb1
UUID=dade41a6-f538-4722-9062-c166c3db4b82 /media/usb ext2 user,uid=1000,rw 0 0
# /dev/sda5
UUID=a1130256-5348-47ae-aeb8-1a1b7da18366 none swap sw 0 0
/dev/scd1 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0

hope i put it in the right place!
sorry to be a pain

pete

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

Looks fine to me. Does the system boot? If so can you run:

sudo mount /media/usb

Thanks

Revision history for this message
pete smout (petersmout03) said :
#6

hi,
yep system boots fine!
heres the results....

pete@Petes-PC:~$ sudo mount /media/usb
[sudo] password for pete:
mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail or so

pete@Petes-PC:~$
don't know if there is a misunderstanding nut the hdd I'm trying to use is an internal IDE one not external usb, don't know if this is relevant but thought I'd mention it!

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#7

ok run:

gksudo gedit /etc/fstab

and change:
UUID=dade41a6-f538-4722-9062-c166c3db4b82 /media/usb ext2 user,uid=1000,rw 0 0
to:
UUID=dade41a6-f538-4722-9062-c166c3db4b82 /media/usb auto user,uid=1000,rw 0 0

Save the new file, close gedit then run:

sudo mount /media/usb

See how that goes.

Revision history for this message
pete smout (petersmout03) said :
#8

hi again,

no joy I'm afraid here's the error msg.....

pete@Petes-PC:~$ sudo mount /media/usb
mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail or so

pete@Petes-PC:~$

thanks for your help

Revision history for this message
pete smout (peter-smout) said :
#9

Hi,
Good news & bad news, good first, I can now mount my second hard drive, i achieved this by re-formatting (in g-parted) and making the entire disk a 'primary partition', (I would of thought this was obvious as there was no other partition on it, but apparently not!) and now I can mount the device (hooray).

The bad news is that now I'm back to the original problem of not being able to use it as I don't have permission! I have not changed the 'fstab' file or the device id from earlier in this post, and I've tried mounting it from the terminal using 'sudo mount' with no joy.

Also something else is puzzling me (perhaps I should start a new thread sorry if not following the correct protocols on this wonderfully helpful forum) but shouldn't a newly formatted disk be blank? it has one (unreadable) file on it called 'lost+found'. Why is this here?

thanks in advance for your continued support.

Revision history for this message
pete smout (peter-smout) said :
#10

Hi,

After goggling this issue i have found what i would deem to be a work-around solution of:

<alt-f2> - type 'gksudo nautilus'

this give me a 'root' file browser from which i can put files onto the disk.
Surely this is only a workaround not a permanent solution! if any body has a more multi user friendly solution please let me know

Thanks

Pete

Revision history for this message
Launchpad Janitor (janitor) said :
#11

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
pete smout (petersmout03) said :
#12

Hi,
I am still using the <alt f2> 'gksudo nautilus' workaround I have tried changing the permissions of the files on the disk through GUI and discovered that the 'apply permissions to enclosed files & folders' button does not work! as explained in https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/165113.

I believe this should have sorted by now known bug since 2007 but hey only a small thing!

I also think that if I were to 'sudo chown' from terminal this would work, if so I am unsure of the path to put after the command and I am very cautious about doing it incorrectly if anyone could advise me I would be grateful.

Regards

Pete

Revision history for this message
Mike Cap (nancy-mike) said :
#13

"good", i have exactly same problem, including the "lost+found folder. I am glad it's already being worked on.

Revision history for this message
delance (olivier-delance) said :
#14

Are you still using 8.10 ? Now, 8.10 is unsupported, and you will have difficulties to get some help, as most people use 10.04, 11.04 or 11.10. And way of managing external drive has changed.
To change ownership, you can use
   chown -R pete:pete /media/usb

Revision history for this message
Mike Cap (nancy-mike) said :
#15

delance -- i am running 10.10 and have the same problem. BTW, we are both talking about INTERNAL HDD, not USB.
I am not a technical user, but i find it strange the "Users and Groups" doesn't see the second drive, so the permissions can't be set.

Revision history for this message
delance (olivier-delance) said :
#16

@Mike: could you provide /etc/fstab

Can you help with this problem?

Provide an answer of your own, or ask pete smout for more information if necessary.

To post a message you must log in.