#728359 debian-installer: Install bootloader earlier?

Package:
debian-installer
Source:
debian-installer
Description:
Debian Installer documentation
Submitter:
Thiemo Nagel
Date:
2013-11-01 19:27:07 UTC
Severity:
wishlist
#728359#5
Date:
2013-10-31 08:02:01 UTC
From:
To:
Hello,

I haven't got replies to my post on debian-boot, so I'm archiving this topic
as a whishlist bug:

I've been wondering why the bootloader is installed only at the very end of
the installation. This means that an aborted installation (eg.  due to power
failure or system crash) leaves the system in an unbootable state. Would it be
possible to install the bootloader before tasksel is being run? That should
significantly reduce the time window during which a crash yields an unbootable
system.

Cheers,
Thiemo

#728359#10
Date:
2013-10-31 10:10:39 UTC
From:
To:
Quoting Thiemo Nagel (thiemo.nagel@gmail.com):

When I saw your first mail, my thought was indeed "hey, why not?".

However, if the BL is installed very late, I guess there is a very
good reason that probably dates back to the early days of D-I.

Hence CC'ing Joey in order to get his input here. Joey, do you
remember why bootloaders are only installed after apt-setup and the
like and not just after base-installer? I bet there is a reason..:-)

#728359#15
Date:
2013-10-31 10:41:00 UTC
From:
To:
Christian PERRIER, le Thu 31 Oct 2013 11:10:39 +0100, a écrit :

The same question actually arises also for the brltty&speakup
finish-install. Currently blind users have to proceed up to the end to
get the installed system accessible.

Samuel

#728359#20
Date:
2013-10-31 16:20:14 UTC
From:
To:
Christian PERRIER wrote:

The only reason I can think of is that it helps prevent accidentially
rebooting the computer half way through the install and encountering a
strange half-installed system.

#728359#25
Date:
2013-10-31 16:28:18 UTC
From:
To:
Definitely, yes. If for some reason the installation is aborted, there
is a good chance that the system will at least reboot to the other
side of a dual-boot instead of leaving things dead.

There are also potential issues here with ordering - the bootloaders
may depend on quite a lot of packages and/or state in the system being
installed.

#728359#30
Date:
2013-10-31 17:26:35 UTC
From:
To:
Well, what I propose is to install the bootloader (and run the
finish.d scripts) after the base system has been installed. Or, in
other words, to postpone tasksel until after bootloader installation
(and finish.d scripts). I don't see how this could result in an
unbootable system as this is basically the same as running the
installation full-cycle without selecting anything in tasksel.

#728359#35
Date:
2013-10-31 19:27:05 UTC
From:
To:
Thiemo Nagel <thiemo.nagel@gmail.com> writes:

Which is liable to be _very_ confusing, and could easily waste a lot of
time and/or convince the victim that Debian is an incomprehensible mess.

=-=-=-

I suppose that could be mitigated if we created a file something like:

  /target/Instalation-In-Progress

as soon as we mount the target system's root, which we'd delete just
before unmounting the file system at the end of the install, and then
check for that after the first boot and if found pause the boot with a
big warning about an incomplete install.

The first-boot-install-check script could offer to delete the file if
found, and after that, delete itself to keep things tidy.

I'm not sure that's a good idea though -- it seems somewhat fragile.

Cheers, Phil.

#728359#40
Date:
2013-11-01 19:22:00 UTC
From:
To:
Actually, I rather like your idea. There could be a notice that the
system is partially installed, together with a segmented advice, very
roughly along the lines of:

Partial installation detected.
* If you are scared of the command line, just restart the installation.
* If you are not scared or if you have spent a lot of resources
(download time, data charges) that you would not like to see wasted,
run "dpkg --whatever" to get to a sane state and then "tasksel" to
continue installation.