for disk in self.bricklayer.disks.selected:
self.install_on_disk(disk, pakfire)
+ # Install configuration
+ self.install_configuration(pakfire)
+
@property
def grub_arch(self):
return "i386-pc"
def install_on_disk(self, disk, pakfire):
log.info("Installing GRUB on %s" % disk.path)
- pakfire.execute(["grub-install"] + self.grub_args + [disk.path])
+ # Make /dev available in the jail
+ # XXX this should be limited to the device nodes we need only
+ bind = ["/dev"]
+
+ pakfire.execute(["grub-install"] + self.grub_args + [disk.path], bind=bind)
+
+ def install_configuration(self, pakfire):
+ """
+ Generates a GRUB configuration file
+ """
+ # XXX see above
+ bind = ["/dev"]
+
+ pakfire.execute(["grub-mkconfig", "-o", "/boot/grub/grub.cfg"], bind=bind)
class GrubEFI(Grub):