On Wed, 6 Jan 2021 22:24:21 -0600
Paul via blfs-support <blfs-support@lists.linuxfromscratch.org> wrote:

> Question 2: Is it possible to run a system using only the kernel, grub 
> (or other bootloader), maybe a compiler/libc if I need it, and a single 
> executible loaded by the kernel that I would write in C?


Just for the record, yes. What you are asking concerns the use of
a custom init process, which is the initial "mother" process that
all the other/later processes are spawned from.

Your custom "init" program (if called something other than the system
default /sbin/init ) can be specified via the init= kernel option:

https://unix.stackexchange.com/questions/428347/how-to-pass-arguments-to-a-linux-kernel-init-bootparam
https://www.cyberciti.biz/tips/10-boot-time-parameters-you-should-know-about-the-linux-kernel.html

and that process, and only that process, will be started after the
kernel is loaded.

Note that the kernel init= option has been used in the past to bypass
login security:

https://unix.stackexchange.com/questions/172651/disallow-change-of-init-kernel-parameter

Most bootloaders have a security feature that allows init= to be disabled.

However, in that regard, always bear in mind that it is a
difficult/impossible task to totally secure a machine that a
potential attacker has physical access to.


  Cheers,

  Mike Shell
-- 
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to