首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在chroot的家中(使用schroot时)

在chroot的家中(使用schroot时)
EN

Unix & Linux用户
提问于 2019-01-20 14:25:07
回答 1查看 466关注 0票数 0

我的主机系统是archlinux,我需要一个ubuntu环境,可以与我的主目录中的文件一起使用。问题是:我的主目录是用氪码加密的。所以,当我启动schroot时,我得到的是:

代码语言:javascript
复制
 ~ $ schroot -c ubuntu-lts
(ubuntu-lts) ~ $ ls
Access-Your-Private-Data.desktop  README.txt

如何自动化加密的主目录(可能不需要重新输入我的密码)。

为了在archlinux上安装加密的主页,我遵循了以下步骤:

我的schroot设置非常简单:

代码语言:javascript
复制
~ $ cat /etc/schroot/chroot.d/ubuntu-lts.conf
[ubuntu-lts] 
type=directory 
description=Ubuntu 18.04 LTS
directory=/opt/schroot/ubuntu-lts 
users=
aliases=ubuntu-18.04,ubuntu-bionic,bionic
EN

回答 1

Unix & Linux用户

回答已采纳

发布于 2019-01-31 19:31:17

过了一会儿,我找到了一个解决办法:

施罗德设置:

代码语言:javascript
复制
[ubuntu-lts]
type=directory
description=Ubuntu 18.04 LTS
directory=/opt/schroot/ubuntu-lts
users=
aliases=ubuntu-18.04,ubuntu-bionic,bionic
setup.fstab=ubuntu-lts/fstab

而fstab文件变成:

代码语言:javascript
复制
# fstab: static file system information for chroots.
# Note that the mount point will be prefixed by the chroot path
# (CHROOT_PATH)
#
#                
/proc           /proc           none    rw,bind         0       0
/sys            /sys            none    rw,bind         0       0
/dev            /dev            none    rw,bind         0       0
/dev/pts        /dev/pts        none    rw,bind         0       0
/home           /home           none    rw,bind         0       0
/tmp            /tmp            none    rw,bind         0       0
/home/   /home/   none    rw,bind         0       0

# It may be desirable to have access to /run, especially if you wish
# to run additional services in the chroot.  However, note that this
# may potentially cause undesirable behaviour on upgrades, such as
# killing services on the host.
#/run           /run            none    rw,bind         0       0
#/run/lock      /run/lock       none    rw,bind         0       0
#/dev/shm       /dev/shm        none    rw,bind         0       0

它只是从/etc/schroot/default/fstab中复制的fstab文件,我在其中添加了以下行:

代码语言:javascript
复制
/home/   /home/   none    rw,bind         0       0
票数 0
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/495605

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档