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

grml-chroot not reliable with its recursive /dev bind mounts #53

Closed
mika opened this Issue Jun 7, 2017 · 1 comment

Comments

Projects
None yet
1 participant
@mika
Member

mika commented Jun 7, 2017

The umount --recursive doesn't seem to be reliable enough. I noticed issues with files being in usage inside /dev/shm/ on my system, grml-chroot into a system and then exiting the chroot doesn't unmount /dev properly, but it leaves it in an unfix-able state which requires a reboot.

Easiest way to reproduce seems to be:

root@grml ~ # grml-chroot /  
mount: none is already mounted or /proc busy
mount: none is already mounted or /sys busy
Writing /etc/debian_chroot ...
(grml)root@grml / # 
umount: /dev/pts: target is busy
        (In some cases useful info about processes that
         use the device is found by lsof(8) or fuser(1).)
root@grml ~ # grep pts /proc/self/mountinfo
19 18 0:17 / /dev/pts rw,relatime shared:6 - devpts devpts rw,mode=622,ptmxmode=000
84 83 0:17 / /dev/pts rw,relatime shared:6 - devpts devpts rw,mode=622,ptmxmode=000
root@grml ~ # 

So I'm afraid we need to switch from the mount --rbind ... and umount --recursive to something else. :(

@mika mika added the bug label Jun 7, 2017

@mika mika added this to the Grml 2017.05 milestone Jun 7, 2017

@mika

This comment has been minimized.

Show comment
Hide comment
@mika

mika Jun 7, 2017

Member

My original approach with just mounting /dev/pts and then properly unmount might serve as starting point, see https://gist.github.com/mika/166940cb886ca8d5402ddda86ebb8baf

Member

mika commented Jun 7, 2017

My original approach with just mounting /dev/pts and then properly unmount might serve as starting point, see https://gist.github.com/mika/166940cb886ca8d5402ddda86ebb8baf

mika added a commit to grml/grml-scripts that referenced this issue Jun 16, 2017

Revert "grml-chroot: mount /dev/pts as devpts inside chroot"
This reverts commit f29c425.

This is causing troubles under certain conditions which leave the
system in an unfixable state, so we need a different approach.

See grml/grml#53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment