0

I'm trying to install a custom 18.04 ISO on a Dell Optiplex 9020 via USB stick, and get "No installable kernel was found in the defined APT sources."

When I install using the same ISO on VirtualBox, I don't see this error.

For both machines, I see /cdrom/pool/main/l/linux-signed/linux-image-4.15.0-20-generic_4.15.0-20.21_amd64.deb, and that package is listed in /cdrom/dists/bionic/main/binary-amd64/Packages.gz. For both machines, /target/etc/apt/sources.list is just:

deb cdrom:[Ubuntu-Server 18.04 LTS _Bionic Beaver_ - Release amd64 (20180426)]/ bionic extras main restricted

But when I run from the installer console:

chroot /target apt-cache search linux-image

On the 9020 this returns nothing, but in VirtualBox I see packages listed. Also, when I run

chroot /target apt-cache policy

In the VM, it shows 2 directories each for main and restricted (amd64 and i386), and 1 for extras amd64. On the 9020, it only shows the extras directory.

Why would that be? Is there some information the installer doesn't get when running on the 9020?

EDIT: Trying

chroot /target apt update

I see

Ign:1 cdrom://Ubuntu-Server 18.04 LTS _Bionic Beaver_ - Release amd64 (20180426) bionic InRelease
Ign:1 cdrom://Ubuntu-Server 18.04 LTS _Bionic Beaver_ - Release amd64 (20180426) bionic Release
Reading package lists... Done
Building dependency tree
Reading state information... Done

But 'apt-cache policy' still returns the same result as before.

Running 'chroot /target apt --print-uris update' finds all the paths, but the files listed are Packages.xz, not Packages.gz, the size is 0, and there's no hash! The lines are like:

'cdrom://[Ubuntu-Server 18.04 LTS _Bionic Beaver_ - Release amd64 (20180426)]/dists/bionic/main/binary-amd64/Packages.xz' Ubuntu-Server%2018.04%20LTS%20%5fBionic%20Beaver%5f%20-%20Release%20amd64%20(20180426)_dists_bionic_main_binary-amd64_Packages 0

EDIT: I tried this on another VirtualBox VM and saw the same error. So the one good VM is 'dirty' somehow! The same symptoms all apply, though.

After some more examination, the problem was that not all apt-ftparchive commands were getting run. See below. If someone explains to me how one VBox could find the Packages and another couldn't, I will mark that as the answer.

2
  • 2
    Check whether you have the install media attached in each machine, then run sudo apt update and try again. – Melebius Apr 17 '19 at 9:38
  • Thanks - it didn't seem to change things. I updated the question with the output. – ctd Apr 17 '19 at 16:56
0

Due to my human error, only the last of these lines was getting run:

apt-ftparchive -c $APTCONF generate $BASEDIR/apt-ftparchive-deb.conf
apt-ftparchive -c $APTCONF generate $BASEDIR/apt-ftparchive-udeb.conf
apt-ftparchive -c $APTCONF generate $BASEDIR/apt-ftparchive-extras.conf

Running the other two fixed the problem. The conf files were as in https://help.ubuntu.com/community/InstallCDCustomization, with 'xenial' changed to 'bionic'. As described in that web page, I also had to put the override files in /opt/indices, with:

pushd /opt/indices
for SUFFIX in extra.main main main.debian-installer restricted restricted.debian-installer; do
  wget http://archive.ubuntu.com/ubuntu/indices/override.bionic.$SUFFIX
done

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.