Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cfroystad opened this issue Feb 1, 2023 · 4 comments

Comments

@cfroystad
Copy link

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: 2dd0179

@dbungert
Copy link
Contributor

dbungert commented Feb 1, 2023

#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:
    ...

@mwhudson
Copy link
Owner

mwhudson commented Feb 1, 2023

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.

@cfroystad
Copy link
Author

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 🙂

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.

@mwhudson
Copy link
Owner

mwhudson commented Feb 2, 2023

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants