Upstart booting on kFreeBSD
James Hunt
james.hunt at ubuntu.com
Thu Jan 16 13:39:13 UTC 2014
Building on the great work that Dimitri has already done on libnih [1] and
Upstart [2], we now have Upstart booting to a getty login prompt on a kFreeBSD
system (Debian + FreeBSD kernel).
To recreate the setup...
= Install the Base system =
- Install Debian "unstable" (aka sid).
- Upgrade to "experimental".
- Upgrade the kernel to atleast version 10 (I used 11-0-0-686).
- Upgrade eglibc to 2.18.
- install Upstart dependencies:
apt-get install build-essential pkg-config libtool libinotify-dev
libdbus-1-dev libexpat1-dev autotools-dev gettext autoconf autopoint libjson0-dev
= Build libnih =
$ git clone github.com/xnox/libnih
$ autoreconf -fi && ./configure && make && sudo make install
= Build and Install Upstart =
$ bzr branch lp:~jamesodhunt/upstart/kfreebsd
$ autoreconf -fi && ./configure && make
$ sudo install init/init /sbin/init.upstart
$ sudo install util/initctl /sbin/initctl
= Create a Basic getty Job =
$ sudo su -
# cd /etc/init
# cat >tty.conf<<EOT
start on startup
exec /sbin/getty -8 38400 ttyv1
EOT
= Update Grub =
- Copy the "menuentry" for the kernel you have just installed into
/etc/grub.d/40_custom and add "upstart" to the name so you can
distinguish the upstart boot option.
- Add "set kFreeBSD.init_path=/sbin/init.upstart" to the "menuentry" block
(within the braces).
- Run "sudo update-grub".
[1] - http://blog.surgut.co.uk/2013/11/libnih-upstart-dependency-ported-to.html
[2] - https://code.launchpad.net/~xnox/upstart/kfreebsd
= Test =
- Reboot and select the "upstart" menu option in grub.
- Once booted, switch to the *second* tty (for example using "sendkey
ctrl-alt-f2" in the qemu/kvm console).
= Caveats =
As you will see, this is an extremely simple setup - the disks are not even
mounted read-write, however it proves the concept at this early stage :)
Kind regards,
James.
[1] - http://blog.surgut.co.uk/2013/11/libnih-upstart-dependency-ported-to.html
[2] - https://code.launchpad.net/~xnox/upstart/kfreebsd
--
James Hunt
____________________________________
#upstart on freenode
http://upstart.ubuntu.com/cookbook
https://lists.ubuntu.com/mailman/listinfo/upstart-devel
More information about the upstart-devel
mailing list