I've got pretty solid Linux experience, but little in the embedded/small system area, and this one has me baffled.

I've agreed to help a friend work on a project using a tiny little x86-compatible SBC. It's supposed to be a data logger and display for a monitoring application, using a bunch of sensors and USB ADCs. It needs an extremely quick boot, so we're playing around with various boot optimizations, disabling services, etc.

The end result he needs is a machine that can boot very quickly into runlevel 2 (no networking, console only, skips all services but what's required for the data logging and display), or boot into runlevel 3 with SSH, etc. and network services including DHCP, to allow remote access and a script to copy the logged data via SCP to another host.

Unfortunately, since this will end up being an embedded system, I need to come up with some way of using an analog hardware input - a switch or button or something - that tells the bootloader/kernel to either boot to runlevel 2 or 3.

Has anyone ever heard of this? Aside from patching either GRUB or the kernel itself to poll some sort of IO (I guess serial, parallel, or some sort of GPIO), any suggestions/ideas?

Thanks, Jason

1 Answer 1


I don't know the definitive answer, but I would guess that it is unlikely and / or difficult to do.

So my suggestion is, why not always boot to run level 2 and write a program that checks the serial port (or whatever your using) for the switch condition, ever 10 seconds or so, that will make it change to run level 3. That way you have your fast boot and your ability to change run level without too much messing about.

  • Very good suggestion, thanks. Still not what I'm hoping for, but a good fallback. Commented Jul 16, 2011 at 14:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .