Announcement

Collapse
No announcement yet.

bad fstab file{SOLVED}

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

    bad fstab file{SOLVED}

    Hello
    When I try to access my HDD /dev/sda1(not my os HDD) it tells me I have a bad line in fstab. I added the following line to mount sda1

    /dev/sda1 /media/data ext3 rw,user,auto,exec, sync 0 0

    Could anyone tell me what i did wrong.

    Thanks

    Dan

    #2
    Re: bad fstab file

    First, ensure that the directory data actually exists under /media. If it does not, you need to create it (as root).

    Second, change the line to:
    /dev/sda1 /media/data ext3 defaults 0 2
    Partitions in fstab other than the root partition are set to 0 2 (not 0 0).
    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: bad fstab file

      As an informational post, my partitions are:
      proc /proc proc defaults 0 0
      /dev/sda1 / ext3 relatime,errors=remount-ro 0 1
      /dev/mapper/lvm0-home /home xfs relatime 0 2
      /dev/sdb1 /mnt/c vfat utf8,umask=007,gid=46 0 1
      /dev/sdc1 /mnt/sdc1 ext2 relatime,ro 0 2
      /dev/sda6 none swap sw 0 0
      /dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0

      That came from installation as default: only proc, swap and cdrom are 0 0.
      Roots (or prime partitions on HDs) are 0 1.

      I'll check what it means...

      Comment


        #4
        Re: bad fstab file

        walfred@

        Thank you. Yes, the proc entry in fstab is 0 0, the root partition is 0 1, other HD partitions are 0 2, swap is 0 0, and floppy/cd-rom/dvd drives are 0 0.
        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: bad fstab file

          did you create the directory /media/data?

          Comment


            #6
            Re: bad fstab file

            the problem is solved. This may seem strange but all I did was move the word sync closer to exec,. I tried 0 2 but this didn't work. My original entry had the final 0 as showing in red. When I moved sync I then moved the 0 0 over and this solved the problem.

            Thanks for your efforts they are appreciated.

            Dan

            Comment


              #7
              Re: bad fstab file{SOLVED}

              No, not strange at all. In the parameters portion of an fstab entry, each is separated by a comma. That you had a space after the comma would have created a problem, as it did. I didn't catch that.

              You should still change the 0 0 to 0 2 for the reason previously provided.
              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


                #8
                Re: bad fstab file{SOLVED}

                Indeed that's the problem :P
                Very difficult to see...
                What happen is the parser uses /s+ (one or more space or tab) to know which parameter is placed to the proper config option. Then, no spaces should be placed, it's a comma-separeted list.
                I couldn't find any documentation reference, but there is a forum post reporting precisely that. Have a look.

                Comment


                  #9
                  Re: bad fstab file{SOLVED}

                  You might want to take a look at How to fstab - Understanding fstab on the Ubuntu Forums. This is an excellent post.
                  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

                  Working...
                  X