如何在 fstab 时或之后尽早挂载目录?

HiT*_*uch 2 ubuntu directory mount home

我想将 /home 目录保留在引导分区以外的磁盘分区上的文件夹中。请注意,我说的是文件夹,而不是分区,这意味着我不想将整个分区挂载为 /home。

错误的 fstab 条目:LABEL=G_Giant_257/common/home /home如果只有这样的语法可以工作,这正是我想要的。

实际(良好)fstab:

LABEL=G_Giant_257 /mnt/g auto nosuid,nodev,nofail,nobootwait,x-gvfs-show 0 0
Run Code Online (Sandbox Code Playgroud)

现在我需要获取命令

mount /mnt/g/common/home /home
Run Code Online (Sandbox Code Playgroud)

在任何尝试访问 /home 之前执行。当然,我希望对任何用户的“/home/~”目录的所有引用都可以访问我的 G_Giant_257 分区上的 /common/home 的子文件夹。

更关键的是:我的根分区是 ext4,G_Giant_257 分区是 NTFS,所以我不知道如何使链接起作用。我运行的是 ubuntu 16.04。

请问您有什么推荐?

Ale*_*exP 5

mount --bind/home/etc/fstab

/mnt/g/common/home /home none bind 0 0
Run Code Online (Sandbox Code Playgroud)

(请参阅ServerFault 上的这个问题。)

/home我不知道NTFS 文件系统有多实用。