Ubuntu Noble Debootstrap Second Stage Fails

Asked by Joshua Quesenberry

I've created a Ubuntu Noble amd64 Docker image and am now trying to setup within it an arm64 cross-compile environment. I start off by running `debootstrap --arch=arm64 --foreign noble /opt/rpi_arm64 http://ports.ubuntu.com/ubuntu-ports/` and then run `chroot /opt/rpi_arm64/ ./debootstrap/debootstrap --second-stage`.

The last command ends with:

W: Failure trying to run: dpkg --force-overwrite --force-confold --skip-same-version --install /var/cache/apt/archives/libapparmor1_4.0.0-beta3-0ubuntu3_arm64.deb /var/cache/apt/archives/libargon2-1_0~20190702+dfsg-4build1_arm64.deb /var/cache/apt/archives/libcryptsetup12_2%3a2.7.0-1ubuntu4_arm64.deb /var/cache/apt/archives/libdevmapper1.02.1_2%3a1.02.185-3ubuntu3_arm64.deb /var/cache/apt/archives/libfdisk1_2.39.3-9ubuntu6_arm64.deb /var/cache/apt/archives/libjson-c5_0.17-1build1_arm64.deb /var/cache/apt/archives/libkmod2_31+20240202-2ubuntu7_arm64.deb /var/cache/apt/archives/libseccomp2_2.5.5-1ubuntu3_arm64.deb /var/cache/apt/archives/libsystemd-shared_255.4-1ubuntu8_arm64.deb /var/cache/apt/archives/systemd_255.4-1ubuntu8_arm64.deb /var/cache/apt/archives/systemd-dev_255.4-1ubuntu8_all.deb
W: See //debootstrap/debootstrap.log for details (possibly the package systemd is at fault)

Looking at /debootstrap/debootstrap.log there's a ton of output as expected, with the last several lines show:

Setting up util-linux (2.39.3-9ubuntu6) ...
update-alternatives: using /bin/more to provide /usr/bin/pager (pager) in auto mode
Setting up dpkg (1.22.6ubuntu6) ...
Setting up mount (2.39.3-9ubuntu6) ...
Setting up dash (0.5.12-6ubuntu5) ...
Setting up libpam-modules:arm64 (1.5.3-5ubuntu5) ...
Setting up perl-base (5.38.2-3.2build2) ...
Setting up gzip (1.12-1ubuntu3) ...
Setting up passwd (1:4.13+dfsg1-4ubuntu3) ...
Shadow passwords are now on.
Setting up libpam-runtime (1.5.3-5ubuntu5) ...
Setting up login (1:4.13+dfsg1-4ubuntu3) ...
Processing triggers for libc-bin (2.39-0ubuntu8) ...
./debootstrap/debootstrap: 1793: [: -eq: unexpected operator
./debootstrap/debootstrap: 1751: [: -eq: unexpected operator
(Reading database ... 3958 files and directories currently installed.)
Preparing to unpack .../libapparmor1_4.0.0-beta3-0ubuntu3_arm64.deb ...
Unpacking libapparmor1:arm64 (4.0.0-beta3-0ubuntu3) ...
Preparing to unpack .../libargon2-1_0~20190702+dfsg-4build1_arm64.deb ...
Unpacking libargon2-1:arm64 (0~20190702+dfsg-4build1) ...
Preparing to unpack .../libcryptsetup12_2%3a2.7.0-1ubuntu4_arm64.deb ...
Unpacking libcryptsetup12:arm64 (2:2.7.0-1ubuntu4) ...
Preparing to unpack .../libdevmapper1.02.1_2%3a1.02.185-3ubuntu3_arm64.deb ...
Unpacking libdevmapper1.02.1:arm64 (2:1.02.185-3ubuntu3) ...
Preparing to unpack .../libfdisk1_2.39.3-9ubuntu6_arm64.deb ...
Unpacking libfdisk1:arm64 (2.39.3-9ubuntu6) ...
Preparing to unpack .../libjson-c5_0.17-1build1_arm64.deb ...
Unpacking libjson-c5:arm64 (0.17-1build1) ...
Preparing to unpack .../libkmod2_31+20240202-2ubuntu7_arm64.deb ...
Unpacking libkmod2:arm64 (31+20240202-2ubuntu7) ...
Preparing to unpack .../libseccomp2_2.5.5-1ubuntu3_arm64.deb ...
Unpacking libseccomp2:arm64 (2.5.5-1ubuntu3) ...
Preparing to unpack .../libsystemd-shared_255.4-1ubuntu8_arm64.deb ...
Unpacking libsystemd-shared:arm64 (255.4-1ubuntu8) ...
Preparing to unpack .../systemd_255.4-1ubuntu8_arm64.deb ...
Unpacking systemd (255.4-1ubuntu8) ...
Preparing to unpack .../systemd-dev_255.4-1ubuntu8_all.deb ...
Unpacking systemd-dev (255.4-1ubuntu8) ...
Setting up libapparmor1:arm64 (4.0.0-beta3-0ubuntu3) ...
Setting up libargon2-1:arm64 (0~20190702+dfsg-4build1) ...
Setting up libdevmapper1.02.1:arm64 (2:1.02.185-3ubuntu3) ...
Setting up libfdisk1:arm64 (2.39.3-9ubuntu6) ...
Setting up libjson-c5:arm64 (0.17-1build1) ...
Setting up libkmod2:arm64 (31+20240202-2ubuntu7) ...
Setting up libseccomp2:arm64 (2.5.5-1ubuntu3) ...
Setting up libsystemd-shared:arm64 (255.4-1ubuntu8) ...
Setting up systemd-dev (255.4-1ubuntu8) ...
Setting up libcryptsetup12:arm64 (2:2.7.0-1ubuntu4) ...
Setting up systemd (255.4-1ubuntu8) ...
Created symlink /<email address hidden> -> /usr/lib/systemd/system/getty@.service.
Created symlink /etc/systemd/system/multi-user.target.wants/remote-fs.target -> /usr/lib/systemd/system/remote-fs.target.
Created symlink /etc/systemd/system/sysinit.target.wants/systemd-pstore.service -> /usr/lib/systemd/system/systemd-pstore.service.
Initializing machine ID from random generator.
/usr/lib/tmpfiles.d/systemd-network.conf:10: Failed to resolve user 'systemd-network': No such process
/usr/lib/tmpfiles.d/systemd-network.conf:11: Failed to resolve user 'systemd-network': No such process
/usr/lib/tmpfiles.d/systemd-network.conf:12: Failed to resolve user 'systemd-network': No such process
/usr/lib/tmpfiles.d/systemd-network.conf:13: Failed to resolve user 'systemd-network': No such process
/usr/lib/tmpfiles.d/systemd.conf:22: Failed to resolve group 'systemd-journal': No such process
/usr/lib/tmpfiles.d/systemd.conf:23: Failed to resolve group 'systemd-journal': No such process
/usr/lib/tmpfiles.d/systemd.conf:28: Failed to resolve group 'systemd-journal': No such process
/usr/lib/tmpfiles.d/systemd.conf:29: Failed to resolve group 'systemd-journal': No such process
/usr/lib/tmpfiles.d/systemd.conf:30: Failed to resolve group 'systemd-journal': No such process
Failed to take /etc/passwd lock: Invalid argument
dpkg: error processing package systemd (--install):
 installed systemd package post-installation script subprocess returned error exit status 1
Processing triggers for libc-bin (2.39-0ubuntu8) ...
Errors were encountered while processing:
 systemd

Running the second stage again, gives brief output:

I: Installing core packages...
W: Failure trying to run: dpkg --force-depends --install /var/cache/apt/archives/base-passwd_3.6.3build1_arm64.deb
W: See //debootstrap/debootstrap.log for details (possibly the package systemd is at fault)

Looking back at /debootstrap/debootstrap.log the new output is:

dpkg: warning: parsing file '/var/lib/dpkg/status' near line 2773 package 'dpkg':
 missing 'Description' field
dpkg: warning: parsing file '/var/lib/dpkg/status' near line 2773 package 'dpkg':
 missing 'Architecture' field
dpkg: error: parsing file '/var/lib/dpkg/status' near line 2773 package 'dpkg':
 multiple non-coinstallable package instances present; most probably due to an upgrade from an unofficial dpkg

I'm not super familiar with debootstrap at this point. Last time I successfully went down this path was with Debian Bullseye from here: http://debian.mirrors.ovh.net/debian, but I really want to switch to Ubuntu. Any ideas on how to proceed?

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.