[clug] Booting without a bootloader & alternatives to /init

Daniel Pittman daniel at rimspace.net
Thu May 21 07:30:04 GMT 2009


Jack Kelly <endgame.dos at gmail.com> writes:
> On Wed, May 20, 2009 at 9:42 PM, Ben Coughlan <ben.coughlan at anu.edu.au> wrote:
>
>> Is it possible to boot the kernel without using a bootloader?  I've seen
>> HOWTOs discussing how to do this with floppy disk, but I'm wondering how it
>> can be done from a hard drive, or a compact flash card.
>
> Not sure.
>
>> Secondly; can I have the kernel run something other than /init when it's
>> done booting?  Ideally I would just like to call my application binary.  Are
>> there any services I'll be missing if I don't use /init?  I don't need to
>> spawn a shell anywhere, but I would like some DHCP action.  I would also
>> enjoy being able to pass arguments to this binary if at all possible.
>
> If you're booting with an initrd, the kernel will try to run /linuxrc
> if it can. If you're using initramfs, it will run /init.

No, it won't.  Linux will run exactly the same set of things regardless
of the root filesystem being a physical disk or a ramfs, and regardless
of how it is populated.

You are mistaking the behaviour of distribution initramfs content (to
execute /sbin/init[1]) for kernel behaviour.

Regards,
        Daniel

Footnotes: 
[1]  Note the /sbin part, by the way, since /init it isn't.



More information about the linux mailing list