UTM icon indicating copy to clipboard operation
UTM copied to clipboard

Setup wizard: add an option to make install media show up as USB, not as CD-ROM

Open koenigdavidmj opened this issue 1 year ago • 7 comments

The part of the setup wizard that lets you supply installation media only will set it up as a CD drive. It would be better to have the option: CD or USB. (Maybe on x86 you could get CD by default, and on ARM you could get USB by default.)

This would especially be helpful for ARM64 guests, where there is much less culture of booting from CD and instead people generally use USB/SD cards/etc.

The workaround is to bypass the wizard: create a guest with no install media whatsoever, then add your install media as a separate disk. I've seen this work when installing both OpenBSD and NetBSD.

koenigdavidmj avatar Aug 03 '22 22:08 koenigdavidmj

I think on ARM it emulates a USB cd drive by default. What’s the problem?

osy avatar Aug 04 '22 02:08 osy

Most ARM64 images I’ve found aren’t CDs, but disk images that you could dd to a USB stick or whatever. The default probably works for some images, just not the most common thing on the platform.

koenigdavidmj avatar Aug 04 '22 03:08 koenigdavidmj

Can you give an example image that doesn’t work as a CD image so I can test it myself?

osy avatar Aug 04 '22 03:08 osy

The standard OpenBSD 7.1 install image is one of them. As a disk image, it boots fine (with a couple modifications that I need to document, but they’re not relevant here). As a CDROM, you get dumped at the UEFI prompt.

koenigdavidmj avatar Aug 04 '22 03:08 koenigdavidmj

As a disk image, it boots fine (with a couple modifications that I need to document, but they’re not relevant here).

@koenigdavidmj please document and/or provide a disk image 💌

gretel avatar Sep 06 '22 22:09 gretel

The image is: https://cdn.openbsd.org/pub/OpenBSD/7.1/arm64/install71.img

Currently one can install this by doing:

  1. Select "Create a New Virtual Machine"
  2. Select "Virtualize"
  3. Select "Other"
  4. On the ISO page, select "Skip ISO boot"
  5. Keep the defaults for CPU count, RAM, disk size
  6. On the last page of the wizard, select "Open VM settings"
  7. On the QEMU page, disable "RNG Device" (this works around an OpenBSD bug)
  8. Select New Drive -> Import and select install71.img
  9. Save and start the VM
  10. At the boot> prompt, type set tty fb0 (this means "I want output on the screen, not the serial console"), then press Enter twice
  11. Success: you see Welcome to the OpenBSD/arm64 7.1 installation program.

My ideal procedure would be that that in step 4, you could select the .img file and click a checkbox that says "attach as disk, not as ISO". Obviously that's not my ideal phrasing. With this, you could skip step 8. The rest of this is OpenBSD-specific quirks, and I would imagine that most disk images could be installed with minimal special effort.

koenigdavidmj avatar Sep 07 '22 02:09 koenigdavidmj

@koenigdavidmj thanks a lot! my attempt was missing:

  1. On the ISO page, select "Skip ISO boot"

hence never got to the prompt. now it's booting:

Screenshot 2022-09-07 at 14 40 19

gretel avatar Sep 07 '22 12:09 gretel