Dea*_*ean 5 encryption fstab mount ecryptfs home-directory
我在 中设置了一些绑定挂载fstab,将我的主目录中的一个文件夹挂载到另一个文件夹(AeroFS 无符号链接规避)。我的主文件夹已加密。
当系统启动时,它会尝试在安装加密的主文件夹本身之前安装主文件夹中的文件夹,从而导致错误。
\n\n如何编辑fstab以首先安装加密的主文件夹?
我尝试添加noauto,但没有成功。
编辑:另外,出于安全原因我想保持加密。
\n\nfstab内容:
# <file system> <mount point> <type> <options> <dump> <pass>\n# / was on /dev/sda2 during installation\nUUID=8e26dd0d-f57f-4b63-93b3-7f2743d6fe7a / ext4 errors=remount-ro 0 1\n# /boot/efi was on /dev/sda1 during installation\nUUID=C2BB-18A8 /boot/efi vfat defaults 0 1\n# /home was on /dev/sda4 during installation\nUUID=062418c7-ba50-40e4-b3ea-42663e92eba8 /home ext4 defaults 0 2\n# swap was on /dev/sda3 during installation\n#UUID=ac66f7ee-7dbe-4e56-9f42-459038a11a12 none swap sw 0 0\n/dev/mapper/cryptswap1 none swap sw 0 0\n\n#\n#Bind mounts for AeroFS to sync outside it's folder:\n#\n/home/user/Desktop /home/user/AeroFS/Desktop none bind 0 0\n/home/user/Documents /home/user/AeroFS/Documents none bind 0 0\n/home/user/Music /home/user/AeroFS/Music none bind 0 0\n/home/user/Pictures /home/user/AeroFS/Pictures none bind 0 0\n#\nRun Code Online (Sandbox Code Playgroud)\n\nlsblk 输出:
\n\nNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT\nsda 8:0 0 465.8G 0 disk \n\xe2\x94\x9c\xe2\x94\x80sda1 8:1 0 954M 0 part /boot/efi\n\xe2\x94\x9c\xe2\x94\x80sda2 8:2 0 55.9G 0 part /\n\xe2\x94\x9c\xe2\x94\x80sda3 8:3 0 14.9G 0 part \n\xe2\x94\x94\xe2\x94\x80sda4 8:4 0 394G 0 part /home\nRun Code Online (Sandbox Code Playgroud)\n
简单的:
从 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
#
Run Code Online (Sandbox Code Playgroud)创建以下 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
Run Code Online (Sandbox Code Playgroud)将其保存在/home/user/bin/MountAeroFS.sh(bin如果该目录不存在则创建该目录。)
打开启动应用程序,然后添加以下命令: MountAeroFS.sh。作为名称:和评论:您可以添加任何内容来提醒您这是关于什么的。
fstab)| 归档时间: |
|
| 查看次数: |
1202 次 |
| 最近记录: |