]> pere.pagekite.me Git - homepage.git/blob - blog/data/2014-02-03-debian-hurd-sysvinit.txt
Generated.
[homepage.git] / blog / data / 2014-02-03-debian-hurd-sysvinit.txt
1 Title: Testing sysvinit from experimental in Debian Hurd
2 Tags: english, debian, bootsystem
3 Date: 2014-02-03 13:40
4
5 <p>A few days ago I decided to try to help the Hurd people to get
6 their changes into sysvinit, to allow them to use the normal sysvinit
7 boot system instead of their old one. This follow up on the
8 <a href="https://teythoon.cryptobitch.de//categories/gsoc.html">great
9 Google Summer of Code work</a> done last summer by Justus Winter to
10 get Debian on Hurd working more like Debian on Linux. To get started,
11 I downloaded a prebuilt hard disk image from
12 <a href="http://ftp.debian-ports.org/debian-cd/hurd-i386/current/debian-hurd.img.tar.gz">http://ftp.debian-ports.org/debian-cd/hurd-i386/current/debian-hurd.img.tar.gz</a>,
13 and started it using virt-manager.</p>
14
15 <p>The first think I had to do after logging in (root without any
16 password) was to get the network operational. I followed
17 <a href="https://www.debian.org/ports/hurd/hurd-install">the
18 instructions on the Debian GNU/Hurd ports page</a> and ran these
19 commands as root to get the machine to accept a IP address from the
20 kvm internal DHCP server:</p>
21
22 <p><blockquote><pre>
23 settrans -fgap /dev/netdde /hurd/netdde
24 kill $(ps -ef|awk '/[p]finet/ { print $2}')
25 kill $(ps -ef|awk '/[d]evnode/ { print $2}')
26 dhclient /dev/eth0
27 </pre></blockquote></p>
28
29 <p>After this, the machine had internet connectivity, and I could
30 upgrade it and install the sysvinit packages from experimental and
31 enable it as the default boot system in Hurd.</p>
32
33 <p>But before I did that, I set a password on the root user, as ssh is
34 running on the machine it for ssh login to work a password need to be
35 set. Also, note that a bug somewhere in openssh on Hurd block
36 compression from working. Remember to turn that off on the client
37 side.</p>
38
39 <p>Run these commands as root to upgrade and test the new sysvinit
40 stuff:</p>
41
42 <p><blockquote><pre>
43 cat > /etc/apt/sources.list.d/experimental.list &lt;&lt;EOF
44 deb http://http.debian.net/debian/ experimental main
45 EOF
46 apt-get update
47 apt-get dist-upgrade
48 apt-get install -t experimental initscripts sysv-rc sysvinit \
49 sysvinit-core sysvinit-utils
50 update-alternatives --config runsystem
51 </pre></blockquote></p>
52
53 <p>To reboot after switching boot system, you have to use
54 <tt>reboot-hurd</tt> instead of just <tt>reboot</tt>, as there is not
55 yet a sysvinit process able to receive the signals from the normal
56 'reboot' command. After switching to sysvinit as the boot system,
57 upgrading every package and rebooting, the network come up with DHCP
58 after boot as it should, and the settrans/pkill hack mentioned at the
59 start is no longer needed. But for some strange reason, there are no
60 longer any login prompt in the virtual console, so I logged in using
61 ssh instead.
62
63 <p>Note that there are some race conditions in Hurd making the boot
64 fail some times. No idea what the cause is, but hope the Hurd porters
65 figure it out. At least Justus said on IRC (#debian-hurd on
66 irc.debian.org) that they are aware of the problem. A way to reduce
67 the impact is to upgrade to the Hurd packages built by Justus by
68 adding this repository to the machine:</p>
69
70 <p><blockquote><pre>
71 cat > /etc/apt/sources.list.d/hurd-ci.list &lt;&lt;EOF
72 deb http://darnassus.sceen.net/~teythoon/hurd-ci/ sid main
73 EOF
74 </pre></blockquote></p>
75
76 <p>At the moment the prebuilt virtual machine get some packages from
77 http://ftp.debian-ports.org/debian, because some of the packages in
78 unstable do not yet include the required patches that are lingering in
79 BTS. This is the completely list of "unofficial" packages installed:</p>
80
81 <p><blockquote><pre>
82 # aptitude search '?narrow(?version(CURRENT),?origin(Debian Ports))'
83 i emacs - GNU Emacs editor (metapackage)
84 i gdb - GNU Debugger
85 i hurd-recommended - Miscellaneous translators
86 i isc-dhcp-client - ISC DHCP client
87 i isc-dhcp-common - common files used by all the isc-dhcp* packages
88 i libc-bin - Embedded GNU C Library: Binaries
89 i libc-dev-bin - Embedded GNU C Library: Development binaries
90 i libc0.3 - Embedded GNU C Library: Shared libraries
91 i A libc0.3-dbg - Embedded GNU C Library: detached debugging symbols
92 i libc0.3-dev - Embedded GNU C Library: Development Libraries and Hea
93 i multiarch-support - Transitional package to ensure multiarch compatibilit
94 i A x11-common - X Window System (X.Org) infrastructure
95 i xorg - X.Org X Window System
96 i A xserver-xorg - X.Org X server
97 i A xserver-xorg-input-all - X.Org X server -- input driver metapackage
98 #
99 </pre></blockquote></p>
100
101 <p>All in all, testing hurd has been an interesting experience. :)
102 X.org did not work out of the box and I never took the time to follow
103 the porters instructions to fix it. This time I was interested in the
104 command line stuff.<p>