I was caught by this yesterday with an amd64 16.04.1 DVD install to a BIOS+GPT custom ("Something Else") configuration where I had forgotten to create the GPT BIOS Boot Partition for GRUB's core.
The Bootloader Error dialog is modal with only a GtkButton "gtk-ok". Reading the ubiquity Python code and XML user interface description files it looks as if the OK button is disabled if *any* changes are made to the device GtkComboBox where the user-selected device is invalid (which is checked by the grub_verify_loop() handler.
In my case there was no alternative valid option so once I'd interacted with the GtkComboBox the OK button was disabled and I couldn't close the modal dialog.
So the issue seems to be that once the OK button has been disabled it is never re-enabled when selecting other valid options.
I spent quite some time trying to understand and track the execution flow but didn't get to the point of testing my bug-fix hypothesis due to lack of time but it is detailed at the end of this comment if anyone cares to test it.
# Auto-connecting signals with additional parameters does not work. self.grub_new_device_entry.connect( 'changed', self.grub_verify_loop, self.grub_fail_okbutton)
This connects a signal from the device GtkComboBox to the grub_verify_loop() function.
def grub_verify_loop(self, widget, okbutton):
if widget is not None:
if validation.check_grub_device(widget.get_child().get_text()): okbutton.set_sensitive(True)
else: okbutton.set_sensitive(False)
Which will disable the OK button if the device is not valid.
This changes the visibility of the option-specific warnings that appear when those options are selected and alters the enabled status of the GtkComboBox.
So I guess the solution is to add two identical lines here to ensure the OK button is enabled for the 'proceed without GRUB' or 'Cancel installtion' options:
def toggle_grub_fail(self, unused_widget):
if self.grub_no_new_device.get_active(): self.no_grub_warn.show() self.grub_new_device_entry.set_sensitive(False)
I was caught by this yesterday with an amd64 16.04.1 DVD install to a BIOS+GPT custom ("Something Else") configuration where I had forgotten to create the GPT BIOS Boot Partition for GRUB's core.
The Bootloader Error dialog is modal with only a GtkButton "gtk-ok". Reading the ubiquity Python code and XML user interface description files it looks as if the OK button is disabled if *any* changes are made to the device GtkComboBox where the user-selected device is invalid (which is checked by the grub_verify_loop() handler.
In my case there was no alternative valid option so once I'd interacted with the GtkComboBox the OK button was disabled and I couldn't close the modal dialog.
So the issue seems to be that once the OK button has been disabled it is never re-enabled when selecting other valid options.
I spent quite some time trying to understand and track the execution flow but didn't get to the point of testing my bug-fix hypothesis due to lack of time but it is detailed at the end of this comment if anyone cares to test it.
/use/lib/ ubiquity/ ubiquity/ frontend/ gtk_ui. py::Wizard. run(): (line ~718)
# Auto-connecting signals with additional parameters does not work.
self.grub_ new_device_ entry.connect(
'changed' , self.grub_ verify_ loop, self.grub_ fail_okbutton)
This connects a signal from the device GtkComboBox to the grub_verify_loop() function.
/usr/lib/ ubiquity/ ubiquity/ frontend/ gtk_ui. py::Wizard. grub_verify_ loop() (line ~1706)
def grub_verify_ loop(self, widget, okbutton): check_grub_ device( widget. get_child( ).get_text( )):
okbutton. set_sensitive( True)
okbutton. set_sensitive( False)
if widget is not None:
if validation.
else:
Which will disable the OK button if the device is not valid.
/usr/lib/ ubiquity/ ubiquity/ frontend/ gtk_ui. py::bootloader_ dialog( ): (line ~1775) _fail_dialog. run()
self.bootloade r_fail_ dialog. hide() e.OK: new_device. get_active( ):
return self.grub_ new_device_ entry.get_ child() .get_text( ) no_new_ device. get_active( ):
return 'skip'
return ''
...
response = self.bootloader
if response == Gtk.ResponseTyp
if self.grub_
elif self.grub_
else:
else:
return ''
because bootloader_ fail_dialog. run() blocks and never returns the subsequent .hide() and response handling never occurs.
In /usr/share/ ubiquity/ gtk/ubiquity. ui the OK button id is "grub_fail_ okbutton" and it is attached to:
<action-widget response= "-5">grub_ fail_okbutton< /action- widget>
The XML also defines a "toggled" signal attached to each of the radio buttons that calls the toggle_grub_fail() handler.
/usr/lib/ ubiquity/ ubiquity/ frontend/ gtk_ui. py::Wizard. toggle_ grub_fail( ) (line ~1761)
def toggle_ grub_fail( self, unused_widget): no_new_ device. get_active( ):
self. no_grub_ warn.show( )
self. grub_new_ device_ entry.set_ sensitive( False)
self. abort_warn. hide() fail_option. get_active( ):
self. abort_warn. show()
self. no_grub_ warn.hide( )
self. grub_new_ device_ entry.set_ sensitive( False)
self. abort_warn. hide()
self. no_grub_ warn.hide( )
self. grub_new_ device_ entry.set_ sensitive( True)
if self.grub_
elif self.grub_
else:
This changes the visibility of the option-specific warnings that appear when those options are selected and alters the enabled status of the GtkComboBox.
So I guess the solution is to add two identical lines here to ensure the OK button is enabled for the 'proceed without GRUB' or 'Cancel installtion' options:
def toggle_ grub_fail( self, unused_widget): no_new_ device. get_active( ):
self. no_grub_ warn.show( )
self. grub_new_ device_ entry.set_ sensitive( False)
if self.grub_
elif self.grub_
else:
self. abort_warn. hide()
self. no_grub_ warn.hide( )
self. grub_new_ device_ entry.set_ sensitive( True)