Feature Request: Add "Next Boot" command
Hey, I just researched if this is possible and from what i see, it's not so here's my feature request:
- The ability to control boot for a single reboot.
Example: limine next-boot {ENTRY_ID}
Enter this command and at your next reboot, the default entry is set to the Entry ID that was chosen. After that boot, it's back to how it is described in the limine.conf.
Motivation for the Request: I am currently dualbooting between Windows and CachyOS, but when i'm not home and i need to use windows, i cannot change the operating system, no matter how urgent it is. With that, i can reboot the system without the need to be physically present.
Idea on implementation: Maybe when you execute that command, a file can be created called "limine-nextboot.conf", which has a set of variables to overwrite the default entry with. Everything that is in that file, will be reset after you started booting into your desired operating system. So:
- Enter the command
- Create the file "limine-nextboot.conf", with "default_entry: {ENTRY_ID}"
- User initiates reboot
- Upon loading limine, read the limine.conf, then limine-nextboot.conf and overwrite all parameters that are set with that file
- Delete/Overwrite "limine-nextboot.conf" so its empty
Since you read it once you boot into limine and delete/overwrite it, the next time everything is back to how it was in the limine.conf without touching it.
Thanks for reading and all the work that was already put into limine. I love it and will keep using it c:
Interesting idea, but the likelihood of us implementing this is very low, as it requires writing to the filesystem, and overall seems better handled by some userspace program rather than the bootloader itself.
Interesting idea, but the likelihood of us implementing this is very low, as it requires writing to the filesystem, and overall seems better handled by some userspace program rather than the bootloader itself.
Yeah, i understand on why it will be low priority.
About the "Userspace Program"-bit: How would my Userspace program do it?
Lets take this hypothetical: I am on CachyOS -> I want to boot into windows -> I have to manually edit my limine.conf (because i have the default entry set) -> limine enroll-config -> Restart... and now i'm stuck in Windows.
Now that i mentioned it, i would be stuck in windows no matter what i'd do, since i'd have to re-enroll the config for the Blake2Sum xD Okay. Theres many more problems now that i think about it... But still. If its a userspace-only thing, i'd need to have it installed on both Operating systems and have it work...
If its a userspace-only thing, i'd need to have it installed on both Operating systems and have it work...
Yeah. You could have a dummy file on your ESP that signals to the program that runs on autostart (Windows) or as a systemd service (Linux) to revert to another default entry on boot. And then the tool for scheduling the next boot just changes the Limine config, enrolls it, and creates the dummy file for the autostart service.
Alternatively have a non-zero delay and just pick the thing that you want to boot each time.
Alternatively have a non-zero delay and just pick the thing that you want to boot each time.
That kinda doesn't fix the the Problem i mentioned. Like i said, when I'm remoting into my PC, i can't access anything pre-operating system xD
The whole thing is kinda difficult-ish to do i guess.
If i may ask:
Does limine enroll-config recalculate the Blake2Sum for the entire boot partition, or just the limine.conf?
The whole thing is kinda difficult-ish to do i guess.
Much easier to do in your position than ours.
Does limine enroll-config recalculate the Blake2Sum for the entire boot partition, or just the limine.conf?
Neither.
Since Windows can use its own bootloader just use efibootmgr to achieve that, I'm not sure how to but a friend of mine managed a while ago
That would be a functional but highly roundabout way to accomplish that. I will close this ticket as it hinges on the more fundamental FS write support, which we currently plan to not implement by design. If this changes at some point in the future, I would be happy to revisit this request.