propellor-5.7.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 GrubTarget Source #

Platforms that grub can boot.

Constructors

PC 
EFI64 
EFI32 
Coreboot 
Xen 

installed :: GrubTarget -> Property (HasInfo + DebianLike) Source #

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

This includes running update-grub, unless it's run in a chroot.

mkConfig :: Property DebianLike Source #

Run update-grub, to generate the grub boot menu. It will be automatically updated when kernel packages are installed.

installed' :: GrubTarget -> Property (HasInfo + DebianLike) Source #

Installs grub; does not run update-grub.

configured :: String -> String -> Property DebianLike Source #

Sets a simple confguration value, using grub-mkconfig to update the grub boot menu accordingly. On Debian, these are written to /etc/default/grub

Example:

	& Grub.configured "GRUB_TIMEOUT" "10"
	& Grub.configured "GRUB_TERMINAL_INPUT" "console serial"

cmdline_Linux_default :: String -> RevertableProperty DebianLike DebianLike Source #

Adds a word to the default linux command line. Any other words in the command line will be left unchanged.

Example:

	& Grub.cmdline_Linux_default "i915.enable_psr=1"
	! Grub.cmdline_Linux_default "quiet"

boots :: OSDevice -> Property Linux Source #

Installs grub onto a device's boot loader, 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.

bootsMounted :: FilePath -> OSDevice -> GrubTarget -> Property Linux Source #

This is a version of boots that makes grub boot the system mounted at a particular directory. The OSDevice should be the underlying disk device that grub will be installed to (generally a whole disk, not a partition).

chainPVGrub :: GrubDevice -> GrubDevice -> TimeoutSecs -> Property (HasInfo + DebianLike) 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".