1

What is the best practice to run start scripts / configuration options for the same linux kernel but starting it for different purposes?

  • Menuoption 1 / Scenario 1: Starting my Lubuntu Install normally with GUI

  • Menuoption 2 / Scenario 2: blacklist primary gpu, start my Lubuntu Headless, VFIO passthrough of the primary GPU to KVM/Qemu, Autostarting VM guest...

I would need to add VFIO options and run a start script at the end, since I don't want to log on to my system via SSH to start the guest VM. Is this possible to achieve via GRUB options only, is this a task for Initramfs or is this done completely differntly?

1 Answer 1

1

I see two options:

  1. Provide an alternate init... one which will do your special "scenario 2" configuration before calling exec to replace itself with the real init.
  2. Tack a keyword onto the kernel command line, and detect it later from userspace by inspecting /proc/cmdline and behaving appropriately.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .