Atrasar montagens depois que a pasta inicial criptografada estiver pronta

3

Eu configurei algumas montagens de bind em fstab , montando uma pasta em meu diretório home para outra (AeroFS no sym-link circumvent). Minha pasta pessoal está criptografada.

Quando o sistema é inicializado, ele tenta montar as pastas dentro da pasta base antes de montar a própria pasta principal criptografada, causando um erro.

Como posso editar fstab para que a pasta inicial criptografada seja montada primeiro?

Eu tentei adicionar noauto , não funcionou.

EDIT: Além disso, quero manter a criptografia por motivos de segurança.

fstab content:

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda2 during installation
UUID=8e26dd0d-f57f-4b63-93b3-7f2743d6fe7a /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sda1 during installation
UUID=C2BB-18A8  /boot/efi       vfat    defaults        0       1
# /home was on /dev/sda4 during installation
UUID=062418c7-ba50-40e4-b3ea-42663e92eba8 /home           ext4    defaults        0       2
# swap was on /dev/sda3 during installation
#UUID=ac66f7ee-7dbe-4e56-9f42-459038a11a12 none            swap    sw              0       0
/dev/mapper/cryptswap1 none swap sw 0 0

#
#Bind mounts for AeroFS to sync outside it's folder:
#
/home/user/Desktop  /home/user/AeroFS/Desktop   none    bind    0   0
/home/user/Documents    /home/user/AeroFS/Documents none    bind    0   0
/home/user/Music    /home/user/AeroFS/Music     none    bind    0   0
/home/user/Pictures /home/user/AeroFS/Pictures  none    bind    0   0
#

saída de lsblk:

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 465.8G  0 disk 
├─sda1   8:1    0   954M  0 part /boot/efi
├─sda2   8:2    0  55.9G  0 part /
├─sda3   8:3    0  14.9G  0 part 
└─sda4   8:4    0   394G  0 part /home
    
por Dean 02.04.2015 / 11:39

1 resposta

0

Fácil:

  1. Remova as seguintes linhas do fstab:

    #
    #Bind mounts for AeroFS to sync outside it's folder:
    #
    /home/user/Desktop  /home/user/AeroFS/Desktop   none    bind    0   0
    /home/user/Documents    /home/user/AeroFS/Documents none    bind    0   0
    /home/user/Music    /home/user/AeroFS/Music     none    bind    0   0
    /home/user/Pictures /home/user/AeroFS/Pictures  none    bind    0   0
    #
    
  2. crie o seguinte script de shell:

    #!/bin/bash
    #
    # This script binds AeroFS mounts to sync outside their folder,
    # as an answer to https://askubuntu.com/questions/604361/delay-mounts-after-encrypted-home-folder-is-ready
    # 
    # Copyright (c) 2014 Fabby
    
    # This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
    # This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. See the GNU General Public License for more details.
    # You DID NOT receive a copy of the GNU General Public License along with this program as the license is bigger then this program.
    
    mount --bind /home/user/Desktop   /home/user/AeroFS/Desktop
    mount --bind /home/user/Documents /home/user/AeroFS/Documents
    mount --bind /home/user/Music     /home/user/AeroFS/Music
    mount --bind /home/user/Pictures  /home/user/AeroFS/Pictures
    
  3. Salve-o em /home/user/bin/MountAeroFS.sh (crie o diretório bin , se ele não existir).

  4. Abra os aplicativos de inicialização e adicione o seguinte Comando: MountAeroFS.sh . Como Nome: e Comentário: você pode adicionar qualquer coisa para lembrá-lo do que se trata.

  5. Reinicialize (como você acabou de alterar seu fstab )

Feito!

    
por Fabby 08.04.2015 / 11:42