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

boot_command Alt-F2 keystroke not being received correctly - '<leftAltOn><f2><leftAltOff>' does not work #71

Open
HariSekhon opened this issue Jun 5, 2023 · 1 comment

Comments

@HariSekhon
Copy link

HariSekhon commented Jun 5, 2023

Hi,

I'm trying to do a Debian pressed configuration using a second iso, and this requires switching to tty2 to mount the supplemental cdrom containing the preseed.cfg file.

I am finding that the Alt-F2 keystroke is not being received correctly, so it is not switching to tty2 to run the mount commands.

Alt-F2 comes out as:

^[[[B

You can easily reproduce using my public GitHub repo:

git clone https://github.com/HariSekhon/Packer-templates pack

cd pack

make debian-tart

which will download the installer iso, create the pressed iso and run the packer command to launch the VM with both isos and send all keystrokes to reproduce.

The debian-11-arm64.tart.pkr.hcl is heavily commented of what each screen expects, specifically this is the part I'm having trouble with:

boot_command = [
    "<wait2s>",
    "e<down><down><down><down><left>",
    " auto=true file=/mnt/cdrom2/preseed.cfg<f10>",
    "<wait15s>",
    # go to terminal tty2 for CLI
    # XXX: this Alt-F2 keystroke is coming out unrecognized
    "<leftAltOn><f2><leftAltOff><wait2s>",
@HariSekhon HariSekhon changed the title Alt-F2 keystroke not being received correctly '<leftAltOn><f2><leftAltOff>' does not work boot_command Alt-F2 keystroke not being received correctly '<leftAltOn><f2><leftAltOff>' does not work Jun 5, 2023
@HariSekhon HariSekhon changed the title boot_command Alt-F2 keystroke not being received correctly '<leftAltOn><f2><leftAltOff>' does not work boot_command Alt-F2 keystroke not being received correctly - '<leftAltOn><f2><leftAltOff>' does not work Jun 5, 2023
@rgl
Copy link

rgl commented Jun 16, 2023

FWIW, I think the problem is somewhere at https://github.com/cirruslabs/packer-plugin-tart/blob/v1.3.1/builder/tart/step_run.go#L208-L238.

I've created https://github.com/rgl/use-packer-vnc-bootcommand to replicate the problem from a separate go application. It can replicate the problem, but I have no clue how to fix it. I've tried to use other combinations like <leftSuperOn><f2><leftSuperOff> in the hopes it would be some kind of keyboard layout mismatch, but that didn't work either.

Any clue on how to fix this would be appreciated.

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

No branches or pull requests

2 participants