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

qemu: add/update examples #80

Merged
merged 1 commit into from
Dec 23, 2024
Merged

qemu: add/update examples #80

merged 1 commit into from
Dec 23, 2024

Conversation

zeha
Copy link
Member

@zeha zeha commented Dec 23, 2024

These examples come from my notes. I cannot verify the amd64 examples right now, so if someone else can that'd be nice.

@zeha zeha requested review from mika and jkirk December 23, 2024 16:33
@zeha zeha self-assigned this Dec 23, 2024
@zeha
Copy link
Member Author

zeha commented Dec 23, 2024

Partially addresses #71

content/qemu/index.md Outdated Show resolved Hide resolved
content/qemu/index.md Outdated Show resolved Hide resolved

### Black / blank screen
In all examples below you can add `-nographic` to get the first serial console on your terminal.
This might work better on arm64, where most software defaults to supporting serial console, and less good on amd64.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, what do you mean with "most software defaults to supporting serial console" on arm64? Why is that so?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EDK2, grub, linux kernel appear to default-enable serial console support. This is probably because there is no native "VGA" like on x86.

ISTR on x86 most of these things don't bother enabling serial.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, ok...
I haven't tested Grml/arm64 with -nographic on my system, but Grml/amd64 does not give me the serial console. It would be nice to let Grub detect that somehow... is that even possible?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

grub: good question! it does somehow work on arm64, so i guess it should be possible on x86?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've done my tests on arm64 with the arm64 ISO, and -nographic just works ootb.

Copy link
Contributor

@jkirk jkirk Dec 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah... with qemu-system-x86_64 -M q35 -m 2048 -cpu host -enable-kvm -nographic -cdrom /srv/isos/grml-full-2024.12-amd64.iso I get:

SeaBIOS (version 1.16.2-debian-1.16.2-1)


iPXE (http://ipxe.org) 00:02.0 CA00 PCI2.10 PnP PMM+7EFCEDF0+7EF0EDF0 CA00
                                                     


Booting from Hard Disk...
Boot failed: could not read the boot disk

Booting from DVD/CD...

ISOLINUX 6.04 20200816 ETCD Copyright (C) 1994-2015 H. Peter Anvin et al

If I hit ESC within the timeout of 30s I get the boot prompt where I can enter serial. If not I am stuck...

Can you confirm that behavior? (Maybe worth to be documented somehow?)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ISTR on x86 most of these things don't bother enabling serial.

Looks like at least grub enables serial, if I remove VGA. Kernel doesn't automatically enable serial though. Might be worth investigating if that can be if-ed in grub.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you confirm that behavior? (Maybe worth to be documented somehow?)

Yes, I can. The trick appears to add this to the qemu command line: -vga none

Then ISOLINUX presents this menu:

Screenshot 2024-12-24 at 00 00 10

content/qemu/index.md Outdated Show resolved Hide resolved

### Black / blank screen
In all examples below you can add `-nographic` to get the first serial console on your terminal.
This might work better on arm64, where most software defaults to supporting serial console, and less good on amd64.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, ok...
I haven't tested Grml/arm64 with -nographic on my system, but Grml/amd64 does not give me the serial console. It would be nice to let Grub detect that somehow... is that even possible?

content/qemu/index.md Outdated Show resolved Hide resolved

### Black / blank screen
In all examples below you can add `-nographic` to get the first serial console on your terminal.
This might work better on arm64, where most software defaults to supporting serial console, and less good on amd64.
Copy link
Contributor

@jkirk jkirk Dec 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah... with qemu-system-x86_64 -M q35 -m 2048 -cpu host -enable-kvm -nographic -cdrom /srv/isos/grml-full-2024.12-amd64.iso I get:

SeaBIOS (version 1.16.2-debian-1.16.2-1)


iPXE (http://ipxe.org) 00:02.0 CA00 PCI2.10 PnP PMM+7EFCEDF0+7EF0EDF0 CA00
                                                     


Booting from Hard Disk...
Boot failed: could not read the boot disk

Booting from DVD/CD...

ISOLINUX 6.04 20200816 ETCD Copyright (C) 1994-2015 H. Peter Anvin et al

If I hit ESC within the timeout of 30s I get the boot prompt where I can enter serial. If not I am stuck...

Can you confirm that behavior? (Maybe worth to be documented somehow?)

@zeha zeha force-pushed the zeha/qemu branch 2 times, most recently from 40b176c to a776476 Compare December 23, 2024 23:08
@zeha zeha merged commit a5f6402 into master Dec 23, 2024
1 check passed
@zeha zeha deleted the zeha/qemu branch December 23, 2024 23:09
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

Successfully merging this pull request may close these issues.

2 participants