help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

using acpi information in conditional expression


From: Alexander 'Leo' Bergolth
Subject: using acpi information in conditional expression
Date: Sun, 22 Nov 2015 12:52:04 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.21) Gecko/20090320 Fedora/2.0.0.21-1.fc10 Thunderbird/2.0.0.21 Mnenhy/0.7.5.0

Hi!

Is it possible to use the output of lsacpi or lspci or
in a conditional expression?

I am using a dual-boot environment where the same box may boot natively or inside a VirtualBox VM. Thus I'd like to detect whether grub has been started inside VirtualBox or not in order to be able to set different defaults.

The output of lsacpi contains "OEM-ID: VBOX" if started inside VirtualBox. Is it possible to use that info in the grub config?

I didn't find a way to redirect the lsacpi output to a variable or a file to be able to use it with regex.

Do you have any hint?

Maybe inb/inl/inw could be used?

Thanks,
--leo
--
e-mail   ::: Leo.Bergolth (at) wu.ac.at
fax      ::: +43-1-31336-906050
location ::: IT-Services | Vienna University of Economics | Austria




reply via email to

[Prev in Thread] Current Thread [Next in Thread]