Created
September 7, 2014 08:17
-
-
Save neagix/d26f5683784c9b4051dc to your computer and use it in GitHub Desktop.
Linux Mint / Ubuntu 14 install wizard (Ubiquity) patch for non-grub installs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- plugininstall.py 2014-09-07 08:01:43.030820224 +0000 | |
+++ plugininstall.py.orig 2014-09-07 08:00:47.790454123 +0000 | |
@@ -1018,7 +1018,30 @@ | |
try: | |
if arch in ('amd64', 'i386'): | |
- self.db.set('grub-installer/bootdev', 'skip') | |
+ from ubiquity.components import grubinstaller | |
+ while 1: | |
+ dbfilter = grubinstaller.GrubInstaller(None, self.db) | |
+ ret = dbfilter.run_command(auto_process=True) | |
+ if subarch == 'efi' and ret != 0: | |
+ raise install_misc.InstallStepError( | |
+ "GrubInstaller failed with code %d" % ret) | |
+ elif ret != 0: | |
+ old_bootdev = self.db.get('grub-installer/bootdev') | |
+ bootdev = 'ubiquity/install/new-bootdev' | |
+ self.db.fset(bootdev, 'seen', 'false') | |
+ self.db.set(bootdev, old_bootdev) | |
+ self.db.input('critical', bootdev) | |
+ self.db.go() | |
+ response = self.db.get(bootdev) | |
+ if response == 'skip': | |
+ break | |
+ if not response: | |
+ raise install_misc.InstallStepError( | |
+ "GrubInstaller failed with code %d" % ret) | |
+ else: | |
+ self.db.set('grub-installer/bootdev', response) | |
+ else: | |
+ break | |
elif (arch in ('armel', 'armhf') and | |
subarch in ('omap', 'omap4', 'mx5')): | |
from ubiquity.components import flash_kernel |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment