View Issue Details

IDProjectCategoryView StatusLast Update
0008628Kali LinuxKali Package Bugpublic2024-03-05 01:08
Reporterbadsectorlabs Assigned Toarnaudr  
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Summary0008628: GRUB Regression: grub2 error prevents Kali install
Description

During install of Kali 2023.4, on or after 2024-02-08, the grub2 package fails to configure with:

Feb 8 22:07:08 grub-installer: info: Identified partition label for /dev/sda1: msdos
Feb 8 22:07:08 grub-installer: dpkg: warning: 'start-stop-daemon' not found in PATH or not executable
Feb 8 22:07:08 grub-installer: dpkg: error: 1 expected program not found in PATH or not executable
Feb 8 22:07:08 grub-installer: Note: root's PATH should usually contain /usr/local/sbin, /u
Feb 8 22:07:08 grub-installer: sr/sbin and /sbin

I believe this is due to this change in grub2: https://pkg.kali.org/news/572862/grub2-212-1kali1-migrated-to-kali-rolling/

This prevents Kali from successfully installing, and the grub2 package should be reverted to prevent new Kali users from being unable to use the distro.

Activities

badsectorlabs

badsectorlabs

2024-02-09 04:11

reporter   ~0018897

Image of the console of the Kali installer

image.png (87,149 bytes)   
image.png (87,149 bytes)   
badsectorlabs

badsectorlabs

2024-02-09 04:15

reporter   ~0018898

I am unable to upload the full installer logs as it is blocked by cloudflare as "malicious" so here is the last part with the relevant grub errors:

Feb 8 22:05:57 in-target: Setting up network-manager-fortisslvpn-gnome (1.4.0-1) ...^M
Feb 8 22:05:57 in-target: Setting up network-manager-openconnect-gnome (1.2.10-3) ...^M
Feb 8 22:05:57 in-target: Setting up kali-desktop-core (2024.1.0) ...^M
Feb 8 22:05:57 in-target: Setting up kali-desktop-xfce (2024.1.0) ...^M
Feb 8 22:05:57 in-target: Processing triggers for sgml-base (1.31) ...^M
Feb 8 22:05:57 in-target: Setting up docbook-xml (4.5-12) ...^M
Feb 8 22:05:58 in-target: Processing triggers for dictionaries-common (1.29.7) ...^M
Feb 8 22:05:58 in-target: aspell-autobuildhash: processing: en [en-common].^M
Feb 8 22:05:58 in-target: aspell-autobuildhash: processing: en [en-variant_0].^M
Feb 8 22:05:58 in-target: aspell-autobuildhash: processing: en [en-variant_1].^M
Feb 8 22:05:58 in-target: aspell-autobuildhash: processing: en [en-variant_2].^M
Feb 8 22:05:58 in-target: aspell-autobuildhash: processing: en [en-w_accents-only].^M
Feb 8 22:05:58 in-target: aspell-autobuildhash: processing: en [en-wo_accents-only].^M
Feb 8 22:05:58 in-target: aspell-autobuildhash: processing: en [en_AU-variant_0].^M
Feb 8 22:05:58 in-target: aspell-autobuildhash: processing: en [en_AU-variant_1].^M
Feb 8 22:05:58 in-target: aspell-autobuildhash: processing: en [en_AU-w_accents-only].^M
Feb 8 22:05:58 in-target: aspell-autobuildhash: processing: en [en_AU-wo_accents-only].^M
Feb 8 22:05:58 in-target: aspell-autobuildhash: processing: en [en_CA-variant_0].^M
Feb 8 22:05:58 in-target: aspell-autobuildhash: processing: en [en_CA-variant_1].^M
Feb 8 22:05:58 in-target: aspell-autobuildhash: processing: en [en_CA-w_accents-only].^M
Feb 8 22:05:58 in-target: aspell-autobuildhash: processing: en [en_CA-wo_accents-only].^M
Feb 8 22:05:58 in-target: aspell-autobuildhash: processing: en [en_GB-ise-w_accents-only].^M
Feb 8 22:05:58 in-target: aspell-autobuildhash: processing: en [en_GB-ise-wo_accents-only].^M
Feb 8 22:05:58 in-target: aspell-autobuildhash: processing: en [en_GB-ize-w_accents-only].^M
Feb 8 22:05:58 in-target: aspell-autobuildhash: processing: en [en_GB-ize-wo_accents-only].^M
Feb 8 22:05:58 in-target: aspell-autobuildhash: processing: en [en_GB-variant_0].^M
Feb 8 22:05:58 in-target: aspell-autobuildhash: processing: en [en_GB-variant_1].^M
Feb 8 22:05:58 in-target: aspell-autobuildhash: processing: en [en_US-w_accents-only].^M
Feb 8 22:05:58 in-target: aspell-autobuildhash: processing: en [en_US-wo_accents-only].^M
Feb 8 22:05:58 in-target: Processing triggers for libgdk-pixbuf-2.0-0:amd64 (2.42.10+dfsg-3) ...^M
Feb 8 22:05:58 in-target: Processing triggers for sgml-base (1.31) ...^M
Feb 8 22:05:59 pkgsel: finishing up
Feb 8 22:06:02 kernel: [ 269.339643] ISO 9660 Extensions: Microsoft Joliet Level 3
Feb 8 22:06:02 kernel: [ 269.339989] ISO 9660 Extensions: RRIP_1991A
Feb 8 22:06:02 main-menu[1596]: (process:31692): dpkg-divert: warning: diverting file '/sbin/start-stop-daemon' from an Essential package with rename is dangerous, use --no-rename
Feb 8 22:06:02 main-menu[1596]: (process:31692): dpkg-divert: warning: diverting file '/sbin/start-stop-daemon' from an Essential package with rename is dangerous, use --no-rename
Feb 8 22:06:02 main-menu[1596]: (process:31692): dpkg-divert: warning: diverting file '/sbin/start-stop-daemon' from an Essential package with rename is dangerous, use --no-rename
Feb 8 22:06:02 kernel: [ 269.347445] ISO 9660 Extensions: Microsoft Joliet Level 3
Feb 8 22:06:02 kernel: [ 269.347649] ISO 9660 Extensions: RRIP_1991A
Feb 8 22:06:02 main-menu[1596]: INFO: Falling back to the package description for brltty-udeb
Feb 8 22:06:02 depthcharge-tools-installer: Not installing to non-ChromeOS board.
Feb 8 22:06:02 depthcharge-tools-installer: Not installing to non-ChromeOS board.
Feb 8 22:06:02 main-menu[1596]: INFO: Falling back to the package description for brltty-udeb
Feb 8 22:06:02 main-menu[1596]: INFO: Menu item 'grub-installer' selected
Feb 8 22:06:02 grub-installer: info: architecture: amd64/generic
Feb 8 22:06:02 grub-installer: info: Bind mounting /run into /target
Feb 8 22:06:02 /bin/in-target: warning: /target/etc/mtab won't be updated since it is a symlink.
Feb 8 22:06:02 in-target: Reading package lists...
Feb 8 22:06:02 in-target:
Feb 8 22:06:02 in-target: Building dependency tree...
Feb 8 22:06:02 in-target:
Feb 8 22:06:02 in-target: Reading state information...
Feb 8 22:06:02 in-target:
Feb 8 22:06:02 in-target: The following additional packages will be installed:
Feb 8 22:06:02 in-target: libefiboot1 libefivar1 os-prober
Feb 8 22:06:02 in-target: Suggested packages:
Feb 8 22:06:02 in-target: multiboot-doc grub-emu mtools xorriso
Feb 8 22:06:02 in-target: The following NEW packages will be installed:
Feb 8 22:06:02 in-target: grub-common libefiboot1 libefivar1 os-prober
Feb 8 22:06:03 kernel: [ 270.338727] ISO 9660 Extensions: Microsoft Joliet Level 3
Feb 8 22:06:03 kernel: [ 270.338933] ISO 9660 Extensions: RRIP_1991A
Feb 8 22:06:03 in-target: 0 upgraded, 4 newly installed, 0 to remove and 68 not upgraded.
Feb 8 22:06:03 in-target: Need to get 2,984 kB/3,015 kB of archives.
Feb 8 22:06:03 in-target: After this operation, 18.3 MB of additional disk space will be used.
Feb 8 22:06:03 in-target: Get:2 cdrom://[Kali GNU/Linux 2023.4rc1 Kali-last-snapshot - Official amd64 BD Binary-1 with firmware 20231130-14:29] kali-rolling/main amd64 os-prober amd64 1.81 [30.9 kB]
Feb 8 22:06:03 in-target: Get:4 http://http.kali.org/kali kali-rolling/main amd64 grub-common amd64 2.12-1+kali1 [2,884 kB]
Feb 8 22:06:03 in-target: Get:3 http://mirrors.jevincanders.net/kali kali-rolling/main amd64 libefiboot1 amd64 38-3 [42.8 kB]
Feb 8 22:06:03 in-target: Get:1 http://kali.darklab.sh/kali kali-rolling/main amd64 libefivar1 amd64 38-3 [56.9 kB]
Feb 8 22:06:03 in-target: Fetched 2,984 kB in 1s (5,462 kB/s)
Feb 8 22:06:03 in-target: Selecting previously unselected package libefivar1:amd64.^M
Feb 8 22:06:03 in-target: (Reading database ... ^M
Feb 8 22:06:03 in-target: (Reading database ... 5%^M(Reading database ... 10%^M(Reading database ... 15%^M(Reading database ... 20%^M(Reading database ... 25%^M(Reading database ... 30%^M(Reading database ... 35%^M(Reading database ... 40%^M(Reading database ... 45%^M
Feb 8 22:06:03 in-target: (Reading database ... 50%^M
Feb 8 22:06:03 in-target: (Reading database ... 55%^M
Feb 8 22:06:03 in-target: (Reading database ... 60%^M
Feb 8 22:06:03 in-target: (Reading database ... 65%^M
Feb 8 22:06:03 in-target: (Reading database ... 70%^M
Feb 8 22:06:03 in-target: (Reading database ... 75%^M
Feb 8 22:06:03 in-target: (Reading database ... 80%^M
Feb 8 22:06:03 in-target: (Reading database ... 85%^M
Feb 8 22:06:03 in-target: (Reading database ... 90%^M
Feb 8 22:06:03 in-target: (Reading database ... 95%^M
Feb 8 22:06:03 in-target: (Reading database ... 100%^M(Reading database ... 143360 files and directories currently installed.)^M
Feb 8 22:06:03 in-target: Preparing to unpack .../libefivar1_38-3_amd64.deb ...^M
Feb 8 22:06:03 in-target: Unpacking libefivar1:amd64 (38-3) ...^M
Feb 8 22:06:03 in-target: Selecting previously unselected package libefiboot1:amd64.^M
Feb 8 22:06:03 in-target: Preparing to unpack .../libefiboot1_38-3_amd64.deb ...^M
Feb 8 22:06:03 in-target: Unpacking libefiboot1:amd64 (38-3) ...^M
Feb 8 22:06:03 in-target: Selecting previously unselected package grub-common.^M
Feb 8 22:06:03 in-target: Preparing to unpack .../grub-common_2.12-1+kali1_amd64.deb ...^M
Feb 8 22:06:03 in-target: Unpacking grub-common (2.12-1+kali1) ...^M
Feb 8 22:06:03 in-target: Selecting previously unselected package os-prober.^M
Feb 8 22:06:03 in-target: Preparing to unpack .../os-prober_1.81_amd64.deb ...^M
Feb 8 22:06:03 in-target: Unpacking os-prober (1.81) ...^M
Feb 8 22:06:03 in-target: Setting up libefivar1:amd64 (38-3) ...^M
Feb 8 22:06:03 in-target: Setting up libefiboot1:amd64 (38-3) ...^M
Feb 8 22:06:03 in-target: Setting up grub-common (2.12-1+kali1) ...^M
Feb 8 22:06:04 in-target: Setting up os-prober (1.81) ...^M
Feb 8 22:06:04 in-target: Processing triggers for libc-bin (2.37-12) ...^M
Feb 8 22:06:04 in-target: Processing triggers for man-db (2.12.0-3) ...^M
Feb 8 22:06:04 in-target: Processing triggers for kali-menu (2023.4.7) ...^M
Feb 8 22:06:04 kernel: [ 271.839451] ISO 9660 Extensions: Microsoft Joliet Level 3
Feb 8 22:06:04 kernel: [ 271.839658] ISO 9660 Extensions: RRIP_1991A
Feb 8 22:06:04 kernel: [ 271.846172] ISO 9660 Extensions: Microsoft Joliet Level 3
Feb 8 22:06:04 kernel: [ 271.846367] ISO 9660 Extensions: RRIP_1991A
Feb 8 22:06:04 /bin/in-target: warning: /target/etc/mtab won't be updated since it is a symlink.
Feb 8 22:06:04 in-target: Reading package lists...
Feb 8 22:06:04 in-target:
Feb 8 22:06:04 in-target: Building dependency tree...
Feb 8 22:06:04 in-target:
Feb 8 22:06:04 in-target: Reading state information...
Feb 8 22:06:04 in-target:
Feb 8 22:06:04 in-target: grub-common is already the newest version (2.12-1+kali1).
Feb 8 22:06:04 in-target: 0 upgraded, 0 newly installed, 0 to remove and 68 not upgraded.
Feb 8 22:06:04 kernel: [ 272.247040] ISO 9660 Extensions: Microsoft Joliet Level 3
Feb 8 22:06:04 kernel: [ 272.247258] ISO 9660 Extensions: RRIP_1991A
Feb 8 22:06:04 kernel: [ 272.254182] ISO 9660 Extensions: Microsoft Joliet Level 3
Feb 8 22:06:04 kernel: [ 272.254379] ISO 9660 Extensions: RRIP_1991A
Feb 8 22:06:05 grub-installer: info: Identified partition label for /dev/sda1: msdos
Feb 8 22:06:05 grub-installer: dpkg: warning: 'start-stop-daemon' not found in PATH or not executable
Feb 8 22:06:05 grub-installer: dpkg: error: 1 expected program not found in PATH or not executable
Feb 8 22:06:05 grub-installer: Note: root's PATH should usually contain /usr/local/sbin, /u
Feb 8 22:06:05 grub-installer: sr/sbin and /sbin
Feb 8 22:06:05 main-menu[1596]: (process:7690): File descriptor 3 (pipe:[12209]) leaked on lvdisplay invocation.
Feb 8 22:06:05 main-menu[1596]: (process:7690): Parent PID 8018: /bin/sh
Feb 8 22:06:05 main-menu[1596]: (process:7690): File descriptor 4 (/dev/tty1) leaked on lvdisplay invocation.
Feb 8 22:06:05 main-menu[1596]: (process:7690): Parent PID 8018: /bin/sh
Feb 8 22:06:05 main-menu[1596]: (process:7690): File descriptor 5 (/dev/tty1) leaked on lvdisplay invocation.
Feb 8 22:06:05 main-menu[1596]: (process:7690): Parent PID 8018: /bin/sh
Feb 8 22:06:05 main-menu[1596]: (process:7690): File descriptor 6 (/dev/tty1) leaked on lvdisplay invocation.
Feb 8 22:06:05 main-menu[1596]: (process:7690): Parent PID 8018: /bin/sh
Feb 8 22:06:05 main-menu[1596]: (process:7690):
Feb 8 22:06:05 main-menu[1596]: (process:7690): Volume group "sda" not found
Feb 8 22:06:05 main-menu[1596]: (process:7690):
Feb 8 22:06:05 main-menu[1596]: (process:7690):
Feb 8 22:06:05 main-menu[1596]: (process:7690): Cannot process volume group sda
Feb 8 22:06:05 main-menu[1596]: (process:7690):
Feb 8 22:06:05 main-menu[1596]: WARNING : Configuring 'grub-installer' failed with error code 2
Feb 8 22:06:05 main-menu[1596]: WARNING
: Menu item 'grub-installer' failed.
Feb 8 22:06:52 main-menu[1596]: INFO: Modifying debconf priority limit from 'critical' to 'high'
Feb 8 22:06:52 debconf: Setting debconf/priority to high
Feb 8 22:06:52 main-menu[1596]: INFO: Falling back to the package description for brltty-udeb
Feb 8 22:06:52 depthcharge-tools-installer: Not installing to non-ChromeOS board.
Feb 8 22:06:52 depthcharge-tools-installer: Not installing to non-ChromeOS board.
Feb 8 22:07:07 main-menu[1596]: INFO: Falling back to the package description for brltty-udeb
Feb 8 22:07:07 main-menu[1596]: INFO: Menu item 'grub-installer' selected
Feb 8 22:07:07 grub-installer: info: architecture: amd64/generic
Feb 8 22:07:07 grub-installer: info: Bind mounting /run into /target
Feb 8 22:07:07 /bin/in-target: warning: /target/etc/mtab won't be updated since it is a symlink.
Feb 8 22:07:07 in-target: Reading package lists...
Feb 8 22:07:07 in-target:
Feb 8 22:07:07 in-target: Building dependency tree...
Feb 8 22:07:07 in-target:
Feb 8 22:07:07 in-target: Reading state information...
Feb 8 22:07:07 in-target:
Feb 8 22:07:07 in-target: grub-common is already the newest version (2.12-1+kali1).
Feb 8 22:07:07 in-target: 0 upgraded, 0 newly installed, 0 to remove and 68 not upgraded.
Feb 8 22:07:08 kernel: [ 335.267539] ISO 9660 Extensions: Microsoft Joliet Level 3
Feb 8 22:07:08 kernel: [ 335.267953] ISO 9660 Extensions: RRIP_1991A
Feb 8 22:07:08 kernel: [ 335.276128] ISO 9660 Extensions: Microsoft Joliet Level 3
Feb 8 22:07:08 kernel: [ 335.276360] ISO 9660 Extensions: RRIP_1991A
Feb 8 22:07:08 /bin/in-target: warning: /target/etc/mtab won't be updated since it is a symlink.
Feb 8 22:07:08 in-target: Reading package lists...
Feb 8 22:07:08 in-target:
Feb 8 22:07:08 in-target: Building dependency tree...
Feb 8 22:07:08 in-target:
Feb 8 22:07:08 in-target: Reading state information...
Feb 8 22:07:08 in-target:
Feb 8 22:07:08 in-target: grub-common is already the newest version (2.12-1+kali1).
Feb 8 22:07:08 in-target: 0 upgraded, 0 newly installed, 0 to remove and 68 not upgraded.
Feb 8 22:07:08 kernel: [ 335.672545] ISO 9660 Extensions: Microsoft Joliet Level 3
Feb 8 22:07:08 kernel: [ 335.672855] ISO 9660 Extensions: RRIP_1991A
Feb 8 22:07:08 kernel: [ 335.680326] ISO 9660 Extensions: Microsoft Joliet Level 3
Feb 8 22:07:08 kernel: [ 335.680530] ISO 9660 Extensions: RRIP_1991A
Feb 8 22:07:08 grub-installer: info: Identified partition label for /dev/sda1: msdos
Feb 8 22:07:08 grub-installer: dpkg: warning: 'start-stop-daemon' not found in PATH or not executable
Feb 8 22:07:08 grub-installer: dpkg: error: 1 expected program not found in PATH or not executable
Feb 8 22:07:08 grub-installer: Note: root's PATH should usually contain /usr/local/sbin, /u
Feb 8 22:07:08 grub-installer: sr/sbin and /sbin
Feb 8 22:07:08 main-menu[1596]: (process:8068): File descriptor 3 (pipe:[12209]) leaked on lvdisplay invocation.
Feb 8 22:07:08 main-menu[1596]: (process:8068): Parent PID 8267: /bin/sh
Feb 8 22:07:08 main-menu[1596]: (process:8068): File descriptor 4 (/dev/tty1) leaked on lvdisplay invocation.
Feb 8 22:07:08 main-menu[1596]: (process:8068): Parent PID 8267: /bin/sh
Feb 8 22:07:08 main-menu[1596]: (process:8068): File descriptor 5 (/dev/tty1) leaked on lvdisplay invocation.
Feb 8 22:07:08 main-menu[1596]: (process:8068): Parent PID 8267: /bin/sh
Feb 8 22:07:08 main-menu[1596]: (process:8068): File descriptor 6 (/dev/tty1) leaked on lvdisplay invocation.
Feb 8 22:07:08 main-menu[1596]: (process:8068): Parent PID 8267: /bin/sh
Feb 8 22:07:08 main-menu[1596]: (process:8068):
Feb 8 22:07:08 main-menu[1596]: (process:8068): Volume group "sda" not found
Feb 8 22:07:08 main-menu[1596]: (process:8068):
Feb 8 22:07:08 main-menu[1596]: (process:8068):
Feb 8 22:07:08 main-menu[1596]: (process:8068): Cannot process volume group sda
Feb 8 22:07:08 main-menu[1596]: (process:8068):
Feb 8 22:07:08 main-menu[1596]: WARNING : Configuring 'grub-installer' failed with error code 2
Feb 8 22:07:08 main-menu[1596]: WARNING
: Menu item 'grub-installer' failed.
Feb 8 22:07:11 main-menu[1596]: INFO: Modifying debconf priority limit from 'high' to 'medium'
Feb 8 22:07:11 debconf: Setting debconf/priority to medium
Feb 8 22:07:11 main-menu[1596]: INFO: Falling back to the package description for brltty-udeb
Feb 8 22:07:11 depthcharge-tools-installer: Not installing to non-ChromeOS board.
Feb 8 22:07:11 depthcharge-tools-installer: Not installing to non-ChromeOS board.
Feb 8 22:07:55 main-menu[1596]: INFO: Falling back to the package description for brltty-udeb
Feb 8 22:07:55 main-menu[1596]: INFO: Menu item 'save-logs' selected

rhertzog

rhertzog

2024-02-09 08:25

administrator   ~0018899

I wanted to answer but also got blocked by CloudFlare rules... here's my answer and my questions:
https://paste.debian.net/1306755/

rhertzog

rhertzog

2024-02-09 08:26

administrator   ~0018900

(trying to repost while splitting my answer in parts)

Somehow I have the feeling that this might be related to the /usr-merge process (i.e. /sbin == /usr/sbin nowadays). I would like to see the full log. Can you upload it to http://paste.debian.net for example?

I'm interested to see if there are other places where the diversion of start-stop-daemon is mentioned and whether the package installation process involved some dpkg upgrade (seems unlikely).

I have not yet figured out where start-stop-daemon is diverted. The log file says "main-menu" on the lines mentioning dpkg-divert but that udeb is definitely not responsible of that operation. It happens shortly at the end of "pkgsel" after the finishing up message:

b 8 22:05:59 pkgsel: finishing up
Feb 8 22:06:02 kernel: [ 269.339643] ISO 9660 Extensions: Microsoft Joliet Level 3
Feb 8 22:06:02 kernel: [ 269.339989] ISO 9660 Extensions: RRIP_1991A
Feb 8 22:06:02 main-menu[1596]: (process:31692): dpkg-divert: warning: diverting file '/sbin/start-stop-daemon' from an Essential package with rename is dangerous, use --no-rename
Feb 8 22:06:02 main-menu[1596]: (process:31692): dpkg-divert: warning: diverting file '/sbin/start-stop-daemon' from an Essential package with rename is dangerous, use --no-rename
Feb 8 22:06:02 main-menu[1596]: (process:31692): dpkg-divert: warning: diverting file '/sbin/start-stop-daemon' from an Essential package with rename is dangerous, use --no-rename

But there's not much happening after "finishing up":
https://salsa.debian.org/installer-team/pkgsel/-/blob/master/debian/postinst?ref_type=heads#L179

rhertzog

rhertzog

2024-02-09 08:30

administrator   ~0018901

Last edited: 2024-02-09 08:30

There's a "cleanup" funtion which drops some diversions but it only handles /usr/bin/fc-cache according to https://salsa.debian.org/installer-team/pkgsel/-/blob/master/debian/postinst?ref_type=heads#L10

It would be interesting to run commands in the /target system from the shell available in the installer (on the second or third console) and share the output with us:

# ls -al /sbin
# ls -al /usr/sbin/start-*
# dpkg -S /usr/sbin/start-stop-daemon
# cat /var/lib/dpkg/diversions
badsectorlabs

badsectorlabs

2024-02-09 15:28

reporter   ~0018902

Here are the commands you requested: https://paste.debian.net/1306785/

And here is the full log: https://gitlab.com/-/snippets/3671887 (was too large for paste.debian.net)

badsectorlabs

badsectorlabs

2024-02-09 15:46

reporter   ~0018903

Here are the commands run when chroot'd to /target: https://paste.debian.net/1306789/

badsectorlabs

badsectorlabs

2024-02-09 16:07

reporter   ~0018904

Perhaps related to the dpkg change and not grub's fault?

https://gitlab.com/kalilinux/packages/dpkg/-/commit/1c0b63b54bd84b5794e36ba834090c8330d11a50#9c96da0e9f91d7d8937b69b524702c106258f0d1_1_46

This line indicates that start-stop-deamon has moved, however it is just not present on my system (chroot'd to /target):

find / -iname start-stop-daemon -type f
(no results)

dpkg --version
Debian 'dpkg' package management program version 1.22.4 (amd64).

badsectorlabs

badsectorlabs

2024-02-09 16:50

reporter   ~0018905

Last edited: 2024-02-09 17:06

Here is the commit where debian moved start-stop-daemon: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=7c961df91bb81f27657cdca31d761b86140e9a76

And that change is in Kali's dpkg: https://gitlab.com/kalilinux/packages/dpkg/-/blob/kali/master/debian/dpkg.install?ref_type=heads#L17

I have a workaround to get Kali installed, perhaps it will help track down the root of the issue (dpkg not dropping start-stop-daemon properly the first time?):

  1. Install Kali 2023.4 from ISO, it will fail on the grub install
  2. In the console, ALT+F2 to get a shell
  3. chroot /target bash
  4. echo -e "#!/bin/bash\nexec true" > /sbin/start-stop-daemon
  5. chmod +x /sbin/start-stop-daemon
  6. apt reinstall dpkg
    At this stage, file /sbin/start-stop-daemon shows it is an ELF - it was written by dpkg correctly
  7. ALT+F1
  8. Continue the install at "Install the GRUB bootloader"
rhertzog

rhertzog

2024-02-13 16:01

administrator   ~0018909

Ok, that seems to nail down the issue a bit more closely. debian-installer-utils is involved here because its chroot-setup.sh function does divert /sbin/start-stop-daemon:
https://salsa.debian.org/installer-team/debian-installer-utils/-/blob/master/chroot-setup.sh?ref_type=heads#L67

And we know of possible file loss scenario involving dpkg when we divert the non-converted path as is done here.

rhertzog

rhertzog

2024-02-14 07:08

administrator   ~0018910

Helmut opened a bug on the Debian side for this:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1063878

The proposed fix is here:
https://salsa.debian.org/installer-team/debian-installer-utils/-/merge_requests/11

rhertzog

rhertzog

2024-02-14 07:54

administrator   ~0018911

@badsectorlabs What ISO image and what installation method are you using for the installation? The problematic dpkg is newer than the 2023.4 release so that suggest that you are installing that package from the network during installation. Or that you have built a custom image.

I see that you are using a custom preseed file, can you share the content of http://10.98.108.250:8848/kali-preseed.cfg ? Maybe that undoes the setting that render a typical installation as offline.

rhertzog

rhertzog

2024-02-14 08:03

administrator   ~0018912

Looking again at the log, I see that dpkg 1.22.1 from 2023.4 (with /sbin/) is installed in the bootstrap phase, but it then gets upgraded during pkgsel to 1.22.4 (with /usr/sbin) and it's during this upgrade that we lose start-stop-daemon.

And since this upgrade is disabled in the official image, you are the only one experiencing this issue. The problematic code from chroot-setup.sh is executed in all "in-target" invocation and will badly behave (i.e. remove start-stop-daemon) only after the upgrade of dpkg.

rhertzog

rhertzog

2024-02-14 08:43

administrator   ~0018913

Last edited: 2024-02-14 08:44

The impact of this bug is limited for the next Kali release. If we have the new dpkg installed during the bootstrap phase, we will no longer lose start-stop-daemon in this scenario however the diversion installed by chroot-setup.sh might not work if dpkg gets upgraded/installed in one of the following steps. In that case, it means that stars-stop-daemon will do its usual thing instead of doing nothing and we might have daemons running inside the installer.

While not ideal, this seems a relatively small issue, in particular given that the default configuration of our ISO images is to work offline and not download any updates from the network. And thus the default configuration has no possibility to fetch a newer version of dpkg at all, and thus no possibility to trigger this bug.

We should definitely fix this bug in debian-installer-utils but we can wait for the Debian fix and not block the 2024.1 release.

faultier

faultier

2024-02-15 09:53

reporter   ~0018916

so everyone using the netinstaller is just screwed for now?

I don't think this should be the quality standard for kali to aim for. Imo, this issue should be higher prioritized than "relatively small" as lots of (and also professional) people depend on it.
as there is a fix, it should be implemented one way or another otherwise grub2 should be reverted.

arnaudr

arnaudr

2024-02-15 11:13

manager   ~0018917

so everyone using the netinstaller is just screwed for now?

Nope. Did you try the latest weekly image? Get it from http://cdimage.kali.org/kali-images/kali-weekly/kali-linux-2024-W07-installer-netinst-amd64.iso. I tried and it works for me.

g0tmi1k

g0tmi1k

2024-02-15 13:57

administrator   ~0018918

Last edited: 2024-02-15 14:13

@faultier,
100% not what we are aiming for! I think there was some mis understanding/communicate here - sorry!

For what its also worth, we are aiming to freeze the repos ready for 2024.1 in 1(ish) week time with a release shortly after.
We are hoping to have this addressed/sorted for the release

badsectorlabs

badsectorlabs

2024-03-04 20:42

reporter   ~0018988

Using the new 2024.1 installer fixes this issue.

arnaudr

arnaudr

2024-03-05 01:08

manager   ~0018991

Thanks for the confirmation. I'm closing the issue then.

Issue History

Date Modified Username Field Change
2024-02-09 04:09 badsectorlabs New Issue
2024-02-09 04:11 badsectorlabs Note Added: 0018897
2024-02-09 04:11 badsectorlabs File Added: image.png
2024-02-09 04:15 badsectorlabs Note Added: 0018898
2024-02-09 08:25 rhertzog Note Added: 0018899
2024-02-09 08:26 rhertzog Note Added: 0018900
2024-02-09 08:30 rhertzog Note Added: 0018901
2024-02-09 08:30 rhertzog Note Edited: 0018901
2024-02-09 15:28 badsectorlabs Note Added: 0018902
2024-02-09 15:46 badsectorlabs Note Added: 0018903
2024-02-09 16:07 badsectorlabs Note Added: 0018904
2024-02-09 16:50 badsectorlabs Note Added: 0018905
2024-02-09 17:06 badsectorlabs Note Edited: 0018905
2024-02-13 16:01 rhertzog Note Added: 0018909
2024-02-14 07:08 rhertzog Note Added: 0018910
2024-02-14 07:54 rhertzog Note Added: 0018911
2024-02-14 08:03 rhertzog Note Added: 0018912
2024-02-14 08:43 rhertzog Note Added: 0018913
2024-02-14 08:44 rhertzog Note Edited: 0018913
2024-02-15 09:53 faultier Note Added: 0018916
2024-02-15 11:13 arnaudr Note Added: 0018917
2024-02-15 13:57 g0tmi1k Note Added: 0018918
2024-02-15 14:12 g0tmi1k Note Edited: 0018918
2024-02-15 14:13 g0tmi1k Note Edited: 0018918
2024-03-04 20:42 badsectorlabs Note Added: 0018988
2024-03-05 01:08 arnaudr Note Added: 0018991
2024-03-05 01:08 arnaudr Assigned To => arnaudr
2024-03-05 01:08 arnaudr Status new => resolved
2024-03-05 01:08 arnaudr Resolution open => fixed