Announcement

Collapse
No announcement yet.

[SOLVED] fstab & mtab won't remember mount points between reboots.

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

    [SOLVED] fstab & mtab won't remember mount points between reboots.

    System Specs:
    Motherboard: ASUS P5E3DELUX
    CPU: Intel(R) Quad Core(TM)2 Extreme CPU X9650 @ 3.00GHz
    RAM: 4GB
    OS Host: Kubuntu Hardy Heron v8.04
    Kernel: 2.6.24-21-generic
    UI: KDE3 v4:3.5.10-0ubuntu1~hardy2
    OS VirtualBox Guest: Windows XP Professional

    Pre Note:
    I searched Google, and this forum for a solution before posting. The answers I found did not quite match the problems this computer is experiencing.

    Description of Problem:
    Every time the computer is rebooted the mount points are incorrect, even after editing /etc/fstab, and or /etc/mtab

    Specific Problem:
    After logging into the OS, "mount -l" from the CLI and or the default GUI to the "Disk & Filesystems (Mount point editor)" both report incorrectly mapped mount points. If a work around is not implemented between reboot then some combination of the following 3 items occurs regularly.
    1. Some times devices are not mapped.
    2. Some times device names are changed (e.g. from "/dev/sdb6" to "/dev/sdc6").
    3. Typically devices are mapped to the wrong mount points.
    After applying the first part of the work around (see below), /etc/fstab, and /etc/mtab are updated to reflect the changes but are often updated incorrectly, so a second work around has to be implemented in order to fix the problem.

    Current work around:
    1st Part:

    Every time the computer is booted, the mount points must be manually set by either, "mount" via the CLI, or via the GUI from the Start Menu by 'Settings' --> 'System Administration' --> 'Disk & Filesystems (Mount point editor)'. After this the /etc/fstab and /etc/mtab files must be checked to make sure the changes have been correctly updated.
    2nd Part:
    When the changes have not been updated correctly, a backup file is used to copy over the /etc/fstab and /etc/mtab files to force the correct updates to those files. This does in fact solve the problem and allow for correctly mapped mounts after a single reboot, but successive reboots do not always reflect correctly mapped mount points unless this workaround is applied almost every time.

    Questions:
    Is there a way to fix this mount point issue so that it becomes unecessary to perform so many mount point cleanup tasks every time I reboot the computer?
    In other words, instead of writing a script to copy over /etc/fstab, and /etc/mtab each time, is there a way to figure out why this is happening in the first place so that it can be corrected?

    References:
    The following is a copy of the current fstab file used to overwrite /etc/fstab when changes are updated incorrectly:
    Code:
    # /etc/fstab: static file system information.
    #
    # <file system> <mount point> <type> <options>   <dump> <pass>
    # /dev/sda2
    
    #Mount points for Root and Swap located on the hard drive beginning with the letters WDC:
    UUID=9148b97c-32a9-4251-8be6-fbb027b4d644 / ext3 nouser,relatime,errors=remount-ro,atime,auto,rw,dev,exec,suid 0 1
    UUID=ea08fdaa-8875-4df9-b368-d33419cac1a6 none swap sw 0 0
    
    #Mount points for the hard drive beginning with the letters ic3:
    /dev/sdb1 /media/ic3_1 ext3 rw,nouser,auto,nodev,exec,nosuid 0 0
    /dev/sdb2 /media/ic3_2 ext3 rw,nouser,noauto,nodev,exec,nosuid 0 0
    
    #Mount points for the hard drive beginning with the letters st3:
    /dev/sdc5 /media/st3_5 ext3 rw,nouser,auto,nodev,exec,nosuid 0 0
    /dev/sdc6 /media/st3_6 ext3 rw,nouser,auto,nodev,exec,nosuid 0 0
    /dev/sdc7 /media/st3_7 ext3 rw,nouser,auto,nodev,exec,nosuid 0 0
    /dev/sdc8 /media/st3_8 ext3 rw,nouser,noauto,nodev,exec,nosuid 0 0
    #umount /media/st3_8
    
    #Mount points for removable media such as USB/CD/DVD:
    /dev/scd0 /media/cdrom0 auto nouser,atime,auto,rw,nodev,exec,nosuid 0 0
    /dev/scd1 /media/cdrom1 auto nouser,atime,auto,rw,nodev,exec,nosuid 0 0
    #/dev/fd0 /media/floppy0 auto user,utf8,atime,auto,rw,dev,exec,suid 0 0

    The following is a copy of the current mtab file used to overwrite /etc/mtab when changes are updated incorrectly:
    Code:
    /dev/sda2 / ext3 rw,relatime,errors=remount-ro 0 0
    proc /proc proc rw,noexec,nosuid,nodev 0 0
    /sys /sys sysfs rw,noexec,nosuid,nodev 0 0
    varrun /var/run tmpfs rw,noexec,nosuid,nodev,mode=0755 0 0
    varlock /var/lock tmpfs rw,noexec,nosuid,nodev,mode=1777 0 0
    udev /dev tmpfs rw,mode=0755 0 0
    devshm /dev/shm tmpfs rw 0 0
    devpts /dev/pts devpts rw,gid=5,mode=620 0 0
    lrm /lib/modules/2.6.24-21-generic/volatile tmpfs rw 0 0
    securityfs /sys/kernel/security securityfs rw 0 0
    rpc_pipefs /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0
    binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,noexec,nosuid,nodev 0 0
    /dev/sdb1 /media/ic3_1 ext3 rw,nosuid,nodev 0 0
    /dev/sdc5 /media/st3_5 ext3 rw,nosuid,nodev 0 0
    /dev/sdc6 /media/st3_6 ext3 rw,nosuid,nodev 0 0
    /dev/sdc7 /media/st3_7 ext3 rw,nosuid,nodev 0 0

    #2
    Re: fstab &amp; mtab won't remember mount points between reboots.

    /dev names might change.
    in your fstab use uuid or label instead (look at your entries for root ans swap for reference).
    the command that tells you which is which is blkid.
    ls -l /dev/disk/* is also useful.
    hth
    gnu/linux is not windoze

    Comment


      #3
      Re: fstab &amp; mtab won't remember mount points between reboots.

      Are any of the problem drives USB?

      Comment


        #4
        Re: fstab &amp; mtab won't remember mount points between reboots.

        Thank you both for your inputs.

        jankushka: The "ls -l /dev/disk/*" command was extremely helpful. Thank you.
        dibl: I just mount the USB drives when I need them so not much of a problem there.

        Important:
        However, I forgot to mention in my first post a rather important piece of information. I have two TrueCrypt encrypted volumes that are not mounted automatically. After the TrueCrypt volumes were mounted, I was able to find there UUID's using the commands suggested by jankushka.

        I guess you've both given me pretty much everything I need to know to solve this from here, but I need to set things up and test them out before I can mark this thread as solved. I'll reply with an update soon.
        Thank you both again for your help, I sincerely appreciate it. Thanks.

        Comment


          #5
          Re: fstab &amp; mtab won't remember mount points between reboots.

          [UPDATE]
          Very much solved. I tested the new /etc/fstab configuration by utilizing a bug in firefox which freezes the X-server requiring me to escape to a shell and reboot the computer. The /etc/fstab file held up to the simulated system crash quite well. The /dev names changed but the mount points maintained the correct mapping with there respective physical hard disk partitions.

          Note: I'm still using device names for the USB drives because USB devices sometimes change which port they are physically attached to and I need more time to discover if that also changes the UUID. I will probably remap the CD drives using UUID's the next time I get a chance to mount them someplace.
          Hint: It appears that a device must be mounted in order to discern its UUID. I'm not sure if that is true, but it certainly is what I experienced while solving this problem.

          Closing:
          I hadn't fully understood that UUID's were so consistent until today. Thank you all again for all your help.

          Reference:
          In case any one needs this as a reference in order to solve a similar problem,
          I am including a copy of the current updated version of this computers /etc/fstab file:
          Code:
          # /etc/fstab: static file system information.
          #
          # <file system> <mount point> <type> <options>   <dump> <pass>
          # /dev/sda2
          
          #Mount points for Root and Swap located the on hard drive beginning with the letters WDC:
          UUID=9148b97c-32a9-4251-8be6-fbb027b4d644 / ext3 nouser,relatime,errors=remount-ro,atime,auto,rw,dev,exec,suid 0 1
          UUID=ea08fdaa-8875-4df9-b368-d33419cac1a6 none swap sw 0 0
          
          #The mount points for the hard drive that starts with the letters ic3:
          UUID=56d4ed87-d846-4669-b810-ee71f190169a /media/ic3_1 ext3 nouser,atime,auto,rw,nodev,exec,nosuid 0 0
          UUID=427c801b-4ae6-4cd0-84de-46e4741d14bd /media/ic3_2 ext3 nouser,atime,noauto,rw,nodev,exec,nosuid 0 0
          
          #The mount points for the hard drive that starts with the letters st3:
          UUID=568915a3-54d8-4dbe-a067-415864015b97 /media/st3_5 ext3 nouser,atime,auto,rw,nodev,exec,nosuid 0 0
          UUID=23d777fe-3d4e-4404-957c-65df151f278f /media/st3_6 ext3 nouser,atime,auto,rw,nodev,exec,nosuid 0 0
          UUID=63ef253e-83dc-4157-a048-5447718a5eb8 /media/st3_7 ext3 nouser,atime,auto,rw,nodev,exec,nosuid 0 0
          UUID=ee71389d-aabe-4f43-8b6a-e7a2389b3edb /media/st3_8 ext3 nouser,atime,noauto,rw,nodev,exec,nosuid 0 0
          
          #Mount points for removable media such as USB/CD/DVD:
          /dev/scd0 /media/cdrom0 auto nouser,atime,auto,rw,nodev,exec,nosuid 0 0
          /dev/scd1 /media/cdrom1 auto nouser,atime,auto,rw,nodev,exec,nosuid 0 0
          #/dev/fd0 /media/floppy0 auto user,utf8,atime,auto,rw,dev,exec,suid 0 0
          /dev/sdd1 /media/USBDisk0 auto nouser,auto,atime,rw,nodev,noexec,nosuid 0 0

          Comment

          Working...
          X