[pkg-fso-maint] Bug#801168: nodm does not start in a minimal environment

Johannes Schauer josch at debian.org
Wed Oct 7 07:05:28 UTC 2015


Package: nodm
Version: 0.11-1.3
Severity: normal

Hi,

nodm does not start any xserver even though xinit and startx work
flawlessly. To reproduce the problem, use the following script to set up
a minimal qemu image:


rm -f testimg
fallocate -l 10G testimg
sudo mkfs.ext4 testimg
ROOT=`mktemp -d`
sudo mount testimg "$ROOT"
sudo debootstrap --variant=minbase unstable "$ROOT" http://127.0.0.1:3142/httpredir.debian.org/debian
echo 'APT::Install-Recommends "0";' | sudo tee "$ROOT/etc/apt/apt.conf.d/99no-install-recommends" > /dev/null
cat << END | sudo tee "$ROOT/etc/kernel-img.conf" > /dev/null
link_in_boot = yes
do_symlinks = yes
relative_links = yes
END
cat << END | sudo tee "$ROOT/usr/sbin/policy-rc.d" > /dev/null
#!/bin/sh
echo "sysvinit: All runlevel operations denied by policy" >&2
exit 101
END
sudo chmod +x "$ROOT/usr/sbin/policy-rc.d"
cat << END | sudo tee "$ROOT/etc/fstab" > /dev/null
root / auto errors=remount-ro 0 1
END
sudo chroot "$ROOT" apt-get update
cat << END | sudo chroot "$ROOT" debconf-set-selections
nodm nodm/enabled boolean true
nodm nodm/user string josch
END
sudo chroot "$ROOT" apt-get -y install xserver-xorg nodm xinit udev linux-image-amd64 sudo awesome xterm
sudo rm "$ROOT/usr/sbin/policy-rc.d"
sudo chroot "$ROOT" useradd --groups lp,dialout,cdrom,floppy,sudo,audio,video,plugdev --create-home --shell /bin/bash --uid 1000 --user-group josch
echo "josch:secret" | sudo chroot "$ROOT" chpasswd
cp -L "$ROOT"/boot/initrd.img .
cp -L "$ROOT"/boot/vmlinuz .
sudo umount "$ROOT"
rm -r "$ROOT"



you can now boot into the system by doing:

$ qemu-system-x86_64 -append "root=/dev/sda" -kernel vmlinuz -initrd initrd.img testimg

you will see that the xserver is not started. Instead one will see the
screen go black and then return to the console in increasing intervals.
I guess this is nodm trying to start the X server. Running xinit or
startx from the terminal to start the X server works without problems.

cheers, josch



More information about the pkg-fso-maint mailing list