canonical / ubuntu-desktop-installer

Ubuntu Desktop Installer
GNU General Public License v3.0
536 stars 94 forks source link

[autoinstall] missing packages on the live image: mdadm, multipath-tools #613

Open paride opened 2 years ago

paride commented 2 years ago

When trying to perform an autoinstall (currently booting with experimental-autoinstall in the cmdline) with the canary images with a simple user-data like:

#cloud-config
autoinstall:
  version: 1
  identity:
    hostname: ubuntu
    password: "$6$exDY1mhS4KUYCE/2$zmn9ToZwTKLhCw.b4/b.ZRTIZM30JZ4QrOQ2aOXJ8yk96xpcCof0kxKwuX1kqLG/ygbJ1f8wxED22bTL4F46P0"
    username: ubuntu

the installer fails looking for binaries from the mdadm and multipath-tools packages. I think subiquity assumes they're present because they're part of the server ISO images. For feature parity they should be included in the Desktop images too.

As a workaround adding this to the user-data makes subiquity not call the missing tools:

  storage:
    layout:
      name: direct

Cc: @mwhudson as I think this is your domain :-)

dbungert commented 2 years ago

@seb128 - do you want mdadm and multipath-tools in the seed for the iso?

seb128 commented 2 years ago

@seb128 - do you want mdadm and multipath-tools in the seed for the iso?

We didn't include them initially because technically they shouldn't be required on desktop at the moment since we don't have any way to configure raid for example.

It would probably be worth checking if subiquity really needs those or if that's a bug?

In any case they are small and if that's the easier fix or the right thing to do it's fine added them to the desktop image. If it's a workaround maybe at least open a bug on subiquity to improve that side of things later.

paride commented 2 years ago

IMHO there's an underlying question: do we want subiquity-server to be agnostic on whether it's installing Desktop or Server, or do we want/accept it to behave differently?

seb128 commented 2 years ago

Even if it's agnostic it probably doesn't need to error out on missing mdadm for a standard disk layout installation

mwhudson commented 2 years ago

It's not completely obvious to me the way in which the install fails if these are not available, nor why that autoinstall change would fix it. Can you paste a log fragment?

I would prefer for the install to not fail if these packages are not installed though.

In terms of "should the desktop image have these packages"... it's a bit hard to say. I think the argument for mdadm is stronger than that for multipath-tools...

BrandonNolet commented 2 years ago

Is the experimental-autoinstall flag present in the 22.04.1 release?

dbungert commented 2 years ago

Is the experimental-autoinstall flag present in the 22.04.1 release?

We haven't really done autoinstall work yet for ubuntu-desktop-installer. As it is known that it is only half present we have this argument. If you want to experiment anyhow you would need to add experimental-autoinstall to the kernel command line.

BrandonNolet commented 2 years ago

We haven't really done autoinstall work yet for ubuntu-desktop-installer. As it is known that it is only half present we have this argument. If you want to experiment anyhow you would need to add experimental-autoinstall to the kernel command line.

menuentry "Autoinstall test" {
    set gfxpayload=keep
    linux /casper/vmlinuz experimental-autoinstall ds=nocloud\;s=/cdrom/server/ ---
    initrd /casper/initrd
}

I've tried the above, I've also tried using linux /casper/vmlinuz experimental-autoinstall autoinstall ds=nocloud\;s=/cdrom/server/ --- but every time, it simply boots straight to the live session. I made sure in the live session that cat /proc/cmdline shows that experimental-autoinstall flag in all cases:

BOOT_IMAGE=/casper/vmlinuz experimental-autoinstall ds=nocloud\;s=/cdrom/server/ ---

I tried the same configuration (using only autoinstall of course in that case) and file layout with the server ISO for 22.04 and that seemed to work just fine. Is there something I'm not thinking of? 🤔

Edit: should I be using a pre-release version of the Ubuntu Desktop ISO?

dbungert commented 2 years ago

As you're mentioning the 22.04.1 ISO, I wish to be clear that for ubuntu-desktop-installer, we're talking about http://cdimage.ubuntu.com/daily-canary/

Also, there isn't any sort of special mode for Autoinstall for that Desktop-based ISO. I don't think we have the autoinstall experience defined yet for ubuntu-desktop-installer.

@BrandonNolet, what experience would you have expected to see for a Desktop ISO running in autoinstall?

BrandonNolet commented 2 years ago

As you're mentioning the 22.04.1 ISO, I wish to be clear that for ubuntu-desktop-installer, we're talking about http://cdimage.ubuntu.com/daily-canary/

Ah okay that's what I had a feeling was the issue but I wasn't at the time at liberty to try it out with daily-canary

Also, there isn't any sort of special mode for Autoinstall for that Desktop-based ISO. I don't think we have the autoinstall experience defined yet for ubuntu-desktop-installer.

I'm curious to see what happens but this will likely either mean having to use the Ubuntu Server 22.04 ISO in this case, which might be less user-friendly. However, at least the syntax is a lot easier to understand and manage at a distance (distance as in "I haven't touched this config in a while, what does this do?"

@BrandonNolet, what experience would you have expected to see for a Desktop ISO running in autoinstall?

I would have expected basically the same experience as using a preseed file with the exception being that now I can define defaults but still show a specific page or two to the person using the installer for things that should not be pre-defined like keyboard language/layout or the encryption password for the installation.

I think I will open a separate issue with more detail, however, as I have some things I'd like to ask about/request and I've already derailed this issue enough :P