Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: fstab issue: how to specify mount order?

  1. #1
    Join Date
    Mar 2007
    Beans
    50

    fstab issue: how to specify mount order?

    I'm not very familiar with the Precise startup & boot process (I'm using a custom DE, based mostly on Madbox 12.04), but I have heard that lots of processes run in parallel in order to speed things up. And from what comes across my screen (errors complaining "Mount point does not exist"), it looks like sometimes the system is trying to mount my wine partition or my backup partition (both of which are shared among multiple distros on the same machine) into my home partition before it actually mounts my home partition. With fstab like this, is that possible? And if it is, what do I do about it?

    Code:
    # /etc/fstab: static file system information.
    #
    # Use 'blkid' to print the universally unique identifier for a
    # device; this may be used with UUID= as a more robust way to name devices
    # that works even if disks are added and removed. See fstab(5).
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    proc            /proc           proc    nodev,noexec,nosuid 0       0
    # / was on /dev/sda7 during installation
    UUID=c40665de-3d1d-4ce5-8bd7-005b68d4eed8 /               ext4    errors=remount-ro 0       1
    # /home was on /dev/sda8 during installation
    UUID=cc1d15d0-4c64-44f8-b2ec-e359854d31b0 /home           ext4    defaults        0       2
    # swap was on /dev/sda5 during installation
    UUID=dd7cf35a-0b98-41cc-81cd-d63c41cd20d2 none            swap    sw              0       0
    # wine partition hacked in
    UUID=21e1374d-9004-4121-9905-8ba76615b706 /home/arky/.wine/drive_c/Programs ext4 defaults 0 2
    #backup partition
    UUID="447c1372-9cdb-4ebe-8e69-035c029029ea /home/arky/docs  ext3 defaults 0 2
    When you make laws to control foolish others, you forge the chains that will be used to control you.
    My blog
    my pre-blog website

  2. #2
    Join Date
    Jun 2006
    Location
    Nux Jam
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: fstab issue: how to specify mount order?

    what you need into fstab is: / /home & swap entries, nothing else
    as they use uuid, you need to use the good ones, check them with:

    sudo blkid

    then edit fstab to make change if needed

    gksu gedit /etc/fstab

  3. #3
    Join Date
    Sep 2007
    Location
    Oklahoma, USA
    Beans
    2,378
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: fstab issue: how to specify mount order?

    Try adding the "noauto" option to the troublesome fstab entry:
    Code:
    # wine partition hacked in 
    UUID=21e1374d-9004-4121-9905-8ba76615b706 /home/arky/.wine/drive_c/Programs ext4 defaults,noauto 0 2
    This should prevent it from attempting to mount too soon. Then add "mount -a" to the /etc/rc.local file just before the existing "exit 0" line, to remount all drives as the very last action of the boot process.

    I don't run wine, so this suggestion is untested, but the "noauto" option is intended specifically to prevent such race conditions during boot...
    --
    Jim Kyle in Oklahoma, USA
    Linux Counter #259718
    Howto mark thread: https://wiki.ubuntu.com/UnansweredPo.../SolvedThreads

  4. #4
    Join Date
    Mar 2007
    Beans
    50

    Smile Re: fstab issue: how to specify mount order?

    JKyleOKC, that seems to have done the trick! I forgot the bit in the script the first time around, but I think it will solve everything. I'll know next reboot.
    When you make laws to control foolish others, you forge the chains that will be used to control you.
    My blog
    my pre-blog website

  5. #5
    Join Date
    Mar 2007
    Beans
    50

    Re: fstab issue: how to specify mount order?

    I spoke too soon. Now those partitions don't mount at all. I have to do it after I log in. Which, given there are three disks on my system, involves using "sudo blkid" to find out which is where. I'd write a script to do it if I had any idea where to put it, how to give it root access, and so on.
    Last edited by arkanabar; October 27th, 2012 at 05:35 PM.
    When you make laws to control foolish others, you forge the chains that will be used to control you.
    My blog
    my pre-blog website

  6. #6
    Join Date
    Mar 2007
    Beans
    50

    Re: fstab issue: how to specify mount order?

    Further information: It appears that the "noauto" option in fstab explicitly prevents the partitions from being mounted by "mount -a". Can I then replace the "mount -a" command in /etc/rc.local shell with something more explicit? For example:
    Code:
    mount -U 21e1374d-9004-4121-9905-8ba76615b706 /home/arky/.wine/drive_c/Programs
    When you make laws to control foolish others, you forge the chains that will be used to control you.
    My blog
    my pre-blog website

  7. #7
    Join Date
    Sep 2007
    Location
    Oklahoma, USA
    Beans
    2,378
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: fstab issue: how to specify mount order?

    Try replacing the "noauto" option with "_netdev" (be sure to include that leading underline) which is supposed to tell the boot process to mount the device only after the network becomes available; the "mount -a" should then work to mount it with no need to look up the UUID. If it fails to mount automatically, a simple "sudo mount -a" from the terminal should mount it after logging in.

    I was looking for the _netdev option when I found noauto and failed to read its actions in full detail; sorry about that!!!
    --
    Jim Kyle in Oklahoma, USA
    Linux Counter #259718
    Howto mark thread: https://wiki.ubuntu.com/UnansweredPo.../SolvedThreads

  8. #8
    Join Date
    Sep 2007
    Location
    Oklahoma, USA
    Beans
    2,378
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: fstab issue: how to specify mount order?

    Quote Originally Posted by arkanabar View Post
    I'd write a script to do it if I had any idea where to put it, how to give it root access, and so on.
    Where = /etc/rc.local which runs as root so any script that it launches will automatically have root access. Since it runs before your full environment is set up (that happens during your login) any file reference must have full absolute paths. The usual shortcuts such as ~ or $HOME won't work here. However your script can define local variables for its use, such as parsing the result of a command such as /sbin/blkid (note that commands also need their full paths for safety's sake).

    However the _netdev option I mentioned in my other reply should make such a script unnecessary. I hope so, anyway...
    --
    Jim Kyle in Oklahoma, USA
    Linux Counter #259718
    Howto mark thread: https://wiki.ubuntu.com/UnansweredPo.../SolvedThreads

  9. #9
    Join Date
    Dec 2009
    Beans
    6,771

    Re: fstab issue: how to specify mount order?

    Might I offer a suggestion?

    Go back to JKyleOKC's original idea and add noauto to the fstab entry.

    Instead of "mount -a" in rc.local use:
    Code:
    mount /home/arky/.wine/drive_c/Programs
    The system will check fstab to find out if mounting that mount point is defined and it will find it's that UUID number and you should be good to go.
    Last edited by Morbius1; October 27th, 2012 at 07:18 PM.

  10. #10
    Join Date
    Sep 2007
    Location
    Oklahoma, USA
    Beans
    2,378
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: fstab issue: how to specify mount order?

    Thanks for chiming in! Since arky has several to mount, he'll need a command in rc.local for each of them, but this ought to do the trick nicely.
    --
    Jim Kyle in Oklahoma, USA
    Linux Counter #259718
    Howto mark thread: https://wiki.ubuntu.com/UnansweredPo.../SolvedThreads

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •