Score:1

Booting a Debian Live ISO on QEMU

ca flag

Situation:

A server:

  • access only via SSH (no physical access, no KVM)
  • a netboot OS (Debian/Jessie)
  • 3 x 2T HDD
  • 16G RAM

Final goal:

Building a ZFS pool with the local HDD and install Debian on a ZFS root, the netboot OS is missing packages to install ZFS via apt, that's why I want to boot a Live Debian.

Issue:

  1. I wget the debian-live-11.0.0-amd64-standard.iso on /tmp
  2. I installed QEMU (via apt) and the plethora of options confuses me (I am discovering it). My most advanced attempt is this:
qemu-system-x86_64 -curses -net nic -net user -m 1024M
    -drive file=/tmp/11-live-amd64-std.iso,media=cdrom -boot c

The -curses option gives a correct result with an install iso, when the 640 x 480 Graphic mode message appears, I use <esc> to access the boot: menu of grub and I pass it the install vga=normal fb=false options and it goes (screenshot)

But with the Live iso, it doesn't work (screenshot)

These are my questions:

  1. Did I miss any QEMU option(s) to display the output that is not supposed to be graphical with this standard iso?
  2. Do I need to configure my live iso with (e.g.) a GRUB in console mode?
  3. Will I not be able to configure the port forwarding of QEMU to access the console via SSH or telnet?
  4. Is there any other solution (without QEMU)?

Thanks in advance

Michael Hampton avatar
cz flag
The Live ISO _is graphical_, so there's no text-only option anyway. You will need another approach. Install libvirtd on the remote host and then use virt-manager on your local workstation to control it via ssh tunnel and do the installation.
freezed avatar
ca flag
@MichaelHampton I used [`debian-live-11.0.0-amd64-standard.iso`](https://cdimage.debian.org/mirror/cdimage/release/current-live/amd64/iso-hybrid/debian-live-11.0.0-amd64-standard.iso), the CLI only version. I add this detail in my question. Thanks for pointing `libvirtd`, I will take a look to your proposal.
in flag
Have you considered port forwarding and running qemu with `-vnc` ?
freezed avatar
ca flag
@NiKiZe not yet, I need to dig this point a bit (this is my question #3)
Michael Hampton avatar
cz flag
Even in "text" mode this ISO image uses the graphical framebuffer console, it outputs nothing to the serial console, and as you discovered, the `install fb=false` does not work. You can probably also use VNC port forwarded over ssh, but using raw qemu is so painful that it's easier in most circumstances to just use libvirtd and virt- tools to manage VMs.
djdomi avatar
za flag
why not use the netinstall iso of bullseye, and by the way do you really want to install Debian Jessi or bullseye? maybe you want to use proxmox as they use zfs already during the installation it's based on bullseye
freezed avatar
ca flag
@djdomi on a Debian net install I cannot install ZFS before partition my disks.
freezed avatar
ca flag
Thanks for precision @MichaelHampton
Michael Hampton avatar
cz flag
I am still trying to figure out exactly why you are doing this. Did you lease a server from a provider like OVH or Hetzner and are trying to install the OS from their rescue system?
djdomi avatar
za flag
@freezed -> proxmox.com fetch this its debian bullseye with ZFS during installation
freezed avatar
ca flag
You got it @MichaelHampton (-;
Michael Hampton avatar
cz flag
I wouldn't use a ZFS root in this case. There are some tutorials on the Internet and even in Hetzner's wiki about doing such an installation, but the problem is, if something goes wrong with ZFS root you won't be able to repair it from the rescue system.
freezed avatar
ca flag
You were right @NiKiZe using VNC is a good lead :`qemu-system-x86_64 -nographic -net nic -net user -m 1024M -drive file=/tmp/11-live-amd64-std.iso,media=cdrom -boot c -vnc :0` . Need to [fix _locale stuff_ first](https://freezed.me/index.php/s/mscst2mWQHyeJE4/preview), but this looks good.
freezed avatar
ca flag
@MichaelHampton another rescue system is available based under `FreeBSD` with this server. This one let me access ZFS theorically. But your point is accurate: I had to check this possibility before putting production on it.
Score:1
ca flag

I fix this issue by using -vnc & -nographic options.

Here the final command:

qemu-system-x86_64 -nographic -net nic -net user -m 1024M -drive file=/tmp/11-live-amd64-std.iso,media=cdrom -boot c -vnc :0

With this, the machine is reachable with a VNC client.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.