livefs-editor icon indicating copy to clipboard operation
livefs-editor copied to clipboard

Ubuntu Server 22.04 with replace-kernel and add-autoinstall-config stuck on `mouting /dev/sr0 on /cdrom failed: No such device`

Open cfroystad opened this issue 2 years ago • 4 comments

Current behavior

After replacing the bundled kernel with the hwe version on Ubuntu 22.04 (using replace-kernel) and adding an autoinstall script (using add-autoinstall-config), the installer gets stuck after casper-premount.

Error message: 'mount: mounting /dev/sr0 on /cdrom failed: No such device'

If I remove either of add-autoinstall-config or replace-kernel, booting and installation works fine as expected. However, the combination results in installation getting stuck on this error.

Expected behavior

Being able to both replace the kernel and use autoinstall together.

Reproduce

- name: replace-kernel
  flavor: generic-hwe-22.04

- name: add-autoinstall-config
  autoinstall_config: autoinstall.yaml

pre-seed.yaml:

#cloud-config
autoinstall:
  user-data:
    disable_root: true
    timezone: UTC
    package_upgrade: false
    users:
      - name: user
        primary_group: users
        groups: audio video
        lock_passwd: false
        # echo <PASSWORD> | openssl passwd -1 -stdin
        passwd: "adfasdfadsfadsfadsfasdfasdfadsfad"
        shell: /bin/bash
        chpasswd: { expire: False }
        sudo: false

image

Meta

Original ISO Version: Ubuntu Server 22.04 (daily build, downloaded 31.01.2023) livefs-editor hash: 2dd0179e25a2366067906979579a1cd797fd1b37

cfroystad avatar Feb 01 '23 08:02 cfroystad

#cloud-config
autoinstall:
  user-data:
    ...

Totally unrelated to the bug report but I think you need a version: 1 in there.

#cloud-config
autoinstall:
  version: 1
  user-data:
    ...

dbungert avatar Feb 01 '23 15:02 dbungert

Hmm. How are you providing the install media to the (I presume) VM? As a cdrom or as some other kind of block device? If you make two livefs_editor invocations, one to replace the kernel and one to add the autoinstall does that work?

This looks like the live media isn't being found for some reason, this is usually because the initrd and media have got out of sync with what UUID they are looking for. But it could be something else I guess.

mwhudson avatar Feb 01 '23 18:02 mwhudson

Thank you! Replacing the kernel in a separate invocation before the rest solved the issue! I'll just add another step to my build for now :slightly_smiling_face:

How are you providing the install media to the (I presume) VM?

As a cdrom using VirtualBox - i.e. Virtual Drive

Totally unrelated to the bug report but I think you need a version: 1 in there.

Thanks for the heads up! It's there in the original source, but I apparently got a bit overboard with reducing to a minimal reproducible example and didn't notice since it was never invoked.

cfroystad avatar Feb 02 '23 09:02 cfroystad

Thank you! Replacing the kernel in a separate invocation before the rest solved the issue! I'll just add another step to my build for now slightly_smiling_face

Huh that's interesting. I should see if I can reproduce this (I haven't tried yet, I admit)

mwhudson avatar Feb 02 '23 16:02 mwhudson