Remix.run Logo
jkrejcha 4 days 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 4 days ago | parent [-]

The 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

kmm 4 days ago | parent [-]

That'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/2dc9e12814aafcc... 2: https://github.com/torvalds/linux/blob/d358e5254674b70f34c84...