---
name: "Boot::Grub"
section: "3pm"
platform: "linux"
package: "systemconfigurator"
version: "1.20-1"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/Boot::Grub"
---

# Boot::Grub(3pm)

Grub bootloader configuration module.

## NAME

Boot::Grub - Grub bootloader configuration module.

## SYNOPSIS

```
  my $bootloader = new Boot::Grub(%bootvars);
```

```
  if($bootloader->footprint_loader()) {
      $bootloader->install_config();
  }
```

```
  if($bootloader->footprint_config() && $bootloader->footprint_loader()) {
    $boot->install_loader();
  }
```

```
  my @fileschanged = $bootloader->files();
```

## METHODS

The following methods exist in this module:

- *files()*

  The *files()* method is merely an accessor method for the all files touched by the instance during its run.

- *footprint\_loader()*

  This method returns "TRUE" if executable Grub bootloader is installed.

- *footprint\_config()*

  This method returns "TRUE" if Grub's configuration file, i.e. "/boot/grub/menu.lst", exists.

- *dev2bios()*

  This method is used as an internal method. It takes a path to the device as the argument and returns device syntax (  matching an entry in the device map file) used by Grub

- *install\_loader()*

  *install\_loader()* is an internal method.

  This method invokes the Grub executable. Grub write the boot image onto the MBR of the bootable disk.

- *getdevhash()*

  *getdevhash()* is an internal method.

  This method takes full path to a file on disk as input, and breaks it down into Grub readable device name and the remaining part.

- *install\_config()*

  This method read the System Configurator's config file and creates Grub's  menu file, i.e. "/boot/grub/menu.lst".

- *setup\_kernel()*

  An internal method. This method sets up a kernel image as specified in the config file.

## AUTHOR

```
  Donghwa John Kim <donghwajohnkim@yahoo.com>
```

## SEE ALSO

Boot, perl
