propellor-2.1.0: property-based host configuration management in haskell

Safe HaskellNone
LanguageHaskell98

Propellor.Property.Grub

Synopsis

Documentation

type GrubDevice = String Source

Eg, "hd0,0" or "xen/xvda1"

type OSDevice = String Source

Eg, "/dev/sda"

data BIOS Source

Types of machines that grub can boot.

Constructors

PC 
EFI64 
EFI32 
Coreboot 
Xen 

installed :: BIOS -> Property NoInfo Source

Installs the grub package. This does not make grub be used as the bootloader.

This includes running update-grub, so that the grub boot menu is created. It will be automatically updated when kernel packages are installed.

boots :: OSDevice -> Property NoInfo Source

Installs grub onto a device, so the system can boot from that device.

You may want to install grub to multiple devices; eg for a system that uses software RAID.

Note that this property does not check if grub is already installed on the device; it always does the work to reinstall it. It's a good idea to arrange for this property to only run once, by eg making it be run onChange after OS.cleanInstallOnce.

chainPVGrub :: GrubDevice -> GrubDevice -> TimeoutSecs -> Property NoInfo Source

Use PV-grub chaining to boot

Useful when the VPS's pv-grub is too old to boot a modern kernel image.

http://notes.pault.ag/linode-pv-grub-chainning/

The rootdev should be in the form "hd0", while the bootdev is in the form "xen/xvda".