The officially official Devuan Forum!

You are not logged in.

#1 2025-12-03 04:52:19

rmrichesjr
Member
Registered: 2018-12-18
Posts: 42  

excalibur installation hangs in late-install-stage2 (in libvirt)

I'm seeing a repeatable problem when installing devuan excalibur aka 6 on libvirt.  The first problematic symptom is a hang for more than 30 minutes with the install UI saying "Finishing the installation" and "Running late-install-stage2..."  This problem appears to be similar to this topic: https://dev1galaxy.org/viewtopic.php?id=7521

Going to vt4 to see the installer's syslog, it appears the installer unmounts and ejects /dev/sr0, then runs script 18-late-install-stage2, which tries to install a few new packages: libestr0 libfastjson4 liblognorm5 rsyslog

Activating vt2, the 'ps' command shows the two last non-kworker, non-ps processes as follows:
- apt-get -y reinstall rsyslog
- /usr/lib/apt/methods/cdrom

My first hunch is that the cdrom got unmounted too early, and that's causing the apt-get package [re]installation to hang.  I'd love to supply screenshots, but I haven't seen how to add an image.

Offline

#2 2025-12-03 14:06:50

rbit
Member
Registered: 2018-06-12
Posts: 91  

Re: excalibur installation hangs in late-install-stage2 (in libvirt)

rmrichesjr wrote:

My first hunch is that the cdrom got unmounted too early, and that's causing the apt-get package [re]installation to hang.

That's exactly correct.  There's a workaround in the latest installer-iso program, so if/when a 6.0.1 iso is published it will be corrected.

Offline

#3 2025-12-03 17:24:13

rmrichesjr
Member
Registered: 2018-12-18
Posts: 42  

Re: excalibur installation hangs in late-install-stage2 (in libvirt)

Thank you!  Many additional thanks in advance for a pointer to the details of the workaround, please.  It would be convenient if the workaround could be patched in, either during the running installer or by rebuilding a modified ISO.

Offline

#4 2025-12-03 18:39:05

rbit
Member
Registered: 2018-06-12
Posts: 91  

Re: excalibur installation hangs in late-install-stage2 (in libvirt)

The first patch that addresses this issue was listed here
https://git.devuan.org/devuan/installer … 2e12e7251c
but then I removed that entirely (and removed other old parts), and placed rsyslog in another part to ensure it gets installed
https://git.devuan.org/devuan/installer … 37ddeb4887
Not sure that's the proper way to do it, but it did pass my initial testing at least.

The first fix could be patched into a running installer, by replacing /usr/lib/finish-install.d/18late-install-stage2

cat <<EOF | tee /usr/lib/finish-install.d/18late-install-stage2 > /dev/null
#!/bin/sh
if [ -f /target/var/lib/dpkg/info/desktop-base.list ]; then
	# desktop-base was installed.  reinstall it after other packages if possible
	if [ -n "\$(grep ^deb\ http /target/etc/apt/sources.list)" ]; then
		# there are online apt sources listed; do not use installation media
		sed -i -e 's/^deb cdrom:/#deb cdrom:/g' /target/etc/apt/sources.list
		in-target sh -c "apt-get -y reinstall desktop-base"
	elif [ -n "\$(ls /target/tmp/desktop-base/desktop-base*.deb 2>/dev/null)" ]; then
		# the deb from installation media is available
		in-target sh -c "cd /tmp/desktop-base ; dpkg -i *.deb"
	else
		# this is an offline installation, and the deb was not found
		log "(offline) unable to reinstall desktop-base: deb file is unavailable"
	fi
fi

# check if rsyslog got installed
if [ ! -f /target/usr/sbin/rsyslogd ]; then
  # not installed; try to install it if possible
  if [ -n "\$(grep ^deb\ http /target/etc/apt/sources.list)" ]; then
    # there are online apt sources listed; do not use installation media
    sed -i -e 's/^deb cdrom:/#deb cdrom:/g' /target/etc/apt/sources.list
    in-target sh -c "apt-get -y reinstall rsyslog"
  elif [ -n "\$(ls /target/tmp/rsyslog/rsyslog*.deb 2>/dev/null)" ]; then
    # offline installation; the deb from installation media is available
    in-target sh -c "cd /tmp/rsyslog ; dpkg -i *.deb"
  else
    # this is an offline installation, and the deb was not found
    log "(offline) unable to install rsyslog: deb file is unavailable"
  fi
fi

# patch for /usr/lib/udev/rules.d/90-alsa-restore.rules
# see: https://dev1galaxy.org/viewtopic.php?pid=57929#p57929
pathname="/target/usr/lib/udev/rules.d/90-alsa-restore.rules"
if [ -f "\$pathname" ]; then
  # verify if patch is required
  if [ \$(grep -c '^LABEL="alsa_restore_go"' \$pathname) -eq 2 ]; then
    # same label exists twice. patch is needed.
    linenum=\$(grep -n '^LABEL="alsa_restore_go"' \$pathname | (read first; read second; echo \$second | cut -d : -f 1))
    # delete the wrong label (2nd one) and insert the correct label
    sed -i -e "\${linenum}cLABEL=\"alsa_restore_std\"" \$pathname
  fi
fi
EOF

Or... to build your own updated ISO:

git clone https://git.devuan.org/devuan/installer-iso.git
cd installer-iso
./build-sudo.sh excalibur netinstall

replace "netinstall" with the iso you want to create (for example, "desktop")
view the README.md file there to see dependencies and other helpful info.

Offline

#5 2025-12-04 00:21:04

rmrichesjr
Member
Registered: 2018-12-18
Posts: 42  

Re: excalibur installation hangs in late-install-stage2 (in libvirt)

Superb!  Thank you very much!

Offline

#6 2025-12-06 22:11:04

rmrichesjr
Member
Registered: 2018-12-18
Posts: 42  

Re: excalibur installation hangs in late-install-stage2 (in libvirt)

After installing zsh, tried running ./build-sudo.sh per post #4.  It appears to require a /usr/share/debootstrap/scripts/excalibur file on the build host:

+./build-sudo.sh:8> export LC_ALL=C
+./build-sudo.sh:10> SUITE=excalibur 
+./build-sudo.sh:11> ISOSET=server 
+./build-sudo.sh:12> DISTVERSION=6.0.0-rc1 
+./build-sudo.sh:13> : http://pkgmaster.devuan.org/merged
+./build-sudo.sh:14> dpkg-architecture -q DEB_HOST_ARCH
+./build-sudo.sh:14> : amd64
+./build-sudo.sh:15> : excalibur.amd64.fs
+./build-sudo.sh:17> id -u
+./build-sudo.sh:17> [ 501 '=' 0 ']'
+./build-sudo.sh:21> [ -n '' ']'
+./build-sudo.sh:37> [ ! -d excalibur.amd64.fs ']'
+./build-sudo.sh:39> [ -z -o ! '' '=' N ']'
+./build-sudo.sh:40> [ -e excalibur.amd64.fs ']'
+./build-sudo.sh:48> [ ! -e excalibur.amd64.fs ']'
+./build-sudo.sh:49> echo '# Set up a chroot environment to build in'
# Set up a chroot environment to build in
+./build-sudo.sh:50> [ ! -e /usr/share/debootstrap/scripts/excalibur ']'
+./build-sudo.sh:51> echo 'MISSING debootstrap script /usr/share/debootstrap/scripts/excalibur'
MISSING debootstrap script /usr/share/debootstrap/scripts/excalibur
+./build-sudo.sh:52> exit 1

If I understand that correctly, it means the build host needs an excalibur version of debootstrap.  That would seem to imply that to build a release N ISO requires a release N build machine, which appears to be a chicken-and-egg situation.

In the interim, I'll try to implement the workaround to replace file /usr/lib/finish-install.d/18late-install-stage2 in the running installer.

Offline

Board footer