[systemd-devel] How to execute Shell before rootfs mount on centos7
Michael Chapman
mike at very.puzzling.org
Sat Nov 30 09:41:01 UTC 2019
On Sat, 30 Nov 2019, Ankele zhang wrote:
> Hello All:
> How to execute shell before rootfs mounted on CentOS7.
> On CentOS6, we can modify init shell in initramfs.img to do something
> we need. But on CentOS7 my beloved init has be changed to systemd and
> systemd has no shell script.
CentOS 7 uses Dracut [1] for its initramfs. With Dracut, you can use
`rd.break=mount` to the kernel command-line to instruct Dracut to launch a
shell just before it mounts the new root filesystem.
See the dracut.cmdline(7) manpage [2] for further details.
[1] https://dracut.wiki.kernel.org/
[2] http://man7.org/linux/man-pages/man7/dracut.cmdline.7.html
More information about the systemd-devel
mailing list