TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: ALL
from: DENNIS LEE BIEBER
date: 2020-09-15 11:29:00
subject: Re: Just how much bloat c

On Tue, 15 Sep 2020 11:11:19 +0100, The Natural Philosopher
 declaimed the following:

>On 15/09/2020 11:07, Andy Burns wrote:

>> Presume cmdline.txt is the equivalent on a pi, can you append
>> init=/bin/bash  there?
>
>Well that is precisely what I am trying to find out!
>Busybox installs must do something like that

 Based on
https://www.raspberrypi.org/documentation/configuration/cmdline-txt.md
cmdline.txt is not the file to be modified for this purpose. Nor does
config.txt seem to cover it. OTOH:

pi@rpi3bplus-1:~$ cat /boot/cmdline.txt
console=tty1 root=/dev/mmcblk0p7 rootfstype=ext4 elevator=deadline
fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles

pi@rpi3bplus-1:~$ cat /proc/cmdline
coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0
snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_headphones=1
bcm2708_fb.fbwidth=1920 bcm2708_fb.fbheight=1280 bcm2708_fb.fbswap=1
vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  console=tty1
root=/dev/mmcblk0p7 rootfstype=ext4 elevator=deadline fsck.repair=yes
rootwait quiet splash plymouth.ignore-serial-consoles
pi@rpi3bplus-1:~$

shows the contents of cmdline.txt concatenated to the rest of the actual
boot parameters used, so it may work by just adding init=...

https://www.debian.org/doc/manuals/debian-reference/ch03.en.html
"""
The init program is executed as the first program with PID=1 to perform the
main boot process of starting many programs. The default file path for the
init program is "/sbin/init" but it can be changed by the kernel boot
parameter as "init=/path/to/init_program".
"""
pi@rpi3bplus-1:~$ ls -l /sbin/init
lrwxrwxrwx 1 root root 20 May 11 03:06 /sbin/init -> /lib/systemd/systemd
pi@rpi3bplus-1:~$

 So... creating a file system where /sbin/init is a link to your desired
init process might also be sufficient.


--
 Wulfraed                 Dennis Lee Bieber         AF6VN
 wlfraed@ix.netcom.com    http://wlfraed.microdiversity.freeddns.org/

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.