Beispiel #1
0
    def parse(self, args):
        """Do not parse anything.

        Only validate the bootloader module.
        """
        super().parse(args)

        # Validate the attributes of the bootloader module.
        bootloader_proxy = STORAGE.get_proxy(BOOTLOADER)

        # Skip the check if the bootloader instance is not GRUB2:
        if not isinstance(get_bootloader(), GRUB2):
            return

        # Check the location support.
        if bootloader_proxy.PreferredLocation == BOOTLOADER_LOCATION_PARTITION:
            raise KickstartParseError(
                _("GRUB2 does not support installation to a partition."),
                lineno=self.lineno)

        # Check the password format.
        if bootloader_proxy.IsPasswordSet \
                and bootloader_proxy.IsPasswordEncrypted \
                and not bootloader_proxy.Password.startswith("grub.pbkdf2."):
            raise KickstartParseError(
                _("GRUB2 encrypted password must be in grub.pbkdf2 format."),
                lineno=self.lineno)
Beispiel #2
0
    def setupDisks(self, ksdata):
        self._blivet = blivet.Blivet(ksdata=ksdata)

        # See comment in super class's method.
        from pyanaconda.bootloader import get_bootloader
        self._blivet._bootloader = get_bootloader()

        for component in self._reusedComponents:
            self._disks.update(component._disks)

        for (name, image) in self._disks.items():
            self._blivet.config.diskImages[name] = image

        self._blivet.reset()
Beispiel #3
0
    def setupDisks(self, ksdata):
        self._storage = InstallerStorage(ksdata=ksdata)

        # See comment in super class's method.
        from pyanaconda.bootloader import get_bootloader
        self._storage._bootloader = get_bootloader()

        for component in self._reusedComponents:
            self._disks.update(component._disks)

        for (name, image) in self._disks.items():
            self._storage.disk_images[name] = image

        self._storage.reset()
Beispiel #4
0
    def setupDisks(self, ksdata):
        self._blivet = blivet.Blivet(ksdata=ksdata)

        # See comment in super class's method.
        from pyanaconda.bootloader import get_bootloader
        self._blivet._bootloader = get_bootloader()

        for component in self._reusedComponents:
            self._disks.update(component._disks)

        for (name, image) in self._disks.items():
            self._blivet.config.diskImages[name] = image

        self._blivet.reset()
Beispiel #5
0
    def setupDisks(self, ksdata):
        self._storage = InstallerStorage()

        # See comment in super class's method.
        from pyanaconda.bootloader import get_bootloader
        self._storage._bootloader = get_bootloader()

        for component in self._reusedComponents:
            self._disks.update(component._disks)

        for (name, image) in self._disks.items():
            self._storage.disk_images[name] = image

        self._storage.reset()
Beispiel #6
0
    def setupDisks(self, ksdata):
        """Create all disk images given by self.disksToCreate and initialize
           the storage module.  Subclasses may override this method, but they
           should be sure to call the base method as well.
        """
        self._blivet = blivet.Blivet(ksdata=ksdata)

        # blivet only sets up the bootloader in installer_mode.  We don't
        # want installer_mode, though, because that involves running lots
        # of programs on the host and setting up all sorts of other things.
        # Thus, we set it up manually.
        from pyanaconda.bootloader import get_bootloader
        self._blivet._bootloader = get_bootloader()

        for (name, size) in self.disksToCreate:
            self._disks[name] = blivet.util.create_sparse_tempfile(name, size)
            self._blivet.config.diskImages[name] = self._disks[name]

        self._blivet.reset()
Beispiel #7
0
    def setupDisks(self, ksdata):
        """Create all disk images given by self.disksToCreate and initialize
           the storage module.  Subclasses may override this method, but they
           should be sure to call the base method as well.
        """
        self._storage = InstallerStorage(ksdata=ksdata)

        # blivet only sets up the bootloader in installer_mode.  We don't
        # want installer_mode, though, because that involves running lots
        # of programs on the host and setting up all sorts of other things.
        # Thus, we set it up manually.
        from pyanaconda.bootloader import get_bootloader
        self._storage._bootloader = get_bootloader()

        for (name, size) in self.disksToCreate:
            self._disks[name] = blivet.util.create_sparse_tempfile(name, size)
            self._storage.disk_images[name] = self._disks[name]

        self._storage.reset()
Beispiel #8
0
    def bootloader(self):
        if self._bootloader is None:
            self._bootloader = get_bootloader()

        return self._bootloader
Beispiel #9
0
    def bootloader(self):
        if not self._bootloader:
            self._bootloader = get_bootloader()

        return self._bootloader
Beispiel #10
0
    def bootloader(self):
        if not self._bootloader:
            self._bootloader = get_bootloader()

        return self._bootloader
Beispiel #11
0
    def bootloader(self):
        if self._bootloader is None:
            self._bootloader = get_bootloader()

        return self._bootloader