Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

运行之后关闭之后,ubuntu的/proc就没有了 #41

Open
erjiguan opened this issue Aug 30, 2018 · 8 comments

Comments

@erjiguan
Copy link

commented Aug 30, 2018

No description provided.

@AlbinZhang

This comment has been minimized.

Copy link

commented Sep 29, 2018

http://old-releases.ubuntu.com/releases/14.04.0/ubuntu-14.04-desktop-amd64.iso
提供一个和作者内核版本一样的 ubuntu

@readlnh

This comment has been minimized.

Copy link

commented Mar 26, 2019

请问这个问题怎么解决的呢

@readlnh

This comment has been minimized.

Copy link

commented Mar 26, 2019

发现是systemd的锅...

@Sherlock-Holo

This comment has been minimized.

Copy link

commented Mar 29, 2019

kernel: 5.0.4
在 namespace 里面 mount /proc 后,退出后 host /proc 需要重新 mount
请问怎么解决这个问题

@readlnh

This comment has been minimized.

Copy link

commented Apr 2, 2019

kernel: 5.0.4
在 namespace 里面 mount /proc 后,退出后 host /proc 需要重新 mount
请问怎么解决这个问题

// systemd 加入linux之后, mount namespace 就变成 shared by default, 所以你必须显示
	//声明你要这个新的mount namespace独立。
	syscall.Mount("", "/", "", syscall.MS_PRIVATE | syscall.MS_REC, "")

	defualtMountFlags := syscall.MS_NOEXEC | syscall.MS_NOSUID | syscall.MS_NODEV
	syscall.Mount("proc", "/proc", "proc", uintptr(defualtMountFlags), "")
@BSWANG

This comment has been minimized.

Copy link
Collaborator

commented Apr 2, 2019

@readlnh 赞,方便的话可以把适配代码提交PR到项目中,感谢!

@readlnh

This comment has been minimized.

Copy link

commented Apr 13, 2019

@readlnh 赞,方便的话可以把适配代码提交PR到项目中,感谢!

我可以尝试下,不过不知道应该提交到哪个分支

@xianlubird

This comment has been minimized.

Copy link
Owner

commented Apr 14, 2019

@readlnh master branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.