r/linuxfromscratch • u/Elyas2 • Jan 27 '25
runit LFS?
im wanting to make an LFS system but i dont want either systemd or SysVinit. i would like to use runit. how do i do so? i can get to almost the end of chapter 8 then i have to compile and install sysvinit. i want to use runit so how?
4
Upvotes
View all comments
4
u/Expert_Astronomer207 Jan 27 '25
To implement
runitas the init system on your Linux From Scratch (LFS) setup, follow these steps:1. Prepare Dependencies
Ensure your system has the required tools and dependencies installed:
gcc,make,perl,mansh(e.g.,bash)2. Download and Build runit
Download the source code:
Compile runit:
Install runit:
This will place the binaries in
/sbin/or/usr/sbin.3. Set runit as Init
Replace init: Update your bootloader configuration to replace your current init with
runit. For example, if you're using GRUB:/boot/grub/grub.cfgand update the kernel line:Ensure
/etc/runitexists:4. Setup runit Service Directories
Create service directories:
Add the default
gettyservice: Create/etc/sv/getty/run:Make it executable:
Link the service to
/etc/service:5. Configure Logging
Set up a logging service: Create
/etc/sv/syslog/run:Make it executable:
Link the logging service:
6. Test runit
Reboot your system:
On boot,
runitshould take over as the init system. Services in/etc/servicewill be automatically started byrunit.7. Adding More Services
To add additional services:
/etc/sv.runscript to start the service./etc/service.For example, to add a custom service:
8. Optional Cleanup
This will configure
runitas the primary init system on your LFS-based setup.