[OSGeoLive] #2250: Installing tomcat breaks iso live session
trac_osgeolive at osgeo.org
Wed Aug 26 07:08:38 PDT 2020
#2250: Installing tomcat breaks iso live session
Reporter: kalxas | Owner: kalxas
Type: defect | Status: assigned
Priority: blocker | Milestone: OSGeoLive14.0
Component: OSGeoLive | Keywords: tomcat9
While reviewing the tomcat installer for OSGeoLive 14, I have noticed that
by enabling the tomcat installer, the live iso boot process breaks so I
had to disable tomcat until a solution can be found.
In order to figure out what the problem is, I managed to get a snapshot
during the iso booting process (tomcat-boot-failure.png). The error is:
adduser: The UID 999 is already in use
usermod: user 'user' does not exist
install: invalid user 'user'
The system (casper) fails to create the 'user' account as the live system
user, leaving the system hanging.
Digging a bit deeper, I see the following:
On build 37 (without tomcat) right after the startup this is how the
/etc/passwd file looks like (live_system_users.png):
user:x:999:999:Live session user,,,:/home/user:/bin/bash
systemd-coredump:x:998:998:systemd Core Dumper:/:/usr/sbin/nologin
By manually creating the build chroot environment, right after tomcat
installation, this is how the /etc/passwd file looks like
systemd-coredump:x:999:999:systemd Core Dumper:/:/usr/sbin/nologin
My understanding of the problem is that tomcat user occupies UID 998 and
this makes systemd-coredump user to pick up UID 999, leaving no UID
available for the live session user (has to be < 1000). Casper then fails
to create the user 'user' leaving the iso hanging on boot.
I see some possible solutions:
1. delete tomcat user in setdown script (as we currently do with user
https://github.com/OSGeo/OSGeoLive/blob/master/bin/inchroot.sh#L252 ) and
find a way to create the tomcat user during boot time.
2. patch tomcat debian package to create the tomcat user with another UID.
Any proposals for other solutions?
Ticket URL: <https://trac.osgeo.org/osgeolive/ticket/2250>
self-contained bootable DVD, USB thumb drive or Virtual Machine based on Lubuntu, that allows you to try a wide variety of open source geospatial software without installing anything.
More information about the osgeolive