need to run update-grub when grub-install
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
curtin |
Fix Released
|
High
|
Unassigned | ||
curtin (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Trusty |
Fix Released
|
High
|
Unassigned |
Bug Description
I noticed this when installing ppc64el, as boot would fail. It would fail because no /boot/grub/grub.cfg existed.
I'm not entirely sure when we need to run update-grub.
I know that the 'install_grub' was choosing to *not* run update-grub because sometimes dpkg-reconfigure would do the same thing, and that was a slow operation.
Its possible there are more complex symantics involved than I understood. But we were not running 'update-grub' in order to save some time.
Basically, as input to 'install_grub', we have:
* the target to install to (/dev/sda1 or /dev/sda)
* the dpkg arch
* the name of the package to 'dpkg-reconfigure' (derived from the dpkg arch and whether or not to use uefi).
we dpkg-reconfigure because we may change the GRUB_CMDLINE_
From my memory, it seemed like on amd64 and i386, running 'dpkg-reconfigure grub-pc' would end up running update-grub. I then chose not to run update-grub because it was slow.
Colin, Is there some simple logic that I can use to determine when running update-grub is needed?
SRU curtin
==========
[Impact]
This bug will make it so boot fails when installing ppc64el. It would fail because no /boot/grub/grub.cfg existed.
This backport is needed so that we can install for ppc64el and any other architectures that were failing because update-grub was not being executed when doing grub-install.
This upload fixes the bug by making sure that update-grub is executed when doing grub-install
[Test Case]
To reproduce this bug you would need to follow what was being done as outlined in the original bug report description. Namely, you would need to do a curtin install for ppc64el.
[Regression Potential]
update-grub can be run multiple times so even in the event that update-grub is executed a second time by some other package, like the original bug reporter mentions in the original bug report description, it is unlikely to cause any regressions.
Changed in curtin (Ubuntu): | |
status: | New → Triaged |
Changed in curtin: | |
status: | New → Triaged |
importance: | Undecided → Medium |
importance: | Medium → High |
Changed in curtin (Ubuntu): | |
importance: | Undecided → High |
tags: | added: patch |
Changed in curtin (Ubuntu Trusty): | |
status: | New → Confirmed |
importance: | Undecided → High |
description: | updated |
Changed in curtin: | |
status: | Triaged → Fix Released |
the 'install_grub' code is at http:// bazaar. launchpad. net/~curtin- dev/curtin/ trunk/view/ head:/helpers/ common# L375
I'd love to have something less hueristics and messy.
Attaching a fix that runs update-grub.