lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Missing system directories in chroot [Was: Creating a chroot f


From: Greg Chicares
Subject: Re: [lmi] Missing system directories in chroot [Was: Creating a chroot for cross-building lmi]
Date: Fri, 16 Sep 2016 12:50:31 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.8.0

On 2016-09-15 15:46, Greg Chicares wrote:
> On 2016-09-08 22:06, Vadim Zeitlin wrote:
>> On Fri, 2 Sep 2016 01:31:12 +0000 Greg Chicares <address@hidden> wrote:
> [...]
>> GC> During 'debootstrap', I see messages like this:
>> GC> #   E: Can not write log (Is /dev/pts mounted?)
>> GC> #   [FAIL] Can't start system message bus - /proc is not mounted ... 
>> failed!
>> GC> and I just ignore them, because the chroot seems to work perfectly.
>> GC> What negative consequences could this have?
> 
> To explore the consequences, I tried installing google-chrome-stable in
> a minimal chroot (created as described in the original message thread).

[...and problems ensued...]

>> 1. As I said before, I think you do need to mount /dev/pts because many
>> programs risk to fail mysteriously if PTYs don't work. This can be done
>> manually using "mount -o bind -t devpts /dev/pts devpts".

And /dev/pts isn't the only thing that's missing, so maybe we should step
back and reconsider whether we should use the default 'plain' schroot:

http://linux.die.net/man/5/schroot.conf
| Note that 'plain' chroots do not run setup scripts and mount filesystems;
| 'directory' is recommended (see "Plain and directory chroots", below).
| ... directory chroots run setup scripts, whereas plain chroots do not

If I
  echo "type=directory" >> /etc/schroot/chroot.d/chrome.conf
and then reenter that chroot, then I get /dev/pts and /proc automatically.
However, now I have a new problem, pertaining to /dev/shm :

$google-chrome-stable
[23923:23942:0916/115326:ERROR:bus.cc(434)] Failed to connect to the bus: 
Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or 
directory
[23923:23923:0916/115326:ERROR:shared_memory_posix.cc(290)] Creating shared 
memory in /dev/shm/.com.google.Chrome.YTpEOQ failed: No such file or directory
[23923:23923:0916/115326:ERROR:shared_memory_posix.cc(293)] Unable to 
access(W_OK|X_OK) /dev/shm: No such file or directory
[23923:23923:0916/115326:FATAL:shared_memory_posix.cc(295)] This is frequently 
caused by incorrect permissions on /dev/shm.  Try 'sudo chmod 1777 /dev/shm' to 
fix.
zsh: abort      google-chrome-stable

Yesterday, without schroot "type=directory", I encountered this problem
and solved it by following that "sudo chmod 1777 /dev/shm" advice. But
today I hesitate to do that, because I suspect /dev/shm is just a link
to the underlying OS's own directory (which I'm reluctant to change
without deeper knowledge than I possess), and also because it seems to
have the right permissions:

# Am I in a chroot? If not, then / is inode 2:
$ls -di /
21634672 /
$ls -l /dev/sh*
lrwxrwxrwx 1 root root 8 Feb 16  2016 /dev/shm -> /run/shm
$stat --format=%a%n /dev/sh*
777/dev/shm

When /dev/shm palpably exists and has wide-open permissions, how can
the diagnostic above
  Unable to access(W_OK|X_OK) /dev/shm: No such file or directory
make sense?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]