diff options
author | Thomas Schwinge <tschwinge@gnu.org> | 2007-09-07 22:15:28 +0200 |
---|---|---|
committer | Thomas Schwinge <tschwinge@gnu.org> | 2007-09-07 22:15:28 +0200 |
commit | 7030f8b48c7a2a3d8f36cb0dd2996059a585232a (patch) | |
tree | e38c7d63b9b5a4713cc3ee650cdc2ff09aad3275 /hurd | |
parent | b48377c0de034f28d00b31e7ab7ba93369201a2b (diff) |
Reintegrate another bunch of pages and apply clean-ups.
Diffstat (limited to 'hurd')
-rw-r--r-- | hurd/console.mdwn | 275 | ||||
-rw-r--r-- | hurd/faq.mdwn | 2 | ||||
-rw-r--r-- | hurd/network.mdwn | 43 | ||||
-rw-r--r-- | hurd/running/debian.mdwn | 7 | ||||
-rw-r--r-- | hurd/running/debian/DebianAfterInstall.mdwn | 122 | ||||
-rw-r--r-- | hurd/running/debian/DebianFAQ.mdwn | 89 | ||||
-rw-r--r-- | hurd/running/debian/after_install.mdwn | 138 | ||||
-rw-r--r-- | hurd/running/debian/faq.mdwn | 137 | ||||
-rw-r--r-- | hurd/running/debian/package_troubleshooting.mdwn (renamed from hurd/running/debian/PackageTroubleshooting.mdwn) | 4 | ||||
-rw-r--r-- | hurd/running/debian/status.mdwn (renamed from hurd/running/debian/DebianStatus.mdwn) | 2 | ||||
-rw-r--r-- | hurd/running/distrib.mdwn | 8 | ||||
-rw-r--r-- | hurd/running/qemu.mdwn | 7 | ||||
-rw-r--r-- | hurd/running/qemu/image_for_l4.mdwn | 376 | ||||
-rw-r--r-- | hurd/translator/random.mdwn | 65 | ||||
-rw-r--r-- | hurd/translator/random/mbox.bz2 | bin | 0 -> 106158 bytes |
15 files changed, 1052 insertions, 223 deletions
diff --git a/hurd/console.mdwn b/hurd/console.mdwn new file mode 100644 index 00000000..5ce57008 --- /dev/null +++ b/hurd/console.mdwn @@ -0,0 +1,275 @@ +The below is a reworked version of Marcus Brinkmann's [letter to the debian-hurd list](http://lists.debian.org/debian-hurd/2002/debian-hurd-200209/msg00054.html). It describes how to setup the new console server for the Hurd. I am testing this right now, so this document is a work in progress. + +-- [[Main/JoachimNilsson]] - 21 Jan 2003 + +Many of the shortcomings of the console are not true anymore. I've updated the page to match the state as it is in CVS. + +-- [[Main/MarcoGerards]] - 28 May 2004 + +The latest Hurd package in Debian has all that is needed to run (dunno about hurd.ti though). The native-install script sets up all the necessary nodes, so all you really need is to run: + + console -d vga -d pc_kbd --repeat=kbd -d pc_mouse --repeat=mouse \ + -d generic_speaker -c /dev/vcs + +-- [[Main/JoachimNilsson]] - 17 Apr 2005 + +## <a name="Table_of_Contents"> Table of Contents </a> + +%TOC% + +## <a name="What_is_the_new_console_"> What is the new console? </a> + +**_The new Hurd console features:_** + +**A console server**, which provides a number of virtual consoles to term servers, with a full set of terminal capabilities. + +The console server supports any encoding supported by iconv, but uses Unicode internally. The default encoding is ISO8859-1, another useful variant is UTF-8. + +The console server provides an arbitrary number of virtual consoles (numbered starting from 1, but the numbers don't need to be consecutive), which are created dynamically. A virtual console is not automatically displayed, for this you need a console client program which attaches to the virtual console you want to use. + +You can attach any number of console clients to the same virtual console, and detach them at any time. + +The console server provides a scrollback buffer for each virtual console. Currently, this is about one and a half screen full in addition to the screen. This should be configurable, of course, but isn't right now. + +**libcons**, a library that makes it easy to write console clients that attach to the console server. + +The client interface of the server is quite complicated, because it is based on shared memory and broadcasts the data to potentially many clients without blocking. It also includes a notification scheme so that clients remain idle when there is no console activity. This saves cpu power (compared to the alternative which would be polling). + +**The default console client**, which you will normally use to use a virtual console in a console server. Rather than writing many similar console client programs, I decided to write only one initially and make it extensible via dynamically loaded modules called "drivers". + +The console client uses libcons, of course. There are a number of drivers that exists already: + +* The ncursesw driver. You can use this if you log in from a remote unicode-capable console to attach to the local console server and use virtual console over the telnet/ssh session or similar. The ncursesw driver contains an output, input and bell driver components, so it is the only driver you need to get full access. + +* The vga driver. The VGA driver can be used locally to display a virtual console on a VGA card device. This driver provides a number of exciting features, and all of them are available in the fast text mode, and do not require a graphical framebuffer: + +* BDF font support. Load any BDF font with a Unicode encoding and a size from 8x13 up to 9x15 (recommended). + +* Dynamic glyph allocation. You can use up to 512 glyphs at any time. This means you can display cyrillic, greek, english runes, thai, etc. often at the same time, up to 512 different glyphs on the screen in parallel. The 512 is not a fixed set, they are chosen automatically out of the font you have loaded. This means that we only need one font for all users, regardless of the locale. + +* Dynamic color allocation. Because the above 512 glyph modus is only available with a reduced amount of colors, you can use only up to 8 different colors, but which of the 16 colors are available is chosen dynamically based on the colors actually used. + +_Note:_ + +* Support for multiple fonts at the same time. The VGA driver supports italic and real bold (not bright color) mode. This will hopefully be used in emacs font lock mode and other applications. + +* The pc\_kbd driver. This is a hack for a PC eyboard with an american keymap. We all want configurable keyboard layouts of course, but I had to set priorities, and extracting xkb (so we can reuse the X keymaps) is on the TODO list. For now, this driver with a fixed US keymap is available for immediate use. Although it is only considered to be a temporary solution, it provides all features you need (except changing the keymap): + * All keys of a standard 102(?) keys keyboard, including Ctrl, LeftAlt, RightAlt, CapsLock, NumLock, Keypad, cursor block, function keys are supported and have a sensible default value. + * _LeftAlt_ + _Function key N_ switches the virtual console N. + * _LeftAlt_ + _ArrowRight_ or _ArrowLeft_ switches to previous or next virtual console. + * _RightShift_ + _PageUp_ or _PageDown_ scrolls back or forward in the scrollback buffer by half pages. + * _LeftAlt_ + _ArrowUp_ or _ArrowDown_ scroll back or forward one line. + * _LeftCtrl_ + _LeftAlt_ + _Backspace_ terminates the console client, and reverts the VGA card etc to its original state. + * _RightAlt_ + _Keypad_ enables you to directly enter unicode characters in hexadecimal numbers. 0-9 have their standard meaning, and NumLock is 0xa, Keypad `/` is 0xb, `*` is 0xc, `-` is 0xd, `+` is 0xe and the enter key at the lower right of the keypad is 0xf. Up to four digits are memorized, if you type more, the earlier ones are forgotten. This allows to cover up typing mistakes. + +_For example:_AltGr + (Keypad 4, Keypad 1) = 0x41 = 'A'.<br />AltGr + (Keypad 2, 6, 3, NumLock) = 0x263a = smiley. +You can get unicode tables from <http://www.unicode.org> + +* The generic\_speaker driver supports the speaker commonly found in PCs and other computers. It is good enough for a simple bell tone or a small melody. I have several default bell styles implemented, but currently there is no configuration option to access them at run time, sorry! Load this module to make the console beep on ^G. + +## <a name="How_do_I_install_the_new_Hurd_co"> How do I install the new Hurd console? </a> + +### <a name="Setting_up_for_older_hurd_packag"> Setting up for older hurd packages </a> + +You either need the latest .deb of the Hurd, version 20020918-1 or later, or you need current CVS sources and compile them yourself. + +Then, the console server is in `/hurd/console`, the client in `/bin/console`. The installation is painless. + +First, make some device files: + + # cd /dev + # ./MAKEDEV vcs tty1 tty2 tty3 tty4 tty5 tty6 + +The above six ttys are only suggestions. You might want to give or take a few, depending on your needs. + +You need the terminal description. This is not yet in the ncurses package, because I am not finished yet. But you can download [hurd.ti from CVS](http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/hurd/hurd/console/hurd.ti). Please add it with + + # tic -x hurd.ti + +Then you should add the terminals to ttys, so you get a login session on them at boot time. Edit the file `/etc/ttys`, and add the following lines (or similar if you made more/less ttys): + + tty1 "/libexec/getty 38400" hurd on secure trusted console + tty2 "/libexec/getty 38400" hurd on secure trusted console + tty3 "/libexec/getty 38400" hurd on secure trusted console + tty4 "/libexec/getty 38400" hurd on secure trusted console + tty5 "/libexec/getty 38400" hurd on secure trusted console + tty6 "/libexec/getty 38400" hurd on secure trusted console + +This is all. If you now reboot, you will get six virtual consoles with a login prompt on each. But of course, the console client is not started automatically yet, so you don't see them. + +### <a name="Activating_the_console"> Activating the console </a> + +Login at the normal system console, and try to attach to the console server, either with the `ncursesw` driver or with the vga/pc\_kbd driver: + + # console -d ncursesw /dev/vcs + +or + + # console -d vga -d pc_kbd -d generic_speaker /dev/vcs + +That should work. The `ncursesw` driver supports console switching via _C-w C-1_ (or 2, 3, ...) and you can exit it with _C-w x_. However, the VGA client is more suitable on the local console. + +If you want repeater support (needed for X): + + # console -d vga -d pc_kbd --repeat=kbd -d generic_speaker \ + -d pc_mouse --repeat=mouse --protocol=ps/2 -c /dev/vcs + +Available mouse protocols are: + +* `mousesystem` +* `microsoft` +* `ps/2` +* `nomouse` +* `logitech` +* `mouse7` + +### <a name="Setting_up_encoding"> Setting up encoding </a> + +The virtual consoles you are now running on are providing an ISO8859-1 environment (also known as latin1), which is good enough for the USA and some countries in Europe. If you require a different encoding for your locale (like, let's say, ISO8859-2), you can specify this as an argument to the console server. I am sorry to say that fsysopts doesn't do the trick yet, so you have to set the option with `settrans -fg`, which will _terminate all your login sessions and restart the console server_. + +To do this, _first_ exit the client. It will get disconnected anyway (and doesn't attempt to reconnnect yet in such a case). Then do a + + # settrans -fg /dev/vcs /hurd/console --encoding=ISO8859-2 + +or + + # settrans -fg /dev/vcs /hurd/console --encoding=UTF-8 + +or similar. A list of supported locales is not easily available, but you can poke into `/share/i18n/SUPPORTED` to get an idea what is expected for your locale, and you can also check out `/share/i18n/charmaps`. Theoretically all of these encodings are "supported". In the file SUPPORTED, you see the locale (what you should export in the LANG environment variable, and enable in `/etc/locale.gen`) and the corresponding encoding. + +If you actually try this, you will notice two problems: + +1. You can not enter the letters in your locale, because the keyboard doesn't have the right layout. See above. Keyboard maps come later. For now, you have to help yourself with the direct input with RightAlt. Maybe I will put a simple compose key feature in the pc\_kbd driver, so that some western locales can be used more easily. +2. If you bother to look up the unicode hex code and enter it with AltGr, the font can not display it! If you are using the ncursesw driver, do you use it while you are logged in from a working UTF-8 terminal? If not, then this is your problem. An ncurses driver for non-UTF-8 terminals is on the TODO list. But if you use the VGA driver, you need to load a different font. + +This is because by default, the vga driver just reads the VGA card memory and takes the font that is stored there. This font has a limited characterset (256 characters, many graphical symbols among that), so you won't get more than a few western characters with that. + +## <a name="Unicode_support"> Unicode support </a> + +But you want it all. You want to read Middle Old English. You want to read Thai. Your Korean spam. Georgian script. Hebrew. And you can have it. + +First you have to set the encoding to UTF-8: + + # settrans -fg /dev/vcs /hurd/console --encoding=UTF-8 + +Then you need a Unicode font. There are good ones provided by Markus Kuhn, [the UCS fonts](http://www.cl.cam.ac.uk/~mgk25/download/ucs-fonts.tar.gz). See also [the web page](http://www.cl.cam.ac.uk/~mgk25/ucs-fonts.html). + +Now, load the font by providing it with the `--font` option to the vga driver. I suggest only the 8x13 and the 9x15 fonts, but feel free to try others, too. Note that the VGA text mode can not really display 9 pixel wide characters. But as most characters have the ninth column empty, and the VGA text mode can display an empty column between two adjacent character cells, this trick allows us to display most of the 9x15 font correctly. So you won't notice a difference until you come to very broad characters or special symbols, where you will see that the last column is cut off. (BTW, I wrote the dynafont code carefully to still support horizontal line graphic characters properly in 9 pixel wide fonts. This is done by exploiting some special modes in the VGA hardware. This is why in 512 (256) glyph mode and 9 pixel wide fonts, you are limited to 448 (224) normal characters: 64 (32) slots are reserved for the horizontal line graphic characters so they are drawn continuously.) + +So, try the following: + + # console -d vga --font 8x13.bdf -d pc_kbd -d generic_speaker /dev/vcs + +or + + # console -d vga --font 9x15.bdf -d pc_kbd -d generic_speaker /dev/vcs + +If you are satisfied, copy your default font to `/lib/hurd/fonts/vga-system.bdf`, where it will be picked up automatically in favor to the graphic card's font. + +### <a name="More_about_fonts"> More about fonts </a> + +While we are talking about fonts, try also the 8x13O font with `--font-italic` and 8x13B or 9x15B font with `--font-bold`. You can save them in `/lib/hurd/fonts/vga-system-bold.bdf` and `/lib/hurd/fonts/vga-system-italic.bdf`, too. + +To activate those fonts on your virtual console, try the following: + + # echo `tput sitm` Hello slanted world. `tput ritm` + +and + + # echo `tput gsbom` Hello bold world. `tput grbom` + +I hope you like what you see. Imagine this in emacs font-lock mode. + +### <a name="Unicode_finally"> Unicode, finally </a> + +There are a few more steps necessary to make your Unicode environment ready: + +Install the locales package. The current version does want a newer glibc than we have in the archive, but this can be overridden with the `--force-depends` option to dpkg. The old glibc is good enough. + +Add a Unicode locale to `/etc/locale.gen`, and generate the locale information for that! For example, I am living in Germany, and normally use `de_DE` with the encoding ISO8859-1. My Unicode locale is `de_DE.UTF-8`, so I am adding that to `/etc/locale.gen`: + + de_DE.UTF-8 UTF-8 + +and rerun locale-gen: + + # locale-gen + +See also `/share/i18n/SUPPORTED`. You can also do this more conveniently with + + # dpkg-reconfigure locales + +Once you generated this, make it your default locale: + + # export LANG=de_DE.UTF-8 + +If you have also loaded the unicode font above, you are set up. Try for example to view the `examples/` files in the `ucs-fonts` package with less. + + # less fonts/examples/UTF_8-demo.txt + +You should see most of that file with the 9x15 font (a bit less with the 8x13 font). + +You should be able to do the above process with other encodings than UTF-8. But you should _always_ use a Unicode font, because the console client uses Unicode internally fo everything. + +## <a name="Application_specific_notes"> Application specific notes </a> + +If you enter unicode characters at the shell, libreadline loses track of the number of characters displayed (it is not aware of multi-byte encodings like UTF-8). This is fixed in readline 4.3 (which is not yet in Debian). + +If you use mutt, install `mutt-utf8` package. For lynx, edit `/etc/lynx.cfg`, making sure that `CHARACTER_SET` is set to `utf-8`. + +If you use other applications, try to search with google for "application-name utf8" or "application-name unicode". Often you find what you need. The issues are the same for the GNU/Hurd and GNU/Linux systems, so most of the information can be shared, except how to setup the system console to support Unicode, of course. + +The `console-server` watches for new hurdio terms (devices translated with `/hurd/term`) and adds them to `/dev/vcs` automatically. What this means is, if you create a new tty with `MAKEDEV`, and then attach something to it, it will now appear in `/dev/vcs`. When a term is disconnected from, it disappears from `/dev/vcs`. `/libexec/getty` is what is usually attached to a term. You can see this automatic adding and removing of terms from the `console-server` by typing the following: + + # cd /dev + # ls vcs/ + 1 2 3 4 5 6 + # MAKEDEV tty7 + # cat > tty7 & + [1]+ Stopped cat > tty7 + # ls vcs/ + 1 2 3 4 5 6 7 + # kill %1 + # ls vcs/ + 1 2 3 4 5 6 + +## <a name="Known_problems_and_important_mis"> Known problems and important missing features </a> + +Squeezed at the end so nobody sees it ;) + +**console server:** Is probably too lax in permission checking. Does not implement settable tab stops. Does not allow to change encoding at run time. Does not allow any other screen size but 80x25. + +Combining characters is not supported. + +**libcons/console-client:** If you have one virtual console active, and another one receives a bell character, you don't hear the bell. This is because only the active virtual console is watched for anything interesting to happen. I think that is ok, but you might be surprised if you are used to how it works on GNU/Linux. + +Copy & Paste not supported. + +**vga driver:** Does not recalculate the mode lines if the font height is changed. This makes font heights below 13 or over 16 infeasible. + +Should support other text modes (integrate svgatextmode?) + +**pc\_kbd driver:** No keyboard layout but US supported! Maybe in some cases left/right shift/ctrl/alt is allowed where both left and right should be allowed. Keyboard LEDs are only supported when using OSKIT-Mach or the CVS branch gnumach-1-branch of GNU Mach. + +**ncursesw driver:** Doesn't work properly on other terminals but UTF-8. Should not use C-w, this should be configurable. Does not support use of scroll back buffer. + +**Other programs:** Readline doesn't support multibyte encodings (4.2 and earlier). term doesn't either (all versions). + +---- + +---- + +Here's a June 2002 [status report](http://mail.gnu.org/archive/html/bug-hurd/2002-06/msg00549.html) + +In September 2002 there was a [request for testers](http://mail.gnu.org/archive/html/bug-hurd/2002-09/msg00121.html). There's been quite a bit of discussion on <bug-hurd@gnuNOSPAM.org> about updates, test results and changes. + +-- [[Main/GrantBow]] - 22 Oct 2002 + +There are several patches for the console on savannah to deal with the shortcommings described in Marcus' email. [Patches ](http://savannah.gnu.org/patch/index.php?group_id=30&set=custom&msort=0&report_id=100&advsrch=0&go_report=Apply&category_id=162&assigned_to=0&status_id=1&chunksz=50) for broadcasting the bell event, for setting other text modes and a patch to make it possible to start XFree from the console can be found on savannah. + +An [experimental plugin to load XKB keymaps](http://kilobug.free.fr/hurd/xkb-0.3.tar.gz) exists, although it is alpha quality. + +-- [[Main/MarcoGerards]] - 28 May 2004 + +Added examples that use repeaters needed by X. + +-- [[Main/OgnyanKulev]] - 18 Sep 2004 diff --git a/hurd/faq.mdwn b/hurd/faq.mdwn index 0bcb4e79..3f0cc7e5 100644 --- a/hurd/faq.mdwn +++ b/hurd/faq.mdwn @@ -13,7 +13,7 @@ If you still have problems, do not hesitate to make use of the [[MailingLists]] * **_Where are the virtual consoles I use when running GNU/Linux?_** * You need to [use screen](http://www.gnu.org/software/hurd/faq.en.html#q4-6) instead, also available when running GNU/Linux. - * The [new console](http://lists.debian.org/debian-hurd/2002/debian-hurd-200209/msg00054.html) by Marcus Brinkmann could also be used. It supports the Alt-Fn keys for switching like in GNU/Linux. NOTE: that message has an error in the configuration steps, it says `/dev/vts` when it means `/dev/vcs`. A more up-to-date howto is [[HurdConsole]]. + * The [new console](http://lists.debian.org/debian-hurd/2002/debian-hurd-200209/msg00054.html) by Marcus Brinkmann could also be used. It supports the Alt-Fn keys for switching like in GNU/Linux. NOTE: that message has an error in the configuration steps, it says `/dev/vts` when it means `/dev/vcs`. A more up-to-date howto is [[console]]. * **_What is a translator?_** * The official FAQ [answers](http://www.gnu.org/software/hurd/faq.en.html#q4-2) this question by a reference to [hurd-doc-translator](http://www.debian.org/ports/hurd/hurd-doc-translator). diff --git a/hurd/network.mdwn b/hurd/network.mdwn new file mode 100644 index 00000000..5786b01c --- /dev/null +++ b/hurd/network.mdwn @@ -0,0 +1,43 @@ +How to setup networking in the Hurd. + +First, make sure that Mach recognizes your hardware. <!-- If it doesn't, you can +to recompile it in most cases. [ADD LINK TO INFO ON THIS] --> + +# The `pfinet` Translator + +To configure the network, the `pfinet` (*Protocol Family Internet*) translator +must be configured. This is done using the `settrans` command to attach a +translator to a given file system node. When programs access the node by, for +example, sending an RPC, the Hurd will transparently start the server to handle +the request. + + # settrans -fgap /servers/socket/2 /hurd/pfinet -i eth0 \ + -a 192.168.0.50 -g 192.168.0.1 -m 255.255.255.0 + +Here, `settrans` is passed several options: + +* `fg`, force any existing translator to go away. +* `ap`, make both active and passive translators. + +The active translator means that the operating system both starts the +translator immediately and passinve means that the settings are saved in the +file system node. The former also means that any error messages are sent to +`stderr`. + +The argument `/server/socket/2` is the node that the translator is to be +attached to. This is followed by the translator program to run and any +arguments to give it. + +`-a`, `-g` and `-m` are, quite obviously, the IP address, the gateway and +netmask. + +Help on settrans can be obtained by passing it the `--help` option. Help on a +specific translator can be gotten by invoking it from the command line with the +same argument, e.g.: + + # /hurd/pfinet --help + +As there can be a lot of output, consider piping this through a pager. + +Finally copy over your `/etc/resolv.conf` from GNU/Linux to allow your DNS to +resolve correctly. diff --git a/hurd/running/debian.mdwn b/hurd/running/debian.mdwn index db36ec25..2e5d80c6 100644 --- a/hurd/running/debian.mdwn +++ b/hurd/running/debian.mdwn @@ -1,10 +1,11 @@ [[img logo.png]] -- [[DebianFAQ]] -- Frequently Asked Questions -- [[DebianAfterInstall]] -- Do this to get networking, new console and X +- Debian [[FAQ]] -- Frequently Asked Questions +- [[After_install]] -- Do this to get networking, new console and X - [Presentation](http://people.debian.org/~mbanck/talks/hurd_lt2004/html/) *Debian GNU/Hurd* by [[MichaelBanck]], LinuxTag 2004 Karlsruhe +- [[Status]] - Official page about the Debian GNU/Hurd port: [Debian GNU/Hurd](http://www.debian.org/ports/hurd/) - [Installation Instructions](http://www.debian.org/ports/hurd/hurd-install) -- [Archive Qualification](http://wiki.debian.org/ArchiveQualification/hurd-i386)
\ No newline at end of file +- [Archive Qualification](http://wiki.debian.org/ArchiveQualification/hurd-i386) diff --git a/hurd/running/debian/DebianAfterInstall.mdwn b/hurd/running/debian/DebianAfterInstall.mdwn deleted file mode 100644 index b1f14d9a..00000000 --- a/hurd/running/debian/DebianAfterInstall.mdwn +++ /dev/null @@ -1,122 +0,0 @@ -<div> - <center> [ [[Hurd/InstallNotes]] | [[Hurd/GetNetworkRunning]] | [[Hurd/RandomDevice]] | [[Hurd/DebianX]] ] </center> -</div> - -%TOC% - -## <a name="First_steps_after_Install_"> First steps after Install. </a> - -So you have managed to get past the first ./native-install runs in single-user mode? - -Time to get to work. - -### <a name="_Hurd_GetNetworkRunning_Setup_ne"> </a> [[Hurd/GetNetworkRunning]] - -Check if your NIC was detected by GNU Mach: - - # devprobe eth0 - -_devprobe_ (run as user _root_) will print _eth0_ on successful detection. If it doesn't, your NIC was not detected correctly. You can then try to do the following (also as user _root_) for getting details: - - # cat /dev/klog > ~/klog - [Wait a second, then press `Ctrl-C'.] - -Now examine the _~/klog_ file. - -If the NIC was detected: - - # settrans -fgap /servers/socket/2 /hurd/pfinet -i eth0 -a 192.168.1.3 -g 192.168.1.1 -m 255.255.255.0 - -### <a name="Setup_grub"> Setup grub </a> - -You surely want grub to have a nice menu entry able to boot GNU, instead of typing a boring arcane. There are Debian-specific scripts that may help you. See the [[GrubNotes]] for this. - -### <a name="Setup_apt_get"> Setup apt-get </a> - -Sometimes getting apt-get to work is not straightforward. Good mirrors to put in `/etc/apt/sources.list` are (as of Jan 2007): - - deb http://mirrors.kernel.org/debian unstable main contrib - deb-src http://mirrors.kernel.org/debian unstable main contrib - deb http://ftp.gnuab.org/debian unreleased main - deb-src http://ftp.gnuab.org/debian unreleased main - -apt-get update a couple of times if some file fails to download. - -If when doing your first apt-get, dpkg complains of missing programs, [try to cheat it this way](http://lists.debian.org/debian-hurd/1999/05/msg00187.html): - - # ln -s /sbin/ldconfig /bin/ldconfig - # ln -s /bin/true /bin/update-rc.d - # ln -s /bin/true /bin/start-stop-daemon - # ln -s /bin/true /bin/install-info - # ln -s /bin/true /bin/update-alternatives - -Installing packages without having a network connection is described [[Distrib/DebianAptOffline]]. - -### <a name="_Hurd_RandomDevice_Setup_random_"> </a> [[Hurd/RandomDevice]] - -You often need scp and ssh. Sadly the Debian GNU/Hurd does not come with any default random package installed. See [[Hurd/RandomDevice]] for details, the following is just a quick recap. - - cd && mkdir tmp && cd tmp - wget http://kilobug.free.fr/hurd/random-64.tar.gz - tar xvfz random-64.tar.gz - cp random /hurd/ - - settrans -c /dev/random /hurd/random \ - --seed-file /var/run/random-seed --secure - settrans -c /dev/urandom /hurd/random \ - --seed-file /var/run/urandom-seed --fast - chmod 0644 /dev/random /dev/urandom - - apt-get install ssh - -### <a name="_Hurd_HurdConsole_Setup_Virtual_"> </a> [[Hurd/HurdConsole]] - -The latest Hurd package in Debian, plus the /native-install script, creates all necessary device nodes and other magic. You just need to edit /etc/default/hurd-console to tune the parameters and tell it to start at bootup. - -You can also call the Hurd console manually with the proper arguments: - - console -d vga -d pc_kbd --repeat=kbd -d pc_mouse --repeat=mouse \ - -d generic_speaker -c /dev/vcs - - cd /dev - ln -s cons/kbd . - ln -s cons/mouse . - -### <a name="_Hurd_DebianXorg_Setup_X_Window_"> </a> [[Hurd/DebianXorg]] - -You first must have setup the virtual console. See above. - -Assuming you've installed WindowMaker and have tried running startx already: - - [/etc/X11/XF86Config-4] - - Section "Module" - # Load "dri" - # Load "speedo" - . - . - . - EndSection - - Section "InputDevice" - Identifier "Configured Mouse" - Driver "mouse" - Option "CorePointer" - Option "Device" "/dev/mouse" - Option "Protocol" "osmouse" - EndSection - -Make sure not to have the "Emulate3Buttons" and "ZAxisMapping" settings set, as they lead to problems with e.g. dragging windows around. - - [/etc/profile] - LD_LIBRARY_PATH=/X11R6/lib:$LD_LIBRARY_PATH - -### <a name="What_about_package_XYZ_"> </a> What about package XYZ? - -See if you can find a useful tip in [[PackageTroubleshooting]]. - --- [[Main/JoachimNilsson]] - 17 Apr 2005 - -How about making an afterinstall man page � la !OpenBSD afterboot man page? Anyone could easily convert the current text into an afterinstall.8 page. If nobody else feels up to it I could do it. - --- [[Main/JoachimNilsson]] - 22 Jul 2005 diff --git a/hurd/running/debian/DebianFAQ.mdwn b/hurd/running/debian/DebianFAQ.mdwn deleted file mode 100644 index 43ace701..00000000 --- a/hurd/running/debian/DebianFAQ.mdwn +++ /dev/null @@ -1,89 +0,0 @@ -# <a name="Debian_GNU_Hurd_FAQ"> </a> Debian GNU/Hurd FAQ - -See also [[hurd/FAQ]] and [[DebianAfterInstall]] - -## <a name="df"> df </a> - -There is no /etc/mtab, so just running \`df' will yield an error. Pass df a path like \`df /' or \`df .' to see the disk usage of that particular file system. - -## <a name="sshd"> sshd </a> - -You need to disable [[PriviledgeSeperation]] in /etc/ssh/sshd\_options. Also make sure you have /dev/random, see below. - -## <a name="_dev_random"> /dev/random </a> - -There is no random device by default as no secure implementation has been finished yet. An easy (but very insecure) work-around is to copy a binary file like \`/bin/bash' to /dev/random and /dev/urandom. - -## <a name="Hurd_console"> Hurd console </a> - -Edit /etc/default/hurd-console to configure the Hurd console and enable it on bootup. See [[Hurd/HurdConsole]] for further information about the Hurd console. - -## <a name="swap"> swap </a> - -## <a name="2GB_partition_limit"> 2GB partition limit </a> - -The 2GB limit has been removed in Debian GNU/Hurd. - -## <a name="Free_memory"> Free memory </a> - -Run \`vmstat' to see memory and swap usage. - -## <a name="translators"> translators </a> - -## <a name="512MB_RAM_limit"> </a> 512MB RAM limit - -GNU Mach does not cope well with lots of memory. Newer versions of the Debian gnumach package will limit themselves to around 1GB of memory. If you have an older version, or still experience problems with vmstat (see above) reported much less memory than you have, the best is to limit the memory it can see via GRUB's upppermem feature. Add \`uppermem 786432' to GRUB's Hurd entry in menu.lst - -This should be fixed. - -## <a name="xserver_common"> xserver-common </a> - -You need to run \`dpkg-reconfigure xserver-common' and select \`Anybody' for starting X as there is no way to detect console users currently. - -## <a name="reporting_Bugs"> reporting Bugs </a> - -Please try to reproduce bugs which are not obviously Hurd-specific on Debian GNU/Linux and then file them there. - -If you find a genuine issue in Debian GNU/Hurd, please file it in our Alioth bug tracker at [http://alioth.debian.org/tracker/?atid=411594&group\_id=30628&func=browse](http://alioth.debian.org/tracker/?atid=411594&group_id=30628&func=browse) If you find a bug in the Hurd or GNU Mach themselves, either file a bug against the respective Debian packages, or directly at <http://savannah.gnu.org/bugs/?group=hurd> - -## <a name="ps_hangs"> ps hangs </a> - -If \`ps' hangs, try \`ps -M' which might still works. - -## <a name="porting_packages"> porting packages </a> - -## <a name="debugging_glibc"> debugging glibc </a> - -To get debugging information for glibc, you need to install the libc0.3-dbg package. At the place gdb looks for debugging symbols by default (/usr/lib/debug/lib/), Debian's libc0.3-dbg stores only frame unwind information. If you want to step into glibc while debugging, you need to add LD\_LIBRARY\_PATH=/usr/lib/debug to gdb's environment. If that still does not work, try LD\_PRELOAD=/usr/lib/debug/libc.so.0.3 instead. You can add to gdb's environment via "set env FOO bar" from the gdb command line. - -It seems that this is no longer needed with the Debian glibc 2.5 packages, but I may as well be wrong. Have to check that again. - -## <a name="debugging_translators"> debugging translators </a> - -In order to debug translators and being able to step into glibc during it, you need the hurd-dbg and libc0.3-dbg packages installed. Then start the translator like settrans -P /foo /usr/bin/env LD\_LIBRARY\_PATH=/usr/lib/debug /hurd/foofs". The -P option will make it pause and you will be able to attach gdb to the process. - -Is starting the translator like this really needed? - -## <a name="other_repositories"> other repositories </a> - -If you want to use the _apt-get source_ facility, make sure that _/etc/apt/sources.list_ contains a line like - - deb-src http://ftp.de.debian.org/debian unstable main - -... replacing _de_ with your homeland's code. - -## <a name="kernel_logs"> kernel logs </a> - -The kernel logs are written to /dev/klog by Mach. Run "cat /dev/klog > foo" as root and hit ctrl+c after a few seconds to catch the logs. You can do this only once and do not do this in single-user mode (where ctrl+c does not work). - -## <a name="_bad_hypermeta_data_"> \`bad hypermeta data' </a> - -If you get the error \`bad hypermeta data' when trying to mount an ext3 partition from GNU/Linux, that is usually because the file system has not been unmounted cleanly (maybe GNU/Linux got suspended to disk) and the Hurd cannot mount it as ext2 without checking. Either boot back into GNU/Linux and unmount it or you can try to run "fsck.ext3" from GNU/Hurd directly. - ----- - -Page started. - --- [[Main/MichaelBanck]] - 14 Mar 2006 - -Mentioned Hurd FAQ. reformated. -- [[Main/AaronHawley]] - 14 Mar 2006 diff --git a/hurd/running/debian/after_install.mdwn b/hurd/running/debian/after_install.mdwn new file mode 100644 index 00000000..5c998c94 --- /dev/null +++ b/hurd/running/debian/after_install.mdwn @@ -0,0 +1,138 @@ +First steps after installation. + +So you have managed to get past the first `native-install` runs in single-user +mode? + +Time to get to work. + +[[toc ]] + + +### Get Networking Running + +[[Network]]. + +Check if your NIC was detected by GNU Mach: + + # devprobe eth0 + +`devprobe` (run as user *root*) will print `eth0` on successful detection. If +it doesn't, your NIC was not detected correctly. You can then try to do the +following (also as user *root*) for getting details: + + # cat /dev/klog > ~/klog + [Wait a second, then press `Ctrl-C'.] + +Now examine the `~/klog` file. + +If the NIC was detected: + + # settrans -fgap /servers/socket/2 /hurd/pfinet -i eth0 -a 192.168.1.3 -g 192.168.1.1 -m 255.255.255.0 + + +# Setup GRUB + +You surely want grub to have a nice menu entry able to boot GNU, instead of +typing a boring arcane. There are Debian-specific scripts that may help +you. See the [[GrubNotes]] for this. + + +# Setup `apt-get` + +Sometimes getting `apt-get` to work is not straightforward. Good mirrors to +put in `/etc/apt/sources.list` are (as of Jan 2007): + + deb http://mirrors.kernel.org/debian unstable main contrib + deb-src http://mirrors.kernel.org/debian unstable main contrib + deb http://ftp.gnuab.org/debian unreleased main + deb-src http://ftp.gnuab.org/debian unreleased main + +`apt-get` update a couple of times if some file fails to download. + +<!-- As long as I am around (which is as off February 2005) I never ever had to +do such following frobbing. Should we remove this? --[[tschwinge]] --> + +If when doing your first `apt-get`, `dpkg` complains of missing programs, [try +to cheat it this +way](http://lists.debian.org/debian-hurd/1999/05/msg00187.html): + + # ln -s /sbin/ldconfig /bin/ldconfig + # ln -s /bin/true /bin/update-rc.d + # ln -s /bin/true /bin/start-stop-daemon + # ln -s /bin/true /bin/install-info + # ln -s /bin/true /bin/update-alternatives + +Installing packages without having a network connection is described +[[Distrib/DebianAptOffline]]. + + +# [[translator/Random]] + +You often need `scp` and `ssh`. Sadly the Debian GNU/Hurd does not yet come +with any default random translator package installed. See +[[translator/random]] for details, the following is just a quick recap. + + cd && mkdir tmp && cd tmp + wget http://kilobug.free.fr/hurd/random-64.tar.gz + tar xvfz random-64.tar.gz + cp random /hurd/ + + settrans -c /dev/random /hurd/random \ + --seed-file /var/run/random-seed --secure + settrans -c /dev/urandom /hurd/random \ + --seed-file /var/run/urandom-seed --fast + chmod 0644 /dev/random /dev/urandom + + apt-get install ssh + + +# [[Console]] + +The latest Hurd package in Debian, plus the `native-install` script, creates +all necessary device nodes and other magic. You just need to edit +`/etc/default/hurd-console` to tune the parameters and tell it to start at +bootup. + +You can also call the Hurd console manually with the proper arguments: + + console -d vga -d pc_kbd --repeat=kbd -d pc_mouse --repeat=mouse \ + -d generic_speaker -c /dev/vcs + + cd /dev + ln -s cons/kbd . + ln -s cons/mouse . + + +# [[Hurd/DebianXorg]] + +You first must have setup the virtual console. See above. + +Assuming you've installed WindowMaker and have tried running `startx` already: + + [/etc/X11/XF86Config-4] + + Section "Module" + # Load "dri" + # Load "speedo" + . + . + . + EndSection + + Section "InputDevice" + Identifier "Configured Mouse" + Driver "mouse" + Option "CorePointer" + Option "Device" "/dev/mouse" + Option "Protocol" "osmouse" + EndSection + +Make sure not to have the `Emulate3Buttons` and `ZAxisMapping` settings set, as +they lead to problems with e.g. dragging windows around. + + [/etc/profile] + LD_LIBRARY_PATH=/X11R6/lib:$LD_LIBRARY_PATH + +# What about package XYZ? + +See if you can find a useful tip in [[package_troubleshooting]]. diff --git a/hurd/running/debian/faq.mdwn b/hurd/running/debian/faq.mdwn new file mode 100644 index 00000000..1892d63f --- /dev/null +++ b/hurd/running/debian/faq.mdwn @@ -0,0 +1,137 @@ +Debian GNU/Hurd FAQ. + +See also the [[Hurd_FAQ|hurd/FAQ]] and [[after_install]]. + +[[toc ]] + + +# `df` + +There is no `/etc/mtab`, so just running `df` will yield an error. Pass `df` a +path like `df /` or `df ./` to see the disk usage of that particular file +system. + + +# `sshd` + +You need to disable `PriviledgeSeperation` in `/etc/ssh/sshd\_options`. Also +make sure you have `/dev/random`, see below. + + +# `/dev/random` + +There is no random device by default as no secure implementation has been +finished yet. An easy (but very insecure) work-around is to copy a binary file +like `/bin/bash` to `/dev/random` and `/dev/urandom`. + + +# Hurd Console + +Edit `/etc/default/hurd-console` to configure the Hurd console and enable it on +bootup. See [[console]] for further information about the Hurd console. + + +# Swap + + +# 2 GiB Partition Limit + +The 2 GiB limit has been removed in Debian GNU/Hurd. + + +# Free Memory + +Run `vmstat` to see memory and swap usage. + + +# Translators + + +# 512 MiB RAM Limit + +GNU Mach does not cope well with lots of memory. Newer versions of the Debian +`gnumach` package will limit themselves to around 1 GiB of memory. If you have +an older version, or still experience problems with `vmstat` (see above) +reported much less memory than you have, the best is to limit the memory it can +see via GRUB's `upppermem` feature. Add `uppermem 786432` to GRUB's Hurd entry +in `menu.lst`. + +This should be fixed. + + +# `xserver-common` + +You need to run `dpkg-reconfigure xserver-common` and select `Anybody` for +starting X as there is no way to detect console users currently. + + +# Reporting Bugs + +Please try to reproduce bugs which are not obviously Hurd-specific on Debian +GNU/Linux and then file them there. + +If you find a genuine issue in Debian GNU/Hurd, please file it in our Alioth +bug tracker at +[http://alioth.debian.org/tracker/?atid=411594&group\_id=30628&func=browse](http://alioth.debian.org/tracker/?atid=411594&group_id=30628&func=browse) +If you find a bug in the Hurd or GNU Mach themselves, either file a bug against +the respective Debian packages, or directly at +<http://savannah.gnu.org/bugs/?group=hurd> + + +# `ps` Hangs + +If `ps` hangs, try `ps -M` which might still work. + + +# Porting Packages + + +# Debugging inside glibc + +To get [[debugging]] information for glibc, you need to install the +`libc0.3-dbg` package. At the place [[debugging/GDB]] looks for debugging +symbols by default (`/usr/lib/debug/lib/`), Debian's `libc0.3-dbg` stores only +frame unwind information. If you want to step into glibc while debugging, you +need to add `LD\_LIBRARY\_PATH=/usr/lib/debug` to GDB's environment. If that +still does not work, try `LD\_PRELOAD=/usr/lib/debug/libc.so.0.3` instead. You +can add to GDB's environment via `set env FOO bar` from the GDB command line. + +It seems that this is no longer needed with the Debian glibc 2.5 packages, but +I may as well be wrong. Have to check that again. + + +# Debugging Translators + +In order to [[debug|debugging]] translators and being able to step into glibc +during it, you need the `hurd-dbg` and `libc0.3-dbg` packages installed. Then +start the translator like `settrans -P /foo /usr/bin/env +LD\_LIBRARY\_PATH=/usr/lib/debug /hurd/foofs`. The `-P` option will make it +pause and you will be able to attach [[debugging/GDB]] to the process. + +Is starting the translator like this really needed? + + +# Other Repositories + +If you want to use the `apt-get source` facility, make sure that +`/etc/apt/sources.list` contains a line like + + deb-src http://ftp.de.debian.org/debian unstable main + +... replacing _de_ with your homeland's code. + + +# Kernel Logs + +The kernel logs are written to `/dev/klog`. Run `cat /dev/klog > foo` as root +and hit `ctrl+c` after a few seconds to catch the logs. You can do this only +once and do not do this in single-user mode (where `ctrl+c` does not work). + + +# `bad hypermeta data` + +If you get the error `bad hypermeta data` when trying to mount an ext3 +partition from GNU/Linux, that is usually because the file system has not been +unmounted cleanly (maybe GNU/Linux got suspended to disk) and the Hurd cannot +mount it as ext2 without checking. Either boot back into GNU/Linux and unmount +it or you can try to run `fsck.ext3` from GNU/Hurd directly. diff --git a/hurd/running/debian/PackageTroubleshooting.mdwn b/hurd/running/debian/package_troubleshooting.mdwn index fe8b6df4..829af8e3 100644 --- a/hurd/running/debian/PackageTroubleshooting.mdwn +++ b/hurd/running/debian/package_troubleshooting.mdwn @@ -17,7 +17,7 @@ It may be that dpkg wants external GNU/Linux-specific programs that it can't fou ## <a name="SSH_not_working"> </a> SSH not working -You must set up the [[RandomDevice]] first. +You must set up the [[translator/random]] device first. ## <a name="An_X_package_hangs_at_startup_wi"> An X package hangs at startup without error messages </a> @@ -42,7 +42,7 @@ There are various reasons for this. bytes += read(_urandomfd, n - len(bytes)) KeyboardInterrupt -it is the random device fault. Follow the [[RandomDevice]] guide. If you already did, try _anyway_ to detach and reattach the translators. +it is the random device fault. Follow the [[translator/random]] guide. If you already did, try _anyway_ to detach and reattach the translators. ## <a name="Cannot_compile_even_trivial_C_pr"> Cannot compile even trivial C programs </a> diff --git a/hurd/running/debian/DebianStatus.mdwn b/hurd/running/debian/status.mdwn index 505c46a5..95e48edc 100644 --- a/hurd/running/debian/DebianStatus.mdwn +++ b/hurd/running/debian/status.mdwn @@ -1,4 +1,4 @@ Debian GNU/Hurd is currently an official, non-releasing Debian port. I.e., there is no testing or stable distribution. - [Build daemon/archive status](http://unstable.buildd.net/buildd/hurd-i386_stats) - - [Number of registered users](http://buildd.net/cgi/archvote.phtml)
\ No newline at end of file + - [Number of registered users](http://buildd.net/cgi/archvote.phtml) diff --git a/hurd/running/distrib.mdwn b/hurd/running/distrib.mdwn index f3078a65..a373062c 100644 --- a/hurd/running/distrib.mdwn +++ b/hurd/running/distrib.mdwn @@ -50,11 +50,15 @@ Another installation method is using an emulated environment. The [[BochsEmulato <dd> Work has been started by James Morrison and Glenn <nop>McGrath to [[PortDebootstrap]]. There is also a [[NewDebianInstaller]]. Why should Hurd folks care? It's important because this is the next generation installer that is intended to be used by all ports when Sarge is released. </nop></dd> </dl> + # Using -[[DebianAfterInstall]] instructions are a must-read to prepare an usable system. +Debian [[debian/after_install]] instructions are a must-read to prepare an +usable system. + +[[debian/Package_troubleshooting]] reports known bugs, quirks and workarounds +about getting applications to work (if possible). -[[PackageTroubleshooting]] reports known bugs, quirks and workarounds about getting applications to work (if possible). # For Developers diff --git a/hurd/running/qemu.mdwn b/hurd/running/qemu.mdwn index b6c200d7..f40d71d8 100644 --- a/hurd/running/qemu.mdwn +++ b/hurd/running/qemu.mdwn @@ -4,7 +4,7 @@ volunteers and may not have been tested extensively. * [Disk image](http://www.numenor.art.pl/balrog/hurd/) with an installation of - Debian GNU/Hurd. + [[Debian_GNU/Hurd|running/debian]]. * [Announcement](http://lists.debian.org/debian-hurd/2007/09/msg00000.html) of another image. @@ -112,9 +112,10 @@ That should do it! Do not forget to edit/update `/etc/resolv.conf` to get DNS wo These are links that users may find helpful. -[[DebianAfterInstall]] - good source of information pertaining to your system after installation. +Debian [[debian/after_install]] -- good source of information pertaining to your +system after installation. -[[Hurd/QemuImageForL4]] - a QEMU image for the Hurd/L4 project. +[[Image_for_L4]] -- a QEMU image for the Hurd/L4 project. # TODO diff --git a/hurd/running/qemu/image_for_l4.mdwn b/hurd/running/qemu/image_for_l4.mdwn new file mode 100644 index 00000000..515f51bc --- /dev/null +++ b/hurd/running/qemu/image_for_l4.mdwn @@ -0,0 +1,376 @@ +This page is initially taken from <http://perso.ens-lyon.fr/alexandre.buisse/hurd.html> with the following signature: + +> 04-02-2005 Alexandre Buisse +> +> Send any comments or ameliorations to <Nattfodd@gmailNOSPAM.com> + +---- + +This is a howto on how to get a working image of Hurd/L4 with qemu, on ia32 arch. + +# <a name="1_Floppy_image"> 1. Floppy image </a> + +You will need the following : + +* automake 1.7 (or greater) +* autoconf 2.53 (or greater) +* grub +* the CVS version of hurd-l4, which you can retrieve from the savannah server: `cvs -z3 -d:pserver:anonymous@cvs.savannah.gnu.org:/sources/hurd co hurd-l4` +* two flavours of Pistachio, the L4 kernel, which can be found at <http://www.l4ka.org/projects/pistachio/download.php>. Take the demodisk for ia32 (`pistachio-ia32-0.4-demodisk.bin.bz2`), we'll checkout the CVS later (the 0.4 tarball isn't recent enough). + +We will begin with the hurd itself (these steps are taken from the `README`). + + $ cd hurd-l4 + $ autoreconf -f -i -s + +You shouldn't have any warnings with this autoreconf. If that is not the case, it probably hasn't used the good version of automake or autoconf. For instance, on Gentoo Linux, you must set WANT\_AUTOCONF to 2.5 and WANT\_AUTOMAKE to 1.7. + + $ ./configure --enable-maintainer-mode --prefix=/l4 + $ make + $ make install + $ mkdir /l4/boot + $ install -s laden/laden /l4/boot + $ install -s wortel/wortel /l4/boot + $ install -s physmem/physmem /l4/boot + $ install -s task/task /l4/boot + $ install -s deva/deva /l4/boot + $ install -s ruth/ruth /l4/boot + +Now we'll prepare the Pistachio kernel : + + $ cd .. + $ cvs -d:pserver:guest:guest@cvs.l4ka.org:/public-cvs login + $ cvs -z3 -d:pserver:guest@cvs.l4ka.org:/public-cvs co pistachio + $ cd pistachio + +We must apply some patchs for it to work properly with The Hurd. They are located in `hurd-l4/README`: + + $ patch -p1 < ../hurd-l4/README + +We will first compile sigma0 (and some other tools) : + + $ cd user + $ autoreconf -f -i -s + $ mkdir BUILDDIR + $ cd BUILDDIR + +We need to change the linkbase of sigma0 : + + $ ../configure --with-s0-linkbase=0x40000 --prefix=/l4 + $ make + $ make install + +And now the kernel itself : + + $ cd ../../kernel + +You can use any builddir as long as the directory doesn't yet exist. + + $ make BUILDDIR=/tmp/pistachio-build + $ cd /tmp/pistachio-build + $ vi Makeconf.local + +You should modify the first three lines to : + + ARCH=ia32 + CPU=i586 + PLATFORM=pc99 + +now run: + + $ make menuconfig + +Set the options as they fit you but for qemu to work, you must have the following hardware : + + IA32 Basic Architecture + Pentium1 Processor Type + +You can now: + + $ make + +You should obtain a file named ia32-kernel into your build directory. + + $ cp ia32-kernel /l4/boot + $ cp /l4/libexec/l4/sigma0 /l4/boot + +We now have to modify a little bit the demodisk to use the kernel and servers we just obtained : + + $ mkdir qemu + $ mkdir qemu/image + $ cd qemu + $ cp ~/pistachio-ia32-0.4-demodisk.bin.bz2 . + $ bunzip2 pistachio-ia32-0.4-demodisk.bin.bz2 + $ mount -o loop pistachio-ia32-0.4-demodisk.bin image + $ cd image/boot + $ cp /l4/boot/* . + $ cd grub + $ vi menu.lst + +Your should edit `menu.lst` to make it look like : + + title GNU Hurd on L4 + kernel /boot/laden -D -o serial,uart1,speed=9600 + module /boot/ia32-kernel + module /boot/sigma0 + module /boot/wortel -D -o serial,uart1,speed=9600 + module /boot/physmem + module /boot/task + module /boot/deva + module /boot/task + module /boot/ruth + +The two -D are intended for debug, you can delete them if you want. It is possible that filenames are limited to 8 characters, check your image/boot directory for ia32-kernel. If it has been renamed into ia32-ker, modify the according line in menu.lst + +When you start qemu, you will have two windows : the shell from which you launched it and a VGA window. You can interact with L4 in both windows (switching with the `config/console` command in the debugger). You can choose to have wortel and laden output to the serial device (the shell), which is default behaviour, or to VGA (change `-o serial,urt1,speed=9600` by `-o vga` in your menu.lst). + +The image is now ready : + + $ cd ../../../ + $ umount image + +We can launch qemu: + + $ qemu -dummy-net -serial stdio -fda pistachio-ia32-0.4-demodisk.bin -boot a + +Congratulations, you just booted Hurd/L4 ! To start the Kernel Debugger, press `ESC`. To switch the KDB mode from character (I find it unusable) to command line, type + + > c + /conf> m + +# <a name="2_Disk_Image"> 2. Disk Image </a> + +Everything went fine, and Hurd/L4 should have shown you a nice boot on our floppy image. Our next step will be to make banner run and show us its nice ASCII Art on this brand new OS. + +However, there is one problem : banner linked with the libc weights about 6MB, and we only have a 1.44MB floppy. We will then begin with making an image of a whole hard disk instead of a simple floppy. + +We still will work with qemu, of course, but we'll also use Bochs to install Grub on the image (I have not yet tried with qemu). + +To begin with, some mathematics. We'll make a 30MB image but you can adapt this value to your need. A disk is made of heads, cylinders and sectors (we won't go in detail about what these really mean). A sector has a constant size of 512 bytes and there are at most 255 heads and 63 sectors. The total size of a disk is C \* H \* S \* 512. We'll use the maximum capacity for S and 16 sectors and that will give us how much cylinders we need : C = E(30,000,000 / (16 \* 63 \* 512)) = 58. The exact size of our image will then be : 58 \* 16 \* 63 \* 512 = 29,933,568 bytes and we will have 58 \* 16 \* 63 = 58464 pieces of 512 bytes. + +Let's create it : we use the magic command `dd` on the special device which contain an infinity of 0. + + $ dd if=/dev/zero of=hurd_l4.img bs=512 count=58464 + 58464+0 records in + 58464+0 records out + +We will mount it in loopback : + + $ losetup /dev/loop0 hurd_l4.img + +We need now to have it recognized as a hard disk : + + $ fdisk -u -C58 -S63 -H16 /dev/loop0 + Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel + Building a new DOS disklabel. Changes will remain in memory only, + until you decide to write them. After that, of course, the previous + content won't be recoverable. + + Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) + + Command (m for help): + +We should create a new primary partition (press: `'n'`, `'p'`, `'1'`, default, default) and toggle it bootable (`'a'`, `'1'`). Now, if you press `'p'`, you should see something like : + + Command (m for help): p + + Disk /dev/loop0: 29 MB, 29933568 bytes + 16 heads, 63 sectors/track, 58 cylinders, total 58464 sectors + Units = sectors of 1 * 512 = 512 bytes + + Device Boot Start End Blocks Id System + /dev/loop0p1 * 63 58463 29200+ 83 Linux + +If everything is fine (especially check the `Start` and `End` fields), you can press `'w'` to write the table on the disk: + + Command (m for help): w + The partition table has been altered! + + Calling ioctl() to re-read partition table. + + WARNING: Re-reading the partition table failed with error 22: Invalid argument. + The kernel still uses the old table. + The new table will be used at the next reboot. + Syncing disks. + +You will have noticed that the partition only starts at the 63rd sector. The beginning of the disk contains the MBR which is used for booting. We must then remount the disk making sure that this part is skipped before formating it. We know that a sector uses 512 bytes so we should begin at 63 \* 512 = 32256 : + + $ losetup -d /dev/loop0 + $ losetup -o32256 /dev/loop0 hurd_l4.img + +Now comes time to format it into a decent filesystem : + + $ mke2fs /dev/loop0 + mke2fs 1.35 (28-Feb-2004) + Filesystem label= + OS type: Linux + Block size=1024 (log=0) + Fragment size=1024 (log=0) + 7328 inodes, 29200 blocks + 1460 blocks (5.00%) reserved for the super user + First data block=1 + 4 block groups + 8192 blocks per group, 8192 fragments per group + 1832 inodes per group + Superblock backups stored on blocks: + 8193, 24577 + + Writing inode tables: done + Writing superblocks and filesystem accounting information: done + + This filesystem will be automatically checked every 22 mounts or + 180 days, whichever comes first. Use tune2fs -c or -i to override. + +We should now be able to mount it the right way : + + $ mkdir mnt + $ losetup -d /dev/loop0 + $ mount -o loop,offset=32256 hurd_l4.img mnt/ + +Here comes grub time (I assume you have the grub files in `/boot/grub` and the `menu.lst` we've obtained in the previous section is in `~/`) : + + $ mkdir -p mnt/boot/grub + $ cp /boot/grub/stage1 /boot/grub/stage2 /boot/grub/e2fs_stage1_5 mnt/boot/grub/ + $ cp ~/menu.lst mnt/boot/grub + +We will make a grub bootimage and boot it with bochs : + + $ cat stage1 stage2 > grubboot.img + +Copy the following into `.bochsrc` (replace the parts in caps by the right info) : + + config_interface: textconfig + display_library: x + romimage: file=/usr/share/bochs/BIOS-bochs-latest, address=0xf0000 + megs: 32 + vgaromimage: /usr/share/bochs/VGABIOS-elpin-2.40 + floppya: 1_44=PATH_TO_YOUR_GRUBBOOT_IMAGE, status=inserted + ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14 + ata1: enabled=0, ioaddr1=0x170, ioaddr2=0x370, irq=15 + ata0-master: type=disk, path="PATH_TO_YOUR_DISK_IMAGE", cylinders=NUMBER_OF_CYLINDERS, heads=16, spt=63 + newharddrivesupport: enabled=1 + boot: a + + log: /dev/stdout + panic: action=ask + error: action=report + info: action=report + debug: action=ignore + debugger_log: - + com1: enabled=1, dev=/dev/ttyS0 + vga_update_interval: 300000 + keyboard_serial_delay: 250 + keyboard_paste_delay: 100000 + floppy_command_delay: 500 + ips: 1000000 + mouse: enabled=0 + private_colormap: enabled=0 + fullscreen: enabled=0 + screenmode: name="sample" + keyboard_mapping: enabled=0, map=/usr/share/bochs/keymaps/x11-pc-fr.map + i440fxsupport: enabled=0 + +And start Bochs with this configuration : + + $ bochs -qf .bochsrc + +When asked, choose `5. begin simulation`. It is possible that you enter first into a debugger, answer `'c'` to make it continue. You should see a grub commandline. Tell it to install grub on the disk : + + grub> root (hd0,0) + Filesystem type is ext2fs, partition type 0x83 + + grub> setup (hd0) + Checking if "/boot/grub/stage1" exists... yes + Checking if "/boot/grub/stage2" exists... yes + Checking if "/boot/grub/e2fs_stage1_5" exists... yes + Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 15 sectors are embedded. succeeded + Running "install /boot/grub/stage1 (hd0) (hd0)1+15 p (hd0,0)/boot/grub/stage2/boot/grub/menu.lst"... succeeded. + Done. + +Quit by pressing `^C q` in the shell from which you launched bochs. Our image is now ready. Copy all the releving files in `mnt/boot` like for the floppy and then umount it and launch qemu : + + $ cp /l4/boot/* mnt/boot/ + $ umount mnt + $ qemu -serial stdio -dummy-net -hda hurd_l4.img -boot c + +# <a name="3_Running_Banner"> 3. Running Banner </a> + +Still under construction but you should have no problems following `hurd-l4/libc/README` now that the hdd image works. + +---- + +-- [[Main/OgnyanKulev]] - 05 Feb 2005 + +I didn't bother to licence it as it is so small, but consider it is under some sort of creative commons that allows redistribution and modification. <br /> -- Alexandre Buisse < <nattfodd@gmailNOSPAM.com> > + +-- [[Main/JoachimNilsson]] - 05 Feb 2005 + +Comments from Marcus Brinkmann: + +> Thanks a lot for that. Some comments: +> +> $ ../configure --with-s0-linkbase=0x40000 --prefix=/l4 +> +> I'd recommend to explain how to use `--without-com0` here (or whatever it is called, don't remember) to choose VGA output, or how to configure the serial port. If you use vga, no `-o` option to laden and wortel should be used so you get all output on vga (but of course you can also mix it, whatever you want). +> +> Serial 1 is currently going to be used for remote debugging of userland apps. +> +> QEMU supports up to four serial ports, I use: `-serial stdio` and `-serial pty` and then I get the debugging output and kernel debugger in the terminal I started qemu in, and can use the pty for remote debugging with gdb (the latter doesn't work yet). +> +> Next: +> +> You should modify the first three lines to : +> ARCH=ia32 +> CPU=i586 +> PLATFORM=pc99 +> +> I never did that. I did change the menu item Processor Type to Pentium1 though. Maybe it has the same effect (and then your document would be a bit redundant here). +> +> Somebody should at some point document all those menu options, some are quite useful for debugging! +> +> Thanks, Marcus + +-- [[Main/OgnyanKulev]] - 05 Feb 2005 + +I've been doing this sort of thing (See also `info grub` for making bootable eltorito grub cd ISOs): + + $ cd /usr/src/controlled/qemu-images + $ ls -R l4 + ls -R l4 + l4: + boot deva ia32-kernel laden physmem sigma0 task wortel + + l4/boot: + grub + + l4/boot/grub: + menu.lst stage2_eltorito + + $ cd /usr/src/controlled/qemu-images # dir above "l4" dir. + $ mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot \ + -boot-load-size 4 -boot-info-table \ + -o /usr/src/controlled/qemu-images/l4.iso l4 + + $ qemu -boot d -cdrom /usr/src/controlled/qemu-images/l4.iso + +-- [[Main/DerekDavies]] - 07 Feb 2005 + +You don't need a compiler targeting the Hurd. The above works with a compiler targeting Linux which are quite a bit easier to find. By adding "--target=i686-unknown-linux-gnu" to my configure line, I was able to cross compile hurd-l4 from Cygwin. + +-- [[Main/MichaelAdams]] - 22 Feb 2005 + +A bootable CD iso image is now available at <http://gnuppix.org> + +-- [[Main/ChristopheDevine]] - 03 Mar 2005 + +Included the anonymous password in the CVSROOT for L4. + +-- [[Main/NowhereMan]] - 19 Mar 2005 + +I was able to use qemu instead of bochs to install grub on the new disk image. Just use: + + qemu -dummy-net -serial stdio -fda grubboot.img -hda hurd_l4.img -boot a + +and then the commands to type in the grub shell are the same. + +-- [[Main/MatteoSettenvini]] - 05 May 2005 diff --git a/hurd/translator/random.mdwn b/hurd/translator/random.mdwn new file mode 100644 index 00000000..294531d1 --- /dev/null +++ b/hurd/translator/random.mdwn @@ -0,0 +1,65 @@ +[Savannah task #5130: random translator](http://savannah.gnu.org/task/?5130) + +See the attached [[mbox.bz2]] containing all the emails concerning this topic +which I was able to gather from public archives. (!) This is not up-to-date +anymore, as [[MichaelCasadevall]] is currently working on this. + +# Description + +Sources of entropy are for example disk access latencies or keystroke patterns +or behavior on networks. This suggests that for implementing a random +translator a kernel part is needed as well, to gather that entropy. That +kernel part would then export the gathered entropy via a kernel device, named +perhaps `entropy`. + +# Setup Pseudo Random Devices + +Stuck getting SSH to work? You need a pseudo random generator (PRG). + +There are several solutions to the lack of `/dev/random` and `/dev/urandom`, +but they are not yet in the default installation. + +* Marcus' work can be downloaded at + [random.tar.gz](ftp://alpha.gnu.org/gnu/hurd/contrib/marcus/random.tar.gz). + (Identical to <http://kilobug.free.fr/hurd/random-64.tar.gz>?) + * [A patch](http://mail.gnu.org/pipermail/bug-hurd/2002-August/010248.html) + that was probably already incorporated from August 14, 2002. + * Clemmitt Sigler [reported + success](http://lists.gnu.org/archive/html/help-hurd/2002-10/msg00076.html) + October 11, 2002 and Marcus [described + some](http://lists.gnu.org/archive/html/help-hurd/2002-10/msg00081.html) of + the internals. + +* [Entropy Gathering Daemon](http://egd.sourceforge.net/). + * [request for packaging](http://bugs.debian.org/145498). + +* [OSKit Entropy + Patch](http://lists.gnu.org/archive/html/bug-hurd/2003-01/msg00000.html) from + Derek Davies - Jan 2003. + * See also [this page](http://www.ddavies.net/oskit-entropy/). + * Note that this patch can (and should) be used with this [OSKit NIC + patch](ftp://flux.cs.utah.edu/flux/oskit/mail/html/oskit-users/msg01570.html). + +* [Sune Kirkeby's incomplete port of the Linux /dev/\{,u\}random device + driver](http://ibofobi.dk/stuff/hurd-entropy/) + * [The files](http://download.ibofobi.dk/hurd-entropy/), including a [patch + for GNU + Mach](http://download.ibofobi.dk/hurd-entropy/gnumach-entropy.diff.bz2). + +--- + +# Setup Tips + +Here are some tips on how to actually setup the two random devices using +Kilobugs' [random-64 server](http://kilobug.free.fr/hurd/random-64.tar.gz). +His tarball is a complete Hurd server including a pre-built binary - so you +don't need GCC or magic fingers for this! :) + +After untaring the package you copy the random binary to the `/hurd` +directory. Then you setup the translators for random and urandom. + + # settrans -c /dev/random /hurd/random \ + --seed-file /var/run/random-seed --secure + # settrans -c /dev/urandom /hurd/random \ + --seed-file /var/run/urandom-seed --fast + # chmod 0644 /dev/random /dev/urandom diff --git a/hurd/translator/random/mbox.bz2 b/hurd/translator/random/mbox.bz2 Binary files differnew file mode 100644 index 00000000..a9a4d4a6 --- /dev/null +++ b/hurd/translator/random/mbox.bz2 |