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

Jack Kelly endgame.dos at gmail.com
Wed May 20 11:53:29 GMT 2009


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. This can be a
shell script (surely you can afford busybox sh to fire up a DHCP
client and then exec your program?). BusyBox init is also good for a
simple init system. Just symlink /init to whatever you actually want.

> And while I'm here;  I've compiled my kernel by starting with 'make
> allnoconfig' and then rebooting/recompiling until I have a system running
> with the required drivers.  Can anyone think of any boxes I might want to
> tick that may not have been noticed in this process, keeping in mind I want
> it as small and uncluttered as I can make it.

Can't answer this one.

-- Jack


More information about the linux mailing list