[13:01] <ristok> Hello.
[13:02] <ristok> Studying ubuntu boot -> upstart.
[13:02] <ristok> Just studying how it all works from scratch..  And..
[13:03] <ristok> I get...  Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused..  I am clearly missing something, but what ?
[13:40] <JanC> ristok: when do you see that?
[14:12] <ristok> Well, I have a very minimal system.
[14:12] <ristok> Which I boot up.
[14:13] <ristok> And then generally everything fails to that.  Which is related to upstart.
[14:14] <ristok> e.g. init.d scripts
[14:19] <ristok> "start app" -> Maybe even better example.
[14:23] <JanC> ristok: are you using Ubuntu or trying upstart on another OS?
[14:26] <ristok> Well, studying how it all goes together -> I did just add files while going forward.
[14:26] <ristok> Mainly putting together debian packages.
[14:27] <ristok> Then I wanted to try upstart as well.
[14:27] <ristok> And ended up to this.
[14:27] <ristok> googling did not give perfect results either.
[14:28] <JanC> do you have any upstart jobs yet?
[14:28] <ristok> Yes.
[14:28] <ristok> But probably not running yet ;)
[14:29] <ristok> So if I try to start something, it always says this.
[14:29] <ristok> So probably I have to start something, or create something to make it click.
[14:32] <ristok> I was first thinking it is some dbus symbol or something.  But it seems to also need upstart to run.
[14:33] <JanC> upstart uses the dbus protocol
[14:34] <JanC> and of course upstart needs to be run as the init daemon
[14:34] <ristok> But I cannot start dbus because of this.
[14:35] <ristok> Well, I am actually trying to debug why the upstart hangs for me.
[14:36] <JanC> upstart has a --verbose option
[14:36] <ristok> I am using.
[14:36] <ristok> Wait..  I will boot..
[14:36] <ristok> It just hangs.
[14:36] <ristok> Pretty early.
[14:37] <ristok> I think it is not able to run any jobs yet, at that phase.
[14:37] <JanC> I wonder if you start enough jobs to have a working system?
[14:37] <ristok> But sure, I am studying how it all should work..  So I probably make mistakes here and there.  But I sure would like to know how it all works.
[14:38] <JanC> ristok: did you look at the upstart jobs in an Ubuntu system to compare?  (or other OS that comes with upstart by default)
[14:39] <ristok> I have ubuntu installed, so I just checked from there what it will probably need.
[14:39] <JanC> for example, are you starting TTYs?
[14:39] <ristok> So I am using ubuntu packages as well.
[14:40] <ristok> I did create those manually.  Then I was thinking that maybe those ttyX.conf files do the same ?
[14:42] <ristok> Actually now it fails to mount something, which I have not defined..  And then asks root passwd.  So maybe I actually fixed something.
[14:43] <ristok> But I have not set any root passwd.
[14:44] <ristok> Is there any good documentation from this ?
[14:50] <JanC> ristok: outside of the man pages?
[14:50] <ristok> Which is the best soruce for information at the moment ?
[14:55] <Keybuk> ristok: if you see that message, you are not running Upstart
[14:55] <Keybuk> that is the error from initctl when it's run on a system where /sbin/init is *not* Upstart
[14:57] <ristok> Indeed, it is not possible to "debug" the system.
[14:58] <ristok> I just noticed it.
[14:58] <ristok> I was also missing /etc/default/rcS.
[14:58] <ristok> Now all is working, a bit further.
[15:00] <ristok> Yep, I do not know at all how to put it together.  I think that is the part I have to go through to learn it.
[15:01] <Keybuk> sure it's possible to debug
[15:01] <Keybuk> I debug all the time ;)
[15:01] <Keybuk> I also tend to bug
[15:02] <ristok> But I mean, it is now frozen to one task, does not continue.  So I am missing something for sure.
[15:02] <ristok> And rather hard to figure it out from here, that what I am actually missing.
[15:03] <Keybuk> boot with --verbose
[15:03] <ristok> Yes, I get bunch of stuff to my screen.
[15:03] <ristok> I have the verbose.
[15:03] <ristok> But I think I am missing a job.
[15:03] <Keybuk> depends what you want your system to do, really ;
[15:03] <Keybuk> :p
[15:03] <ristok> I want it to open busybox ash actually.  So probably I need something to start it...  Right ?
[15:04] <Keybuk> right
[15:04] <Keybuk> start on startup
[15:04] <Keybuk> console owner
[15:04] <Keybuk> exec busybox sh
[15:05] <Keybuk> that's probably the most minimal unix config ever of course
[15:05] <Keybuk> if that's all you have in /etc/init :p
[15:05] <Keybuk> for a start, the filesystems will be readonly, etc.
[15:07] <ristok> Well, there is already some stuff under /etc/init.  Some defaults.
[15:07] <Keybuk> depends what you start with
[15:07] <Keybuk> upstart itself ships with a few example ones
[15:08] <Keybuk> but they probably don't boot out of the box without help
[15:08] <ristok> Ok.
[15:08] <ristok> Help ?
[15:09] <ristok> Paths, etc. ?
[15:09] <Keybuk> yeah you need all the pinnings of a distro really
[15:09] <Keybuk> no, code, scripts, executables, things
[15:09] <ristok> That is for later..  Now I am happy if the base is ok ;)
[15:09] <Keybuk> typical bootish things:
[15:09] <Keybuk> - check the filesystems
[15:09] <Keybuk>  - mount the filesystems
[15:09] <Keybuk>  - load device drivers
[15:10] <Keybuk>  - create device nodes in /dev
[15:10] <Keybuk>  - start services
[15:10] <Keybuk>  - start login services
[15:10] <Keybuk> upstart doesn't come with jobs to do any of that
[15:10] <Keybuk> because that stuff is fundamentally different on every distro
[15:11] <ristok> I understand..  I am actually a bit lazy hacker, just installing packages from ubuntu.  And at least with those there are .conf files.
[15:11] <Keybuk> *nods*
[15:11] <Keybuk> ubuntu is a good place to star
[15:11] <Keybuk> t
[15:12] <Keybuk> the key package is montall
[15:12] <Keybuk> mountall
[15:12] <Keybuk> typing ... hard
[15:12] <ristok> I have that one.
[15:12] <Keybuk> you'll need udev as well
[15:12] <ristok> I have that one as well.
[15:12] <Keybuk> then you're pretty good to go
[15:12] <ristok> I ahve also dbus.
[15:12] <ristok> initscripts
[15:12] <ristok> etc.
[15:12] <Keybuk> *nods*
[15:19] <ristok> Ok, I did add the .conf file with the stuff you mentioned before..  And it just hangs.  I think it is not running the .conf.
[15:19] <Keybuk> you may be missing other packages
[15:20] <Keybuk> if you don't have ubuntu-minimal installed, install that
[15:20] <Keybuk> (or each of the packages listed until you find the one that makes thing work)
[15:20] <ristok> I have ubuntu minimal as well.
[15:20] <Keybuk> are you using the ubuntu upstart deb or the upstream tgz?
[15:21] <ristok> deb.
[15:21] <ristok> But my miniubuntu does not have upstart.
[15:22] <Keybuk> huh?
[15:22] <ristok> Maybe I have then some old version.  But I downloaded less than month ago from miniubuntu page, the last stable.
[15:23] <Keybuk> I don't know what miniubuntu is
[15:23] <ristok> Aah.. ok.
[15:23] <ristok> There is a minimal cd for installation.
[15:23] <Keybuk> if you want to learn how Upstart works, you're MUCH better off starting with a working system
[15:23] <ristok> I have a working system as well.
[15:24] <ristok> But have to admit that it is kinda blindfolded without console.  Just trying to figure out what is missing.  No error messages nothing.
[15:24] <Keybuk> why would you have an error message?
[15:24] <Keybuk> if you haven't told upstart to create a console, it wouldn't know to give an error
[15:25] <ristok> I did add the script you told me.  I understood that was the simplest way to start it ?
[15:25] <Keybuk> there are *plenty* of Linux systems without consoles
[15:25] <Keybuk> and did that job run?
[15:25] <ristok> Probably not.
[15:25] <ristok> Or else I would have a console, right ?
[15:25] <Keybuk> that's not a very helpful answer
[15:26] <ristok> Well, I do not know if that was run or not.
[15:26] <ristok> I do not have any logs to check.
[15:26] <Keybuk> ok, that's the first thing to debug then
[15:26] <Keybuk> boot with verbose and a scroll lock
[15:26] <Keybuk> page through the output
[15:26] <ristok> The log ends to tty device added
[15:26] <ristok> As far as the history goes.
[15:26] <ristok> Those seem to go ok.
[15:27] <Keybuk> then upstart is clearly running jobs and processing events
[15:27] <ristok> Finished block-device-changed event was the last one.  And I think it also worked just fine.
[15:27] <ristok> Yes, upstart is working.
[15:27] <Keybuk> http://upstart.ubuntu.com/wiki/Debugging
[15:27] <ristok> But there is no information why the script to start console did not run.
[15:28] <Keybuk> there is. it's probably just scrolled off the top of your screen
[15:28] <ristok> Highly possible.