Safe Haskell | None |
---|---|
Language | Haskell98 |
- type GrubDevice = String
- type OSDevice = String
- type TimeoutSecs = Int
- data BIOS
- installed :: BIOS -> Property NoInfo
- boots :: OSDevice -> Property NoInfo
- chainPVGrub :: GrubDevice -> GrubDevice -> TimeoutSecs -> Property NoInfo
Documentation
type GrubDevice = String Source
Eg, "hd0,0" or "xen/xvda1"
type TimeoutSecs = Int Source
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".