#901332 d-i: Offer to shut down / power off instead of reboot at the end

Package:
debian-installer
Source:
debian-installer
Description:
Debian Installer documentation
Submitter:
Thorsten Glaser
Date:
2021-08-02 09:06:02 UTC
Severity:
normal
#901332#5
Date:
2018-06-11 15:23:42 UTC
From:
To:
d-i always insists on rebooting at the end. This is made worse
by it telling the user to change boot media, which, for virtual
machines, means reconfiguring the VM.

I *generally* wish to reconfigure the VM after first install
*anyway*.

So, please, at the end, where it tells the reboot message, add
a third button that shuts down / powers off the system instead
of rebooting.

Thanks in advance!

#901332#10
Date:
2018-06-13 03:56:06 UTC
From:
To:
virt-manager (or maybe the underlying libvirt) seems to handle this:
when you create a VM and provide an installation image, it is
automatically detached when the VM reboots.

Still, I do agree that this would be useful in general.

Ben.

#901332#15
Date:
2018-06-13 08:57:19 UTC
From:
To:
Thorsten Glaser <tg@mirbsd.de> (2018-06-11):

For the sake of completeness, that's not about adding a third button,
that would be about turning an information note in finish-install into
something else:
| Template: finish-install/reboot_in_progress
| Type: note


Cheers,

#901332#20
Date:
2018-06-13 13:32:54 UTC
From:
To:
Ben Hutchings dixit:

Indeed it does. However, virt-manager also insists on
automatically starting the VM, and I usually also change
something in their settings _before_ the installation,
so I can’t use that feature. (It does offer changing some
settings before initially starting the VM, but that doesn’t
have the final configuration, and is *extremely* laggy up
to unusable if libvirt runs on a different system than
virt-manager.) But…

… that, yes. In general, this is probably useful.

Thanks,
//mirabilos

#901332#25
Date:
2018-06-14 02:23:11 UTC
From:
To:
For example: Imagine setting up a bunch of machines all at once to be distributed to various locations after the install.  You can use pre-seeding to answer all the questions while you go off and get a cup of tea.  It might be better to have them all install then shutdown, rather than install then reboot — wasting power and requiring a manual shutdown before moving to the target location.

Rick

#901332#30
Date:
2021-07-31 20:05:58 UTC
From:
To:
Did anything ever come from this, now that we’re nearing a release?
#901332#35
Date:
2021-08-01 01:37:25 UTC
From:
To:
Thorsten Glaser <tg@mirbsd.de> (2021-07-31):

I'm not sure what you expect. If there had been progress, this would
have ended up in this bug report, wouldn't it?


Cheers,

#901332#40
Date:
2021-08-01 18:21:16 UTC
From:
To:
Thorsten Glaser <tg@mirbsd.de> writes:

BTW one can preseed this behaviour with 'debian-installer/exit/halt' or
'debian-installer/exit/poweroff' as mentioned here:

https://www.debian.org/releases/stable/amd64/apbs04.en.html#preseed-finish

which means that you could specify such a setting on the kernel command
line when starting debian-installer to get the behaviour you want.

Cheers, Phil.

#901332#45
Date:
2021-08-01 19:32:31 UTC
From:
To:
Hi Phil,

oh, good to know.

I’m not versed in preseeding… so that means I have to write
debian-installer/exit/poweroff=true to the kernel commandline?

Wow, quite a handful to type (but on the plus side, it can be
added to netboot menus right now, no further change needed, so
it solves half the problem ☺).

Thanks,
//mirabilos

#901332#50
Date:
2021-08-02 09:03:12 UTC
From:
To:
Thorsten Glaser <tg@mirbsd.de> writes:

That's right.

We could come up with an alias to make that shorter at the commandline,
although it would perhaps be better the have a new setting that would be
a select between reboot, halt, and poweroff.

Then we could use that for asking the question at the end of the install
and also alias that to allow typing something like this at the kernel
commandline:

  finally=poweroff

Since I'm just putting together a DC21 talk about branch2repo, I thought
I'd use this bug as a demo, so here's something that does what the bug
is asking for:

https://salsa.debian.org/philh/finish-install/-/tree/bug/901332

which produces this result:

https://openqa.debian.net/tests/16851#step/complete_install/2

Once salsa stops being grumpy (it's momentarily unable to pull docker
images it seems) I'll try adding a new preseed_alias to test that idea.

Cheers, Phil.