Safe Haskell | None |
---|---|
Language | Haskell2010 |
Propellor.Property.Grub
Synopsis
- type GrubDevice = String
- type OSDevice = String
- data GrubTarget
- installed :: GrubTarget -> Property (HasInfo + DebianLike)
- mkConfig :: Property DebianLike
- installed' :: GrubTarget -> Property (HasInfo + DebianLike)
- configured :: String -> String -> Property DebianLike
- cmdline_Linux_default :: String -> RevertableProperty DebianLike DebianLike
- boots :: OSDevice -> Property Linux
- bootsMounted :: FilePath -> OSDevice -> GrubTarget -> Property Linux
- type TimeoutSecs = Int
- chainPVGrub :: GrubDevice -> GrubDevice -> TimeoutSecs -> Property (HasInfo + DebianLike)
Documentation
type GrubDevice = String Source #
Eg, "hd0,0" or "xen/xvda1"
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 or container.
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).
type TimeoutSecs = Int Source #
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".