[Soc-coordination] Weekly report (4th week) - Debian GNU/Hurd Debianish initialization
4winter at informatik.uni-hamburg.de
4winter at informatik.uni-hamburg.de
Fri Jul 12 12:50:43 UTC 2013
.. link:
.. description:
.. tags: gsoc, debian, hurd
.. date: 2013/07/12 14:38:15
.. title: Hi, I'm the one who wrote umount...
.. slug: hi-im-the-one-who-wrote-umount
Everyone enjoys ASCII screenshots as much as I do, right? So here is
the Hurd booting with my mtab-prototype bound to /run/mtab::
INIT: version 2.88 booting
Using makefile-style concurrent boot in runlevel S.
Activating swap...done.
Checking root file system...fsck from util-linux 2.20.1
hd2 : tray open or drive not ready
hd2 : tray open or drive not ready
hd2 : tray open or drive not ready
hd2 : tray open or drive not ready
end_request: I/O error, dev 02:00, sector 0
/dev/hd0s1: clean, 44292/181056 files, 287759/723200 blocks
done.
Activating lvm and md swap...(default pager): Already paging to partition hd0s5!
done.
Checking file systems...fsck from util-linux 2.20.1
hd2 : tray open or drive not ready
hd2 : tray open or drive not ready
end_request: I/O error, dev 02:00, sector 0
done.
Cleaning up temporary files... /tmp.
Mounting local filesystems...done.
Activating swapfile swap...(default pager): Already paging to partition hd0s5!
done.
Cleaning up temporary files....
Configuring network interfaces...inetutils-ifconfig: invalid arguments
ifup: failed to open pid file /run/network/ifup-/dev/eth0.pid: No such file or directory
Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
can't create /var/lib/dhcp/dhclient./dev/eth0.leases: No such file or directory
Listening on Socket//dev/eth0
Sending on Socket//dev/eth0
DHCPDISCOVER on /dev/eth0 to 255.255.255.255 port 67 interval 4
DHCPREQUEST on /dev/eth0 to 255.255.255.255 port 67
DHCPOFFER from 10.0.2.2
DHCPACK from 10.0.2.2
can't create /var/lib/dhcp/dhclient./dev/eth0.leases: No such file or directory
bound to 10.0.2.15 -- renewal in 42550 seconds.
done.
Cleaning up temporary files....
Setting up X socket directories... /tmp/.X11-unix /tmp/.ICE-unix.
INIT: Entering runlevel: 2
Using makefile-style concurrent boot in runlevel 2.
Starting enhanced syslogd: rsyslogd.
Starting deferred execution scheduler: atd.
Starting periodic command scheduler: cron.
Starting system message bus: dbusFailed to set socket option"/var/run/dbus/system_bus_socket": Protocol not available.
Starting OpenBSD Secure Shell server: sshd.
GNU 0.3 (debian) (console)
login:
As you can see, the boot process looks quite clean. In particular,
there are no issues left with Debians `initscripts`. The remaining
noise comes from:
* The GNU mach kernel, but that's okay. The FreeBSD kernel writes
lot's of stuff by default too, and so does Linux if one increases
the kernel log level. Also, some of the stuff might be due to me
using `qemu`.
* `Network related issues </gsoc/#networkrelatedissues>`_.
* The `default pager </gsoc/#defaultpager>`_. This is the translator
paging out memory to swap space.
This is accomplished by my `mtab translator prototype
<http://lists.gnu.org/archive/html/bug-hurd/2013-07/msg00106.html>`_. It's
work in progress, but I have reworked and broken up my initial
prototype. My initial prototype only patched `libdiskfs`, one of three
libraries translator authors can use to write filesystem-like
translators. I have made the necessary changes to the other two
libraries and patched up any loose ends.
This is the translator in action::
% fsysopts /run/mtab
/hurd/mtab /
% cat /run/mtab
/dev/hd0s1 / ext2fs writable,no-inherit-dir-group,store-type=typed 0 0
none /dev/ttyp0 /hurd/term name,/dev/ptyp0,type,pty-master 0 0
none /run /hurd/tmpfs writable,no-suid,no-exec,no-inherit-dir-group,no-sync,size=80484K 0 0
none /run/lock /hurd/tmpfs writable,no-suid,no-exec,no-inherit-dir-group,no-sync,size=5M 0 0
none /run/shm /hurd/tmpfs writable,no-suid,no-exec,no-inherit-dir-group,no-sync,size=259480K 0 0
I also patched the `sysvinit
<http://lists.gnu.org/archive/html/bug-hurd/2013-07/msg00080.html>`_
package. My version includes and switches to `runsystem.sysv` that
uses `/sbin/init` to start the system. It also carries all the
necessary workarounds for the remaining `sysvinit related issues
</gsoc/#sysvinitrelatedissues>`_.
The resulting Debian/Hurd system is very nice, it is getting more and
more similar to what a Debian user would expect:
* For the first time, `df` without arguments works::
% df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hd0s1 10005504 4671612 4833620 50% /
none 80484 44 80440 1% /run
none 5120 4 5116 1% /run/lock
none 259480 4 259476 1% /run/shm
* The `mount` utility is accompanied by `umount`.
* `/etc/fstab` is honored and `auto` works as an fstype.
* `/run` and friends are in fact ram-disks.
* `/sbin/shutdown` works.
* All init scripts are properly started and stopped.
* Among other nice things this enables one to manage the network
configuration using the Debian way via `interfaces(5)`.
* `/etc/inittab` is honored.
I have rebuild the `hurd` and `sysvinit` package and uploaded them
into an apt repository::
deb http://teythoon.cryptobitch.de/gsoc/heap/debian unstable main
Please use unstable for now. Also make sure that you have a recovery
plan for your Debian/Hurd installation if anything goes wrong. For
your convenience there's a seed tarball containing packages with the
appropriate sources.list.d snippets and the repository key:
https://teythoon.cryptobitch.de/gsoc/heap/debian/seed.tar
Currently `/hurd/console` is not started (I'll add a init script for
that later), but for now you have to start a getty on the
console. Make sure that your `/etc/inittab` contains a line like
this::
7:2345:respawn:/sbin/getty 38400 console
The patched `initscripts` package contains the `runsystem.sysv` file
and uses the Debian alternatives system to replace the `runsystem.gnu`
variant. It also switches to the appropriate `halt` and `reboot`
utilities. If you install the package, you must use `halt-hurd` or
`reboot-hurd` to halt or reboot the system. Running `halt` or `reboot`
is not harmful though, it just doesn't work.
So here I am. I've been coding for the Hurd for four weeks now, and
suddenly I'm the guy who wrote `umount`. My point is, if you ever
wanted to work on an operating system, you might want to consider
working on the Hurd. It the Debian/Hurd port is very decent and
(according to #debian-hurds "Debian GNU/Hurd Doomsday-o-meter") 78.44%
of all Debian packages are available, so you've got a familiar
environment. Also, if your solution is right and your code is
reasonably clean, it is not that hard to get your changes
accepted. The list of `open issues
<http://www.gnu.org/software/hurd/open_issues.html>`_ is long and
might contain something that interests you. You could be the one
implementing a `read-ahead solution
<http://www.gnu.org/software/hurd/open_issues/performance/io_system/read-ahead.html>`_
to massively improve Hurds overall performance.
Also since Hurd is just a Hird of Unix replacing daemons running
on-top the GNU Mach microkernel, most of the functionality lies within
userspace processes. This makes the whole system very extensible and
quite easy to work with. For an overview over the Hurd, see `this
page
<http://www.gnu.org/software/hurd/hurd/what_is_the_gnu_hurd.html>`.
Next week I'll focus on improving my `mtab` prototype, improving the
`sysvinit` patches and upstreaming the ones that are ready. As always,
in case I run out of stuff to do, I'll pick something from my `list of
issues </gsoc>`_, most likely the `network related issues
</gsoc/#networkrelatedissues>`_.
In completely unrelated news, my Debian/Linux workstation died with a
kernel panic while I was writing this blog entry. It's a good thing
Emacs honors "save early, save often". M-x
insert-monolithic-kernel-rant-here.
This is it for this week, thanks for your attention :)
More information about the Soc-coordination
mailing list