> Failed to lock chroot: /var/lib/schroot/session/sid-9a6aa3bc-6afc-4eda-9924-ec90cfee2a8a: Failed to write session file: Permission denied
This is independent from any of your LVM setup, I think, being a filesystem ownership/permissions failure. Note that schroot is setuid root (or else it won't be able to chroot(2)), so root must be able to write to every directory under /var/lib/schroot. It must also be able to lock the files with fcntl(2), so your filesystem must support this (most do unless you use something very exotic).
> drwx------ 2 root root 220 2009-11-23 14:42 /dev/sys11
This looks wrong. I have 0755 perms on mine. However, since all the mounting of the filesystems is done as root, this shouldn't in an of itself cause a failure.
> sudo schroot -c sid
> Volume group "mapper" not found
> /etc/schroot/setup.d/90passwd: 2: cannot create > /var/lib/schroot/mount/sid-7d92b549-39ec-4668-8d04-742e6428eb62/etc/passwd: Directory nonexistent
> E: sid-7d92b549-39ec-4668-8d04-742e6428eb62: Chroot setup failed: stage=setup-start
This looks like one or more of the parent directories are nonexistent. Does /etc exist in the chroot. Did anything get mounted on /var/lib/schroot/mount/sid-7d92b549-39ec-4668-8d04-742e6428eb62/ ?
> getent passwd brian >> "${CHROOT_PATH}/etc/passwd"
Note that the default 20nssdatabases script sets the passwd database using getent, so this is unnecessary. If you want to restrict it to a subset of users, that's something we could add to the script as a customisable option (patch welcome).
So far, it's looking like it's probably an ownership or permissions problem on /var/lib/schroot and/or its main subdirectories. They should all be 0755 and files should be 0644 in the session dir.
Note that if you run schroot with -v as well as --debug=info, you'll get diagnostics from the setup scripts which you haven't got in your case. Re-testing with -v as well would be useful.
BTW, there was a new release of schroot, 1.4.0 a couple of days back. In Debian unstable, no idea about Ubuntu. Possibly worth trying if you haven't had any success to date.
Hi,
(I'm the upstream author and Debian maintainer.)
> Failed to lock chroot: /var/lib/ schroot/ session/ sid-9a6aa3bc- 6afc-4eda- 9924-ec90cfee2a 8a: Failed to write session file: Permission denied
This is independent from any of your LVM setup, I think, being a filesystem ownership/ permissions failure. Note that schroot is setuid root (or else it won't be able to chroot(2)), so root must be able to write to every directory under /var/lib/schroot. It must also be able to lock the files with fcntl(2), so your filesystem must support this (most do unless you use something very exotic).
> drwx------ 2 root root 220 2009-11-23 14:42 /dev/sys11
This looks wrong. I have 0755 perms on mine. However, since all the mounting of the filesystems is done as root, this shouldn't in an of itself cause a failure.
> sudo schroot -c sid setup.d/ 90passwd: 2: cannot create > /var/lib/ schroot/ mount/sid- 7d92b549- 39ec-4668- 8d04-742e6428eb 62/etc/ passwd: Directory nonexistent 39ec-4668- 8d04-742e6428eb 62: Chroot setup failed: stage=setup-start schroot/ mount/sid- 7d92b549- 39ec-4668- 8d04-742e6428eb 62/ ?
> Volume group "mapper" not found
> /etc/schroot/
> E: sid-7d92b549-
This looks like one or more of the parent directories are nonexistent. Does /etc exist in the chroot. Did anything get mounted on /var/lib/
> getent passwd brian >> "${CHROOT_ PATH}/etc/ passwd"
Note that the default 20nssdatabases script sets the passwd database using getent, so this is unnecessary. If you want to restrict it to a subset of users, that's something we could add to the script as a customisable option (patch welcome).
So far, it's looking like it's probably an ownership or permissions problem on /var/lib/schroot and/or its main subdirectories. They should all be 0755 and files should be 0644 in the session dir.
Note that if you run schroot with -v as well as --debug=info, you'll get diagnostics from the setup scripts which you haven't got in your case. Re-testing with -v as well would be useful.
BTW, there was a new release of schroot, 1.4.0 a couple of days back. In Debian unstable, no idea about Ubuntu. Possibly worth trying if you haven't had any success to date.
Regards,
Roger