Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sometimes I want to do something (for example, playing a simple text-mode game) while the system is booting up. This is especially useful when lengthy reiserfs transaction replays are happening.

Current hacky way of doing it is:

  1. Put the program on initramfs.
  2. Before running /sbin/init, "openvt 2 /my/program".
  3. Turn off messages from kernel (sysrq 0)
  4. Override /dev/console with /dev/null (to prevent boot messages).

The problems are:

  1. There are still some messages interfering with program output.
  2. I can't see boot messages by switching to that virtual terminal back.
  3. After finishing the boot sequence, /dev/tty2 ends up being attached both to getty and my program.

How to do it properly without of running graphical splashes?

The system is Linux Debian Squeeze, no dependency based sysv scripts.

share|improve this question
    
... How long does your system take to boot that you have time to play a game? Even on my P2/266 I barely have time to take a leak before it's up. –  Ignacio Vazquez-Abrams Dec 22 '10 at 2:13
    
Usually about a minute. But in case of reiserfs replay it can take about 5 minutes. Also I sometimes just start doing things before all the services start up. /* in some cases I just SysRq+E and login and do it */ –  Vi. Dec 22 '10 at 2:30
    
+1, I like the idea of using time productively during boot... –  Mehrdad Feb 16 '11 at 3:04
    
This is an elaborate idea, but I like it because it's also a really neat way of getting more "bang for your buck" out of your hardware. Of course, it's still easier to just bring a laptop or a Google Android phone. –  Randolf Richardson Feb 18 '11 at 7:17
    
@Randolf Richardson, This already runs on laptop. And I don't have smartphone or PDA yet. –  Vi. Feb 18 '11 at 20:32

1 Answer 1

Buy a copy of Paper Pong. http://paperconsole.com/paperpong.html

(With higher karma I would have posted a picture of page 2 where the paddel and ball is visible. you turn to page X to move the paddle up, and page Y to move the paddle down).

share|improve this answer
    
I want more general solution: how to run my interactive program during boot (not just what to do when it is booting) –  Vi. Feb 21 '11 at 12:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.