Not a severe issue because it can be fixed with a reboot, but I'm curious to know whether there's a way to restore files (probably not all, but as many as possible) in /proc
, /sys
, /dev/pts
and /dev
.
I deleted them partially when removing a chroot
directory with those directories mounted with
mount -t proc proc [path/to/chroot]/proc
mount -t sysfs sys [path/to/chroot]/sys
mount --bind /dev/[path/to/chroot]/dev
mount -t devpts /dev/path [path/to/chroot]/dev/pts
on Ubuntu 16.10 amd64. The removal failed for some files (I didn't record the error message) because removal of files was refused which I can understand. I guess that solutions will apply to all Debian-based systems.
After quitting the chroot
I'm seeing things like
$ ls -bash: /dev/null: Keine Berechtigung
bash: _upvars: `-a2': invalid number specifier
-bash: /dev/null: Keine Berechtigung
bash: _upvars: `-a0': invalid number specifier
during autocompletion with Tab on ls
(after exporting LANGUAGE=en
).