Hi guys,
I'm using a preseed file on a windows virtualbox installation to create debian images. "debian_preseed.cfg"
I cannot figure out where I can set the @@ variables like @@VBOX_COND_IS_MINIMAL_INSTALLATION@@ or similar.
Is there another file? I've looked for .xml files or configuration files..but could not find anything.
I didn't see a section about this in the manual either (perhaps I missed it?)
The wizard gives me username and password..but nothing else.
Thanks
Howto set @@ values
-
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Windows, Linux
Re: Howto set @@ values
If you're using the unattended install configuration files in "hostdrive\path\to\Oracle\VirtualBox\UnattendedTemplates", I don't believe the @@ texts are variables. I think they are location flags for the unattended install parser. Here's an example:
So the parser is installing Debian and it gets to the part for setting the clock. "How shall I handle the UTC question? Hmm," it says to itself. "Let's roll through the preseed file line by line looking for instructions on the clock. I'm supposed to use UTC, so I'll look for @@VBOX_COND_IS_RTC_USING_UTC@@. OK, got that line. I'll load further lines from the file until I find @@VBOX_COND_END@@. OK, found that, clock setup is done. On to the next question..."
So you wouldn't set these @@ as variables.
If you're really asking how to add new @@ blocks, that I don't know. I'd supposed you could simply type them in the config file on the same pattern, but you might need to peruse the source code to find out if new @@ blocks will even be used.
See how each @@ text is grouped with an _END? Like every IF needs an END IF in Basic. Or each <XML> tag needs an </XML>.debian_preseed.cfg wrote:# Clock
@@VBOX_COND_IS_RTC_USING_UTC@@
d-i clock-setup/utc-auto boolean true
d-i clock-setup/utc boolean true
@@VBOX_COND_END@@
@@VBOX_COND_IS_NOT_RTC_USING_UTC@@
d-i clock-setup/utc-auto boolean false
d-i clock-setup/utc boolean false
@@VBOX_COND_END@@
So the parser is installing Debian and it gets to the part for setting the clock. "How shall I handle the UTC question? Hmm," it says to itself. "Let's roll through the preseed file line by line looking for instructions on the clock. I'm supposed to use UTC, so I'll look for @@VBOX_COND_IS_RTC_USING_UTC@@. OK, got that line. I'll load further lines from the file until I find @@VBOX_COND_END@@. OK, found that, clock setup is done. On to the next question..."
So you wouldn't set these @@ as variables.
If you're really asking how to add new @@ blocks, that I don't know. I'd supposed you could simply type them in the config file on the same pattern, but you might need to peruse the source code to find out if new @@ blocks will even be used.
-
- Volunteer
- Posts: 5678
- Joined: 14. Feb 2019, 03:06
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Linux, Windows 10, ...
- Location: Germany
Re: Howto set @@ values
You can only look that up in the VirtualBox source code. The pivotal entry point is UnattendedScriptTemplate::getConditional(), the called functions can be found in UnattendedImpl.cpp, and from there on it gets individual.asdfjon123 wrote: ↑20. Jul 2023, 12:46 I cannot figure out where I can set the @@ variables like @@VBOX_COND_IS_MINIMAL_INSTALLATION@@ or similar.
The real sources for the decisions to make come from different parts of VirtualBox. For example, the conditional chosen by scottgus1 is derived from a well-known setting (System > Motherboard > Hardware Clock in UTC Time).