To fix the could not open session
problem, without abandoning make_chroot_jail.sh entirely, you also need to copy the /usr/lib/libcrack*
libraries. Edit the script, where it has:
# If you are using a 64 bit system and have strange problems with login comment
# the following lines in, perhaps it will work (motto: if you can't find the
# needed library just copy all of them)
#
# cp /lib/*.* ${JAILPATH}/lib/
# cp /lib/lib64/*.* ${JAILPATH}/lib/lib64/
Change to:
cp /lib/*.* ${JAILPATH}/lib/
cp /lib64/*.* ${JAILPATH}/lib64/
cp -rp /lib64/security ${JAILPATH}/lib64/
cp /usr/lib64/libcrack* ${JAILPATH}/usr/lib64/
Just a quick addendum, the above fixed this problem with 64 bit SuSE - SLES 11 sp2. I also renamed the $JAILPATH/lib
to $JAILPATH/lib64
. And for that OS, I had to add an empty /etc/profile file in the jail (you can use it to put in a PS1 prompt).
I realize this question is old, but for reference:
The screen is displayed and programs run normally, except I got no mouse nor keyboard and I can't switch to a local terminal, forcing me to hard reboot.
I correctly --bind mounted /dev/ /dev/pts /dev/shm /proc /sys /tmp
In addition to mounting the above, I also had to bind mount /run/udev to make the mouse and keyboard work in my chroot. I did not use an xorg.conf
*, and Xorg was able to correctly detect my settings.
Entry in my /etc/schroot/default/fstab
:
/run/udev /run/udev none rw,bind 0 0
If you are doing a standard chroot you could obviously put it in your /etc/fstab
instead:
/run/udev /path/to/chroot/run/udev none rw,bind 0 0
...or mount --bind
it.
*Well-- I tried using an xorg.conf
initially, but it didn't work. I also tried adding
Section "ServerFlags"
Option "AutoAddDevices" "false"
EndSection
in xorg.conf, which made my mouse work, but not the keyboard.
Best Answer
MacOS has a special filesystem called devfs which can be mounted in multiple places. Just mount it inside your chroot jail, like so: