Next: Chain-loading an OS, Previous: How to boot an OS directly with GRUB, Up: How to boot operating systems [Contents][Index]

#### 5.1.2 Kexec with grub2-emu

GRUB can be run in userspace by invoking the grub2-emu tool. It will read all configuration scripts as if booting directly (see How to boot an OS directly with GRUB). With the `--kexec` flag, and kexec(8) support from the operating system, the `linux` command will directly boot the target image. For systems that lack working systemctl(1) support for kexec, passing the `--kexec` flag twice will fallback to invoking kexec(8) directly; note however that this fallback may be unsafe outside read-only environments, as it does not invoke shutdown machinery.