0

I am looking for a solution/a way that allows me to select the boot options of a computer from another computer.

To make it clear what I mean, just consider the following example:

A local network used for testing consist of 3 computers:

  • Computer 'Control', running Ubuntu64 Server with a monitor and keyboard.
  • Computer A: a dual boot of Ubuntu LTS x64 and Ubuntu LTS x32, no mouse no keyboard
  • Computer B: same as A
  • Computer C: same as A

Use case

  1. Select on 'control' to boot A and B into Ubuntux64 and C into UbuntuX32
  2. Computer A will boot to Ubuntu LTS X64
  3. Computer B will boot to Ubuntu LTS X64
  4. Computer C will boot to Ubuntu LTS X32

The selection could be done by a program or self written script, I do not care. The full OS is installed on A,B,C. If a netboot system must be downloaded from a server for this to work it is OK, but it is not required. Preferably the local installations are used.

Is that possible to do? Are there solutions/programs that support this use case, preferably open-source?

Thanks

PS: I have found various hints to PXE but I am not sure if that supports what I am looking for, at least it would not be the typical application of it.

Edit: after the answer from [https://askubuntu.com/users/68186/user68186] I am hoping for a way to utilize a pre-boot network connection (as it is used by PXE) to get a boot option information from a central server. Maybe along the lines of loading a link to a default grub start address with a "command line option" or just a grub image with a config file I could edit on a server etc.

CatMan
  • 1,399

1 Answers1

1

I don't think this can be done.

To select a non-default boot action, you will need network connectivity before the system boots!

A workaround is to let all three computers A, B, C, boot into the default, say Ubuntu 64bit. This can be done with wake-on-LAN. Once fully booted, you can SSH into Computer C and use:

`grub-reboot $1`

command to reboot Computer C to 32bit Ubuntu. Here $1 is the menuentry number in the grub, that starts from 0 for the first entry.

Reference:

How to enable Wake On Lan (WOL) in Ubuntu 16.04

How can I get grub2 to boot a different option only on the next boot?

There may be another way

If your computers A B and C all meet the hardware requirements for Intel's Active Management Technology (AMT) then it may be possible to access BIOS (and thus possibly GRUB) through LAN while the system boots.

I don't know anything about it, and the How-To I saw is for Windows. Here is some information about AMT and Linux. In any case such a solution would not be Ubuntu specific.

Hope this helps

user68186
  • 33,360
  • Thanks a lot for your suggesteion. Acutally I had come across this option but didn't want to blow up the question too much. Correct me if I am wrong, but even using a script to automate this, it would mean to perform a full default boot and then a second boot to get to any non-default installations (the target use case would be to have a lot more than 2 installations). However this clearly is the second best way to do it! I was hoping to find a smart way to avoid this first default boot. WOL is clearly the way to handle the startup. – CatMan Mar 08 '18 at 17:27
  • Perfect. Never head of it. Just knew about Intels' ME, but thats already reserved for the NSA.. But I am going to check it out. – CatMan Mar 08 '18 at 19:23
  • year. Just read it. Basically it gives you a KVM so one could manually select Grub options remotely. Drawback is it won't work on AMD. Thanks for adding that option. I am going to wait if there are other ideas coming up. – CatMan Mar 08 '18 at 19:40
  • @CatMan did you find a solution or get it to work? – user68186 May 09 '18 at 18:29
  • No, but I agree to your suggestion that AMT is pretty much the most elegant way to go. Only major drawback is that it will not work with AMD CPUs. That and since its a major development effort with some risk, the project probably (and sadly) will not fly. – CatMan May 09 '18 at 21:30