Commits

Moises Henriquez committed d764615 Merge

Merged in m0e_lnx/m0e-vinstall (pull request #13)

Fix #28 @ VLCore/vinstall, and add fallback for missing device id's

  • Participants
  • Parent commits e61decc, bf68ebf

Comments (0)

Files changed (1)

File vinstall/backend/bootloader.py

             if d.path() == self.target:
                 LOG.debug("Identified bootloader target as MBR on %s"% d)
                 bootloader_target = d
-                target_line = os.path.join("/dev/disk/by-id", d.id)
+                if d.id is None:
+                    target_line = self.target
+                else:
+                    target_line = os.path.join("/dev/disk/by-id", d.id)
                 break
         if bootloader_target is None:
             for p in media.Partition.all():
 	    default_os_line = "default = %s"% self.default_os.label
 	else:
 	    default_os_line = "#"
+        if os.path.exists("/boot/bitmap/boot.bmp"):
+            bitmap_line = "bitmap = /boot/bitmap/boot.bmp"
+        else:
+            bitmap_line = "# bitmap = /boot/bitmap/boot.bmp"
+
         header = (
             "# LILO configuration file.",
             "# ",
             "# ",
             "boot = %s" % target_line,
 	    default_os_line,
+            bitmap_line,
             "compact",
             "prompt",
             "timeout = %s" % self.timeout,
             "change-rules",
             "reset",
-            "bitmap = /boot/bitmap/boot.bmp",
             "vga = 788",
             "# OS list")