1

In the past I have seen a System and I still ask myself sometimes how it worked. Let me explain first my memory:

There was computer system which booted into a non Windows System, with login GUI where you could log on (probably with ldap) and Guest Code, after that you could choose an os from a list (depended from your user account) which was afterwards loaded. I don't think it was sth. based on virtualization because it didn't seem to run the os in a new window like VMware, Vbox, RDP, VNC Sessions (I am not sure but between the swap from let's call is login os and selected os the monitor was shortly black, like a normal linux boot) otherwise it might be possible with virtualization

So now I come to the question how it was done ?
Is it possible to boot into a login os and afterwards swap into a selected os?
I think it would be possible to load per default the login OS and afterwards edit the grub file to the specified os, reboot and let the os afterwards re-edit it back but are there alternatives ? Was the "login os" really an own os ?

Like would it be possible to rerun the bootloader with a specified target from a bash or c programm, etc.
# bootfrom /dev/drive/

Grub is the first stage which loads afterwards the choosen os, can there be three stages ? MBR->GRUB->"login OS"->"selected OS"

  • Remote desktop clients and VMs can generally be scripted and made to go fullscreen. It could be either. – SHawarden Sep 20 '22 at 22:21
  • You may be interested in the kexec project, which allows the Linux kernel to load and boot another Linux kernel. – larsks Sep 20 '22 at 22:22
  • UEFI has a BootNext variable, which makes it possible to set which boot entry will be booted on next boot. Example: https://github.com/nagua/BootToLinux Also see man efibootmgr and the -n option. – Vilinkameni Sep 21 '22 at 04:29

1 Answers1

0

What would be the point of such "login OS"?

Well, there was a "Windows Boot Switcher" (or something like that) in the early 00s which worked very closely to what you described, but for Windows and no GRUB involved. Boot into the "current default" version of Win, choose a different one, reboot - done.

There are graphic boot managers (even GRUB has a fork for it). Here, choose any you like: https://en.wikipedia.org/wiki/Comparison_of_bootloaders

White Owl
  • 5,129
  • Well I am curious, but I imagine that one case could be that the selected os is encrypted. - When graphic boot managers can load the os, so shouldn't an os be able to do the same? – dev_clavis Sep 21 '22 at 09:50
  • @dev_clavis It can, but what is the point? And do not forget a pride. You created whole OS and now you adding to it ability to switch into someone else's OS? :) – White Owl Sep 21 '22 at 12:08