Announcement

Collapse
No announcement yet.

[SOLVED!] Mounting Hard drives!!!!!

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

    [SOLVED!] Mounting Hard drives!!!!!

    I deleted a couple of files which I backed up, and I need to move back into a directory from the command line. Everytime I try to do it though, I get a "Read-only file system" message.

    I am trying the following command...

    sudo cp fstab /etc

    sudo cp fstab.pre-ntfs-config


    #2
    Re: HELP!!!!!

    You have two files - fstab and fstab.pre-ntfs-config you want to copy back into the /etc folder. Okay, easy enough.
    From the console, ensure you are in the directory that contains these two files (your backup directory). Then type:
    Code:
    sudo cp fstab fstab.pre-ntfs-config /etc
    You have to use sudo cp as the destination ( /etc ) is a directory containing files owned by root. As a non-root user you can't copy files there.
    Windows no longer obstructs my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Re: HELP!!!!!

      I figured it out...

      I needed to open the files first, so linux could find the sudo user first. so, my first step was to open fstab, and then do a cp command...

      I still can't seem to write to the drive though, which is getting a little frustrating....

      Comment


        #4
        Re: HELP!!!!!

        Even if you open the files on your backup directory (they are owned by you, the non-root user almost assuredly), you have to do so as root if you intend to save them in a root owned directory. In 8.10 this isn't "straight forward" as I learned by trail and error, but still simple to do.

        Alt+F2 and type: kdesudo /usr/bin/kate [path_to_your_backups]/fstab
        This will launch Kate "as root" and open the file. You can then do a Save as... and point to /etc and it will be written to that directory. You can then just click on Open and select the other file and repeat the Save as... procedure.
        Windows no longer obstructs my view.
        Using Kubuntu Linux since March 23, 2007.
        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

        Comment


          #5
          Re: HELP!!!!!

          I deleted the fstab.pre-ntfs-config file all together, because I think i generated that one intitially, and didn't really need it. I formatted the drive through gpart as ext3. still can't access it though...

          Comment


            #6
            Re: HELP!!!!!

            Open a console and type:
            Code:
            sudo fdisk -l
            (that's a lower case L)
            Copy/paste the output into your reply.

            Also, let's look at your fstab file:
            Code:
            cat /etc/fstab
            Copy/paste the output into your reply.
            Windows no longer obstructs my view.
            Using Kubuntu Linux since March 23, 2007.
            "It is a capital mistake to theorize before one has data." - Sherlock Holmes

            Comment


              #7
              Re: HELP!!!!!

              fdisk -l

              Disk /dev/sda: 18.3 GB, 18351959552 bytes
              255 heads, 63 sectors/track, 2231 cylinders
              Units = cylinders of 16065 * 512 = 8225280 bytes
              Disk identifier: 0x6c6c6c6c

              Device Boot Start End Blocks Id System
              /dev/sda1 * 1 2132 17125258+ 83 Linux
              /dev/sda2 2133 2231 795217+ 5 Extended
              /dev/sda5 2133 2231 795186 82 Linux swap / Solaris

              Disk /dev/sdb: 40.0 GB, 40020664320 bytes
              255 heads, 63 sectors/track, 4865 cylinders
              Units = cylinders of 16065 * 512 = 8225280 bytes
              Disk identifier: 0x2d9c782f

              Device Boot Start End Blocks Id System
              /dev/sdb1 1 4865 39078081 5 Extended
              /dev/sdb5 1 4865 39078049+ 83 Linux

              cat /etc/fstab

              britne@britne-desktop:~$ sudo cat /etc/fstab
              UUID=a8d759a6-4d0f-46db-aea1-1ae2155e5fd1 / ext3 defaults 01
              UUID=f148d532-7241-4e6f-8ff0-d92ac56c5e0a swap swap sw 0 0
              UUID=b0098e7f-b258-462d-bacc-c013a95da281 /media/extra ext3 defaults0 0

              /dev/scd1 /media/cdrom0 udf,iso9660 noauto 0 0

              The error I get when trying to mount now...

              An error occurred while accessing 'extra', the system responded:
              org.freedesktop.Hal.Dev
              Device /dev/sdb5 is listed in /etc/fstab
              Refusing to mount


              Comment


                #8
                Re: HELP!!!!!

                I: know the sdb5 entry referred to the original ntfs volumes/partitions before I reformatted everything, so maybe the sdb5 entry is still looking for those partitions.

                Comment


                  #9
                  Re: HELP!!!!!

                  Good. Okay, need to more 'reports' from the console:
                  Code:
                  blkid
                  Copy/paste the output.
                  Code:
                  dir /media
                  Copy/paste the output.
                  Windows no longer obstructs my view.
                  Using Kubuntu Linux since March 23, 2007.
                  "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                  Comment


                    #10
                    Re: HELP!!!!!

                    Originally posted by andreasj64
                    I: know the sdb5 entry referred to the original ntfs volumes/partitions before I reformatted everything, so maybe the sdb5 entry is still looking for those partitions.
                    The results of blkid will confirm this (and I'm confident you are right).
                    Windows no longer obstructs my view.
                    Using Kubuntu Linux since March 23, 2007.
                    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                    Comment


                      #11
                      Re: HELP!!!!!

                      blkid

                      /dev/ramzswap0: TYPE="swap"
                      /dev/sda5: TYPE="swap" UUID="f148d532-7241-4e6f-8ff0-d92ac56c5e0a"
                      /dev/loop0: TYPE="squashfs"
                      /dev/sdb5: LABEL="extra" UUID="b0098e7f-b258-462d-bacc-c013a95da281" SEC_TYPE="ext2" TYPE="ext3"
                      /dev/sda1: UUID="a8d759a6-4d0f-46db-aea1-1ae2155e5fd1" TYPE="ext3"


                      dir /media

                      Back-Up\ Drive cdrom cdrom0 cdrom1

                      hmmm...

                      didn't realize Back-Up Drive was still there... it's an old name



                      Comment


                        #12
                        Re: HELP!!!!!

                        I deleted 'Back-Up Drive' and I'm rebooting now, so give me a moment...

                        Comment


                          #13
                          Re: HELP!!!!!

                          You are missing the extra mount-point in /media

                          Open a console and type:
                          Code:
                          sudo mkdir /media/extra
                          Then type:
                          Code:
                          sudo mount /media/extra
                          Then access the partition. You should now be able to.
                          Windows no longer obstructs my view.
                          Using Kubuntu Linux since March 23, 2007.
                          "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                          Comment


                            #14
                            Re: HELP!!!!!

                            rebooting...

                            failed attempt, but I was messing with mount manager that rewrote the fstab... I think I'm getting the hang of it though... I'm liking the flexibility to tinker on this level...

                            Comment


                              #15
                              Re: HELP!!!!!

                              Now I get this error when I try and mount it in the terminal

                              mount: can't find media/extra in /etc/fstab or /etc/mtab

                              Here's my mtab file

                              /dev/sda1 / ext3 rw 0 0
                              tmpfs /lib/init/rw tmpfs rw,nosuid,mode=0755 0 0
                              /proc /proc proc rw,noexec,nosuid,nodev 0 0
                              sysfs /sys sysfs rw,noexec,nosuid,nodev 0 0
                              varrun /var/run tmpfs rw,nosuid,mode=0755 0 0
                              varlock /var/lock tmpfs rw,noexec,nosuid,nodev,mode=1777 0 0
                              udev /dev tmpfs rw,mode=0755 0 0
                              tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
                              devpts /dev/pts devpts rw,noexec,nosuid,gid=5,mode=620 0 0
                              fusectl /sys/fs/fuse/connections fusectl rw 0 0
                              lrm /lib/modules/2.6.27-7-generic/volatile tmpfs rw,mode=755 0 0
                              securityfs /sys/kernel/security securityfs rw 0 0

                              Comment

                              Working...
                              X