--- pyanaconda/bootloader.py | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py index 11d4635..2a385ec 100644 --- a/pyanaconda/bootloader.py +++ b/pyanaconda/bootloader.py @@ -1536,6 +1536,26 @@ class GRUB2(GRUB): name += ")" return name + def write_device_map(self, install_root=""): + """ Write out a device map containing all supported devices. """ + map_path = os.path.normpath(install_root + self.device_map_file) + if os.access(map_path, os.R_OK): + os.rename(map_path, map_path + ".anacbak") + + dev_map = open(map_path, "w") + dev_map.write("# this device map was generated by anaconda\n") + devices = self.drives + if self.stage1_device not in devices: + devices.append(self.stage1_device) + + if self.stage2_device not in devices: + devices.append(self.stage2_device) + + for drive in self.drives: + dev_map.write("%s %s\n" % (self.grub_device_name(drive), + drive.path)) + dev_map.close() + def write_defaults(self, install_root=""): defaults_file = "%s%s" % (install_root, self.defaults_file) defaults = open(defaults_file, "w+") -- 1.7.3.4 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list