GNOME Boxes Boot From ISO After Installing An Operating System?

5,638

Solution 1

Booting from ISO on GNOME Boxes works okay for me after installation, but it's not intuitive and you have to be quick.

You need to add the ISO in the VM's properties when the VM is powered off, close the properties screen, click on the VM to start it, and then quickly press Escape to get a boot menu, and then you can press 3 to boot from "DVD/CD", which will boot from the ISO.

You need to hit Escape quickly enough, when you see the SeaBIOS screen, before the actual bootloader starts.

Update with a different approach:

If you can't press Escape quickly enough then the only other option is to use virt-manager instead of Boxes just for this one time.

When virt-manager starts, it'll ask for your password to access "system-wide" vms - you don't need that (press cancel).

Then, click "QEMU/KVM user session" and you'll see all your Boxes vms. Select your VM, click Open, click on the lightbulb icon, click "boot options" and there you can select to always show a menu, or change the boot order. Don't forget to click "Apply" on the bottom right corner after you make changes.

I'd also recommend filing a bug to explain the gnome-boxes people that the current method is not usable and they probably need to add a UI for this in Boxes itself.

Solution 2

You can get a boot menu for the VM by directly invoking qemu yourself with the right parameters. In the boot menu you can select your iso.

The command is the following:

qemu-system-<your-architecture here> -cdrom <path-to-iso> -boot menu=on <path-to-disk-image(see below)>

GNOME Boxes stores the disk-images(where the VM's disks are stored) in ~/.local/share/gnome-boxes/images/

Then a window with the VM will open. You then have to press Esc in the first seconds to open the boot menu.

I would also recommend to add the -m option to boot with more than 128 MB RAM.

qemu-system-<your-architecture here> -cdrom <path-to-iso> -boot menu=on -m <amount of ram> <path-to-disk-image>

A full command could look like this:

qemu-system-x86_64 -cdrom ~/Downloads/install-amd64-minimal-20181113T214502Z.iso -boot menu=on -m 2G ~/.local/share/gnome-boxes/images/boxes-unknown
Share:
5,638
ToffeeYogurtPots
Author by

ToffeeYogurtPots

Updated on September 18, 2022

Comments

  • ToffeeYogurtPots
    ToffeeYogurtPots over 1 year

    Trying to set up a couple of Arch Linux virtual machines for troubleshooting programs. One is having network issues so I'm trying to chroot into it and install Network Manager or Connman to fix it.

    However, after I've successfully installed any operating system in Boxes, it refuses to boot from any ISO file. Even if I change the ISO file, it goes straight to the GRUB menu of the installed operating system rather than showing the ISO's GRUB menu.

    Why does Boxes load an ISO image fine before installing and then refuse to load any after installing?

    • Ignacio Vazquez-Abrams
      Ignacio Vazquez-Abrams over 6 years
      You can't mount the virtual drive on the host?
    • ToffeeYogurtPots
      ToffeeYogurtPots over 6 years
      No the virtual drive mounts fine. But it seems to be impossible to boot from an ISO after installation in Boxes.
  • ToffeeYogurtPots
    ToffeeYogurtPots over 6 years
    By the time the window has opened the brief time in which SeaBios takes input is gone, as soon as I see anything it shows me the GRUB menu of the VM. Even mashing the escape button as quickly as possible doesn't work, it just goes straight to the GRUB menu of the VM.
  • Elad Alfassa
    Elad Alfassa over 6 years
    @ToffeeYogurtPots I've edited my original answer with a different approacht hat could work for you. Give it a try.