You are not logged in.

#1 2015-01-31 09:18:34

lawrent
Member
Registered: 2014-08-26
Posts: 31

Adding reboot and shutdown entries to gummiboot

Hi,

I haven't found on the wiki how to add a shutdown and a reboot entry to gummiboot's menu. Google doesn't give more answer. Is it possible to do?
I guess it has to do with adding the appropriate "options" option in a .conf file.

Thanks!

Offline

#2 2015-01-31 11:01:08

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: Adding reboot and shutdown entries to gummiboot

The "options" are for kernel or UEFI parameters.

There doesn't seem to be an option for this in the upsteam documentation.
http://freedesktop.org/wiki/Software/gummiboot/


Jin, Jîyan, Azadî

Offline

#3 2015-01-31 11:17:52

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,536

Re: Adding reboot and shutdown entries to gummiboot

Gummiboot is only a ferryman to the kernel, doesn't have particular feature to halt nor shutdown the machine. Maybe you may try to find a small program that will do and then gummiboot will pass the ball to it.


do it good first, it will be faster than do it twice the saint wink

Offline

#4 2015-01-31 11:50:16

progandy
Member
Registered: 2012-05-17
Posts: 5,321

Re: Adding reboot and shutdown entries to gummiboot

Is it possible to run an efi shell script from a gummiboot entry? Then you could use "reset -w|-s" I think.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

#5 2015-01-31 11:56:29

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: Adding reboot and shutdown entries to gummiboot

progandy wrote:

Is it possible to run an efi shell script from a gummiboot entry? Then you could use "reset -w|-s" I think.

Yes it certainly is -- the gummiboot menu has an option to launch the EFI shell; I didn't think of that...


Jin, Jîyan, Azadî

Offline

#6 2015-01-31 12:46:45

lawrent
Member
Registered: 2014-08-26
Posts: 31

Re: Adding reboot and shutdown entries to gummiboot

That's what I was thinking about, progandy. So I need to write a /boot/loader/entries/reboot.conf file that looks like

title   Reboot
options reset -w

no? This little file doesn't work…

Offline

#7 2015-01-31 17:00:15

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: Adding reboot and shutdown entries to gummiboot

As I said, the "options" are for kernel parameters.

You would have to launch the EFI shell and then run the command given by @progandy; there is no way of "scripting" it from the menu AFAIK.


Jin, Jîyan, Azadî

Offline

#8 2015-01-31 17:12:24

progandy
Member
Registered: 2012-05-17
Posts: 5,321

Re: Adding reboot and shutdown entries to gummiboot

Head_on_a_Stick wrote:

As I said, the "options" are for kernel parameters.

You would have to launch the EFI shell and then run the command given by @progandy; there is no way of "scripting" it from the menu AFAIK.

I'm not sure. It may be possible to run a shell like this:

title      Shell action
efi        /shellx64.efi
options   resetscript.nsh

| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

#9 2015-01-31 22:10:55

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,536

Re: Adding reboot and shutdown entries to gummiboot

progandy wrote:

Is it possible to run an efi shell script from a gummiboot entry? Then you could use "reset -w|-s" I think.

Isn't. Gummiboot has to load the shell program and pass the arguments to it.


do it good first, it will be faster than do it twice the saint wink

Offline

#10 2020-03-12 09:28:02

thujone
Member
From: Prague, Czech Republic
Registered: 2007-01-01
Posts: 18

Re: Adding reboot and shutdown entries to gummiboot

Sorry for the necro, but I hope this helps any Google traveler from the future: I found you can specify the equivalent of a runlevel using the systemd.unit option, so I could have my shutdown entry by appending

systemd.unit=poweroff.target

to the options line, a new /boot/loader/entries/poweroff.conf looks like this:

title   Poweroff
linux   /vmlinuz-linux
initrd  /initramfs-linux.img
options root=PARTUUID=94bd4b58-9415-4523-b478-031117ca4dfe systemd.unit=poweroff.target

Source: http://cmdlinelinux.blogspot.com/2014/0 … linux.html

Offline

#11 2020-03-12 14:21:44

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,662
Website

Re: Adding reboot and shutdown entries to gummiboot

Closing this old thread.

Note that gummiboot ceased to exist some years ago after it was absorbed into the systemd project. If you are still using 'gummiboot' you should look into upgrading to 'systemd-boot' instead (or an alternative).


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB