4 ms·
A fun little tidbit, if you don't provide an init to the kernel command line, it'll try to look for them in a few places in this order: 1. /sbin/init 2. /etc/
by jkrejcha 10mo ago
A fun little tidbit, if you don't provide an init to the kernel command line, it'll try to look for them in a few places in this order:
1. /sbin/init
2. /etc/init
3. /bin/init
4. /bin/sh
It dropping you into a shell is a pretty neat little way to allow recovery if you somehow really borked your init
- wibbily 10mo agoThe kernel even has a special error message for you when it happens: > Bailing out, you are on your own. Good luck. https://unix.stackexchange.com/questions/96720 https://unix.stackexchange.com/questions/96720
- kmm 10mo agoThat's actually a message from the (Arch) initramfs[1], in case it can't mount the root filesystem or find an init to hand off to. The kernel has a different error message: "No working init found. Try passing init= option to kernel."[2] 1: https://github.com/archlinux/mkinitcpio/blob/2dc9e12814aafcc86e3b6014d529b0f3f8fb3a85/init#L84 https://github.com/archlinux/mkinitcpio/blob/2dc9e12814aafcc... 2: https://github.com/torvalds/linux/blob/d358e5254674b70f34c847715ca509e46eb81e6f/init/main.c#L1640 https://github.com/torvalds/linux/blob/d358e5254674b70f34c84...