VirtualBox

Opened 5 years ago

Last modified 5 years ago

#18410 new defect

debian-stretch-netinst does not work with 'VBoxManage unattended install' because of incorrect install menu defaults

Reported by: Robert Nielsen Owned by:
Component: other Version: VirtualBox 6.0.4
Keywords: VBoxManage unattended install debian installgui Cc:
Guest type: Linux Host type: all

Description

[attached script: reproduce-bug.sh] # 88 lines
[attached patch: fix.patch] # 4 lines

The install menu defaults for the stock debian-stretch-netinst ISO is setup to be "Graphical Install" rather than just "Install".

The files in the ISO that control this are
/isolinux/menu.cfg
/isolinux/gtk.cfg
/isolinux/txt.cfg

VBoxManage already generates a replacement for one of the above files, but flattens its name to ${aux_base_path}isolinux-txt.cfg, so this file is patched after it was generated, but before it was used.
Specifically, this patch was applied after running 'VBoxManage unattended install ...' but before running 'VBoxManage startvm <vm>'.

This works only because the /isolinux/txt.cfg follows /isolinux/gtk.cfg (in /isolinux/menu.cfg) and thus can override its use of 'default label' and 'menu default'. But this order could change in the future so the ideal solution is below.

The ideal solution is

  • Remove 'default installgui' and 'menu default' (within 'label installgui') from /isolinux/gtk.cfg
  • Add 'default install' and 'menu default' (within 'label install') from /isolinux/txt.cfg

Currently, since there is no 'ui' directives used, the 'default installgui' and 'default install' are being ignored.
---
https://www.syslinux.org/wiki/index.php?title=Config

https://www.syslinux.org/wiki/index.php?title=Menu

The function that modifies /isolinux/txt.cfg is:

src/VBox/Main/src-server/UnattendedInstaller.cpp:
HRESULT UnattendedDebianInstaller::editDebianTxtCfg(GeneralTextScript *pEditor)

# to see the bug, do this
./reproduce-bug.sh

It will use the graphical installer, and thus mandates a manual install.

# to see my fix, do this
fix=1 ./reproduce-bug.sh

Attachments (2)

reproduce-bug.sh (2.4 KB ) - added by Robert Nielsen 5 years ago.
fix.patch (43 bytes ) - added by Robert Nielsen 5 years ago.

Download all attachments as: .zip

Change History (5)

by Robert Nielsen, 5 years ago

Attachment: reproduce-bug.sh added

by Robert Nielsen, 5 years ago

Attachment: fix.patch added

comment:1 by zoechi, 5 years ago

Any known workarounds (without compiling locally with this fix applied)?
Any way to vote for this issue? (sorry, I'm new here)

comment:2 by Robert Nielsen, 5 years ago

This problem still exists, and is also present on Debian Buster netinstall (debian-buster-netinst).

comment:3 by Robert Nielsen, 5 years ago

There is no need to compile to work-around this bug. The fix.patch I supplied is applied isolinux-txt.cfg (a file generated by VBoxManage). First let VBoxManage generate it. Second apply the patch. Third start the VM which starts the installation of the OS. Take a look a the provided script to see the steps in formal detail.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use