Passing init=/bin/sh to the kernel does not work anymore

Kernels & Hardware, configuring network, installing services

Passing init=/bin/sh to the kernel does not work anymore

Postby vanfanel » 2019-11-28 13:41

Hi there!

Years ago, I used to simply pass "init=/bin/sh" or "init=/bin/bash" to the kernel using the kernel parameters, and it just worked. That was time ago. I could also do "init=/usr/bin/retroarch" and have a nice system that booted directly to an emulation menu running on KMS+EGL+GLES/ALSA, etc... No services needed. Simple and functional.

Today, I have tried to do the same on my Debian aarch64 system, which runs on a Pi3b+. I installed this system from Debian aarch64 using debootstrap, and it works fine. However, by passing "init=/bin/sh" or "init=/bin/bash" all I get is a black screen. Not even boot text on tty1.

This is what my cmdline.txt has by default (works perfectly well):
Code: Select all
console=tty1 elevator=deadline root=PARTUUID=db375d88-09 rootfstype=ext4 rootwait consoleblank=0


So adding init=/bin/sh or init=/bin/bash should take me directly to sh or bash shells. It HAS to. But it does not.
Any ideas on this, please? My initial guess is that the kernel does not find init=/bin/sh or init=/bin/bash because the partition is not automounted since there is no systemd running... cold that be the problem? Is someting special required on the kernel for it to work?
Since I build my own kernels, maybe I disabled some feature that is needed for this simple thing to work.
User avatar
vanfanel
 
Posts: 3
Joined: 2013-06-23 17:31

Re: Passing init=/bin/sh to the kernel does not work anymore

Postby Head_on_a_Stick » 2019-11-28 17:07

vanfanel wrote:Since I build my own kernels, maybe I disabled some feature that is needed for this simple thing to work.

^ This.

Can you boot with bash as init using the stock kernel?
Don't break DebianHow to report bugs

SharpBang GNU/Linux® — a pre-configured Openbox/Tint2 desktop running on Debian stable
User avatar
Head_on_a_Stick
 
Posts: 10695
Joined: 2014-06-01 17:46
Location: /dev/chair


Return to System configuration

Who is online

Users browsing this forum: roseway and 15 guests

fashionable