Comment 10 for bug 1847898

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

I think the confusion is in this function (and the similarly shaped kde one):

    def get_grub_choice(self):
        i = self.grub_device_entry.get_active_iter()
        if i:
            return self.grub_device_entry.get_model().get_value(i, 0)
        else:
            self.debug('No active iterator for grub device entry.')
            disk = self.get_current_disk_partman_id()
            if isinstance(disk, str) and disk:
                disk_path = disk.replace("=", "/")
                if os.path.exists(disk_path):
                    return misc.grub_default(boot=disk_path)

            return misc.grub_default()

(or https://git.launchpad.net/ubiquity/tree/ubiquity/plugins/ubi-partman.py#n681)

This figures out which device has been selected as the target disk and passes it as the boot= argument to misc.grub_default(), clearly expecting that grub_default() will return an appropriate path to install grub too. But grub_default() does not interpret the boot= argument in that way at all, and (modulo some fussing about installing from writable media) returns the first line from grub-mkdevicemap.