Announcement

Collapse
No announcement yet.

[SOLVED| adding hard drive

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED| adding hard drive

    Hello Everyone
    I just installed Kubuntu 8.04 in a dual boot with windows 2000. I have a sata drive (250 GB , sdb1) and a pata drive (300 GB). I installed the pata drive(/dev/sda1) and then partitioned it and formatted it with GParted while running Kubuntu. I added the following line to fstab
    /dev/sda1 /media/data vfat defaults, 0 0
    Also I ran the command "chmod 777 /media/data" the mount point for the drive to enable write privileges.
    My problem is I can't write to the drive and although I altered fstab the drive(sda1) didn't show when I looked in the storage media folder. Strange is that w2k can read and write to the drive.
    Anyone have a clue what is the problem or what i did wrong?

    Thanks

    #2
    Re: adding hard drive

    forgot to mention the pata drive(sda1) is formatted as fat 32

    Comment


      #3
      Re: adding hard drive

      Hi,

      could you let us have a copy of your fstab, the output of
      Code:
      sudo blkid
      and for the sake of completeness also
      Code:
      df -h
      Thanks
      Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

      Comment


        #4
        Re: adding hard drive

        dan@dan:~$ sudo blkid
        [sudo] password for dan:
        /dev/sda1: UUID="484D-3AB3" TYPE="vfat"
        /dev/sdb1: UUID="060570C25C6E83A9" TYPE="ntfs"
        /dev/sdb5: UUID="c4fddcdd-a908-42af-ad54-af0cbcf3769f" TYPE="ext3"
        /dev/sdb6: TYPE="swap" UUID="94134d11-8228-4db5-bed6-136f9f80d239"
        /dev/sdc1: LABEL="TRAVELDRIVE" UUID="D010-8529" TYPE="vfat"
        dan@dan:~$ df -h
        Filesystem Size Used Avail Use% Mounted on
        /dev/sdb5 187G 6.2G 171G 4% /
        varrun 1014M 156K 1014M 1% /var/run
        varlock 1014M 0 1014M 0% /var/lock
        udev 1014M 64K 1014M 1% /dev
        devshm 1014M 0 1014M 0% /dev/shm
        lrm 1014M 38M 977M 4% /lib/modules/2.6.24-18-generic/volatile
        /dev/sda1 280G 5.6G 274G 2% /media/data

        Comment


          #5
          Re: adding hard drive

          Try changing the line,

          /dev/sda1 /media/data vfat defaults, 0 0

          to

          /dev/sda1 /media/data vfat user,rw, 0 0

          and see if that works.

          Comment


            #6
            Re: adding hard drive

            I altered fstab and the drive mounts fine, however i still can't write to the drive.

            Comment


              #7
              Re: adding hard drive

              and the fstab please...
              Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

              Comment


                #8
                Re: adding hard drive

                # /etc/fstab: static file system information.
                #
                # <file system> <mount point> <type> <options> <dump> <pass>
                proc /cdrom iso9660 defaults 0 0
                # /dev/sda5
                UUID=c4fddcdd-a908-42af-ad54-af0cbcf3769f / ext3 nouser,relatime,errors=remount-ro,atime,auto,rw,dev,exec,suid 0 1
                # /dev/sda6
                UUID=94134d11-8228-4db5-bed6-136f9f80d239 none swap sw 0 0
                /dev/scd0 /media/cdrom0 udf,iso9660 user,utf8,atime,noauto,rw,dev,exec,suid 0 0
                /dev/fd0 /media/floppy0 auto user,utf8,atime,noauto,rw,dev,exec,suid 0 0
                /dev/sda1 /media/data vfat user,rw, 0 0

                Comment


                  #9
                  Re: adding hard drive

                  Thanks!

                  Just so that we have some info.

                  Could you now have a look at/post the output of
                  Code:
                  ls -la
                  from the within the /media directory so we can have a look at the rights.
                  Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

                  Comment


                    #10
                    Re: adding hard drive

                    total 2580
                    drwxr-xr-x 29 dan dan 36864 2008-06-12 08:16 .
                    drwxr-xr-x 3 root root 4096 2008-06-07 22:14 ..
                    drwx------ 3 dan dan 4096 2008-06-08 14:28 .adobe
                    -rw------- 1 dan dan 1322 2008-06-12 07:48 .bash_history
                    -rw-r--r-- 1 dan dan 220 2008-06-07 22:14 .bash_logout
                    -rw-r--r-- 1 dan dan 2928 2008-06-07 22:14 .bashrc
                    -rwxrwxrwx 1 dan dan 2364774 2008-06-08 00:38 bookmarks.html
                    drwxr-xr-x 3 dan dan 4096 2008-06-08 11:35 .config
                    -rw-r--r-- 1 dan adm 50 2008-06-12 07:50 .DCOPserver_dan__0
                    lrwxrwxrwx 1 dan adm 28 2008-06-12 07:50 .DCOPserver_dan_:0 -> /home/dan/.DCOPserver_dan__0
                    drwxr-xr-x 2 dan dan 4096 2008-06-12 06:26 Desktop
                    -rw------- 1 dan dan 26 2008-06-08 10:52 .dmrc
                    drwxr-xr-x 2 dan dan 4096 2008-06-11 07:25 Documents
                    drwxr-xr-x 2 dan dan 4096 2008-06-09 08:02 .fontconfig
                    drwxr-xr-x 2 dan dan 4096 2008-06-09 08:02 .fonts
                    -rw-r--r-- 1 dan dan 514 2008-06-08 16:20 .fonts.conf
                    drwx------ 2 dan dan 4096 2008-06-12 07:52 .gconf
                    drwx------ 2 dan dan 4096 2008-06-12 07:52 .gconfd
                    -rw-r----- 1 dan dan 0 2008-06-09 10:11 .gksu.lock
                    drwx------ 3 dan adm 4096 2008-06-12 07:41 .gnome2
                    drwx------ 2 dan adm 4096 2008-06-12 07:41 .gnome2_private
                    -rw-r--r-- 1 dan dan 25507 2008-06-08 11:28 .gtk_qt_engine_rc
                    -rw-r--r-- 1 dan dan 285 2008-06-08 10:52 .gtkrc-2.0-kde
                    -rw------- 1 dan adm 183 2008-06-12 07:50 .ICEauthority
                    drwx------ 5 dan dan 4096 2008-06-08 10:52 .kde
                    drwx------ 3 dan dan 4096 2008-06-08 10:52 .local
                    drwx------ 3 dan dan 4096 2008-06-08 14:28 .macromedia
                    drwxr-xr-x 3 dan dan 4096 2008-06-08 10:52 .mcop
                    -rw------- 1 dan dan 31 2008-06-08 11:43 .mcoprc
                    drwx------ 4 dan dan 4096 2008-06-08 14:53 .mozilla
                    drwxr-xr-x 2 dan dan 20480 2008-06-12 10:34 Music
                    drwxr-xr-x 4 dan dan 4096 2008-06-12 10:34 .pan2
                    drwxr-xr-x 2 dan dan 4096 2008-06-08 10:52 Pictures
                    -rw-r--r-- 1 dan dan 586 2008-06-07 22:14 .profile
                    drwxr-xr-x 2 dan dan 4096 2008-06-08 10:52 Public
                    drwxr-xr-x 2 dan dan 4096 2008-06-08 15:37 .pulse
                    -rw------- 1 dan dan 256 2008-06-08 15:37 .pulse-cookie
                    drwxr-xr-x 2 dan dan 4096 2008-06-12 07:50 .qt
                    -rw-r--r-- 1 dan dan 218 2008-06-11 18:27 .recently-used.xbel
                    drwx------ 4 dan dan 4096 2008-06-12 07:50 .strigi
                    -rw-r--r-- 1 dan dan 0 2008-06-08 10:53 .sudo_as_admin_successful
                    drwxr-xr-x 2 dan dan 4096 2008-06-08 10:52 Templates
                    drwx------ 4 dan dan 4096 2008-06-08 11:30 .thumbnails
                    drwxr-xr-x 2 dan dan 4096 2008-06-08 10:52 Videos
                    drwxr-xr-x 3 dan dan 4096 2008-06-08 16:00 .vlc
                    -rw------- 1 dan adm 158 2008-06-12 07:50 .Xauthority
                    drwxr-xr-x 2 dan dan 4096 2008-06-10 17:33 .xine
                    -rw------- 1 dan dan 20305 2008-06-12 13:09 .xsession-errors

                    Comment


                      #11
                      Re: adding hard drive

                      Cheers, but that is the wrong directory

                      It looks very much like you home directory, I was after your /media directory...
                      Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

                      Comment


                        #12
                        Re: adding hard drive

                        sorry my mistake

                        total 76
                        drwxr-xr-x 6 root root 4096 2008-06-12 08:16 .
                        drwxr-xr-x 21 root root 4096 2008-06-08 11:10 ..
                        lrwxrwxrwx 1 root root 6 2008-06-07 21:56 cdrom -> cdrom0
                        drwxr-xr-x 2 root root 4096 2008-06-07 21:56 cdrom0
                        drwxr-xr-x 5 root root 49152 1969-12-31 19:00 data
                        lrwxrwxrwx 1 root root 45 2008-06-07 21:57 .directory -> /etc/kubuntu-default-settings/directory-media
                        drwxrwxrwx 1 root root 8192 2008-06-11 13:16 disk
                        lrwxrwxrwx 1 root root 7 2008-06-07 21:56 floppy -> floppy0
                        drwxr-xr-x 2 root root 4096 2008-06-07 21:56 floppy0
                        -rw-r--r-- 1 root root 80 2008-06-12 08:16 .hal-mtab
                        -rw------- 1 root root 0 2008-06-12 08:16 .hal-mtab-lock
                        lrwxrwxrwx 1 root root 42 2008-06-07 21:57 .hidden -> /etc/kubuntu

                        Comment


                          #13
                          Re: adding hard drive

                          drwxr-xr-x 5 root root 49152 1969-12-31 19:00 data
                          That is the line we are interested in.

                          The first letter d denotes that it is a directory. The next three letters rwx are for the owner. In this case the owner has read, write and executable rights. The next three letters, r-x are for the group. Group members have read and executable rights but cannot write to media. The last three letters are for others.

                          The root root bit shows us that root is the owner and the group.

                          So there!

                          You want to change the owner to dan and the group to users. To do so type
                          Code:
                          sudo chown dan /media/data
                          and to change the group do
                          Code:
                          sudo chgrp users /media/dan
                          Everything should work as prescribed now. If you also want other users to have write access to that drive you need to give them permission:
                          Code:
                          sudo chmod +w users /media/data
                          Please post back and report.
                          Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

                          Comment


                            #14
                            Re: adding hard drive

                            there seems to be a problem

                            dan@dan:/media$ sudo chown dan /media/data
                            [sudo] password for dan:
                            chown: changing ownership of `/media/data': Operation not permitted
                            dan@dan:/media$ sudo chgrp users /media/dan
                            chgrp: cannot access `/media/dan': No such file or directory
                            dan@dan:/media$ cd /
                            dan@dan:/$ sudo chown dan /media/data
                            chown: changing ownership of `/media/data': Operation not permitted

                            Comment


                              #15
                              Re: adding hard drive

                              Hm, not sure why that should be. Perhaps somebody else can enlighten us?

                              In the meantime try and remove it doing a
                              Code:
                              sudo rm -r /media/data
                              Now recreate it with
                              Code:
                              sudo mkdir /media/data
                              Now try changing the permissions again.
                              Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

                              Comment

                              Working...
                              X