View previous topic :: View next topic |
Author |
Message |
benny1967 Apprentice
Joined: 25 Apr 2004 Posts: 224
|
Posted: Mon Dec 03, 2007 9:45 pm Post subject: |
|
|
I would love to see a gentoo/HURD system - as I would love to see a HURD-kernel thats up-to-date and actively developed
Pity I dont have any of the skills necessary to help such a project.
dh003i wrote: | Why not just develop the Linux kernel until the architecture problems make a true microkernel more suitable for development, and then start working on taking all of the good code in Linux and modularizing it?
It doesn't even seem obvious to me that the Linux kernel is inherently architecturally flawed. After 14 or so years, development is still going along fine. When are we going to run into these problems? |
Choice is the magical word here. Its good to have a choice of graphical toolkits, window-managers, editors, ... it would also be nice to have a set of kernels to choose from. Depending on the Linux kernel alone is not healthy for the ecosystem in the long run. |
|
Back to top |
|
|
brullonulla Tux's lil' helper
Joined: 13 Jan 2005 Posts: 117 Location: bologna
|
Posted: Mon Dec 03, 2007 10:49 pm Post subject: |
|
|
Problem is that Hurd is still based on the Mach microkernel, that has terrible hardware support.
It's years that the devels remaining are trying to port it on newer microkernels (L4 and coyotos), but so far there has not been so much progress.
The real problem is: they are very few, doing a damn hard work almost no one is sadly interested in. _________________ Google is the index to the unwritten Linux manual. |
|
Back to top |
|
|
ArneBab Guru
Joined: 24 Jan 2006 Posts: 429 Location: Graben-Neudorf, Germany
|
|
Back to top |
|
|
steveL Watchman
Joined: 13 Sep 2006 Posts: 5153 Location: The Peanut Gallery
|
Posted: Mon Nov 03, 2008 8:02 pm Post subject: |
|
|
Sounds interesting ArneBab; I couldn't get anything from those links though. |
|
Back to top |
|
|
Kollin Veteran
Joined: 25 Feb 2006 Posts: 1139 Location: Sofia/Bulgaria
|
Posted: Mon Nov 03, 2008 8:11 pm Post subject: |
|
|
it would be very interesting to try gentoo with micro-kernel _________________ "Dear Enemy: may the Lord hate you and all your kind, may you be turned orange in hue, and may your head fall off at an awkward moment."
"Linux is like a wigwam - no windows, no gates, apache inside..." |
|
Back to top |
|
|
ArneBab Guru
Joined: 24 Jan 2006 Posts: 429 Location: Graben-Neudorf, Germany
|
Posted: Tue Nov 04, 2008 7:12 am Post subject: |
|
|
steveL wrote: | Sounds interesting ArneBab; I couldn't get anything from those links though. |
The one hosting our wiki on a Hurd box just switched providers and is struggling with blocked ports right now ...
Here's the data from the entries (we're working on the wiki via git, so I have a full local clone):
Code_swarms:
Running via qemu (long):
Quote: | This page discusses things for [[Unix]] systems, there is a separate page for
[[Microsoft_Windows]] systems.
# Readily Available Images
[Official Debian GNU/Hurd QEMU
image](http://ftp.debian-ports.org/debian-cd/K16/debian-hurd-k16-qemu.img.tar.gz)
(!) Note that the following are unofficial images: they have been prepared by
volunteers and may not have been tested extensively.
* [Disk image](http://draketo.de/dateien/hurd/bab-hurd-qemu-2008-10-29.img.tar.bz2)
with a short intro on translators. Just start it with 'qemu *disk_image.img*'.
It should work without any of the configuration below. -[[community/weblogs/ArneBab]]
# What is Needed to create a QEMU image
1. First thing is to install [[/QEMU]].
2. A [grub](http://www.gnu.org/software/grub/) boot disk for the floppy disk image needed for booting. The [0\.97 version](ftp://alpha.gnu.org/gnu/grub/grub-0.97-i386-pc.ext2fs) works fine. I downloaded it an renamed to `floppy.img`. Alternatively, the Debian grub-disk package (up till version 0.97-2 is fine as well.
3. You will need a [Debian/Hurd installation CD](http://www.debian.org/ports/hurd/hurd-cd). K16 works fine.
# Installing Debian/Hurd with QEMU
First off you will need to create a disk image using `qemu-img`. I have set mine to 2 gigabytes, although you should be able to get away with less(Currently, the maximum disk image size one can create with QEMU is 4.5G).
$ qemu-img create hd0.img 2G
Next you will want to start up QEMU and begin the installation process. The first time you run it you will want to use the `-boot d` option to boot off the cdrom.
$ qemu -hda hd0.img -cdrom debian-K16-hurd-i386-CD1.iso -fda floppy.img -boot d
Now at his point do the regular install using `hd0` as your harddrive. Partition it and install the base system. Once you have finished installing the base system select the reboot option as this will ensure the disk is properly un-mounted. When the Debian CD menu comes up again simply close QEMU.
Now run your image with floppy booting (`-boot a`) and finish the install (`./native-install` .. etc).
**Important:** Older versions on gnumach needed that the `-M isapc` was passed to qemu. This is not needed anymore.
Also see another text about how to [[gnu/create_an_image]] for the
[[GNU_system|gnu]].
# Transferring Files
## Mounting Disk Image on Host
You may wish to mount your disk image on your host system to transfer files. To do this you will first need to find the offset of the partition you wish to mount.
# fdisk -ul hd0.img
...
128 heads, 63 sectors/track, 0 cylinders, total 0 sectors
Units = sectors of 1 * 512 = 512 bytes
Device Boot Start End Blocks Id System
hd0.img1 * 63 3515903 1757920+ 83 Linux
hd0.img2 3515904 4193279 338688 82 Linux swap / Solaris
Now take the number of sectors for the beginning of the partition and multiply it by the sector size. My partition starts at sector 63 and I have a sector size of 512 therefor my offset is 32256.
# mount -o loop,offset=32256 hd0.img /mnt/diskimage
## Having QEMU create *virtual FAT disk images*
[Manual](http://fabrice.bellard.free.fr/qemu/qemu-doc.html#SEC24).
QEMU has a facility to create FAT file systems on-the-fly:
qemu [...] -hdc fat:[somewhere]
The Hurd [[`fatfs`_translator|translator/fatfs]] currently is read-only, but
for testing executables (etc.) that is enough. And it is much easier than
loop-mounting the file systems images. (Also you don't need `root' rights.)
# Networking in QEMU
Some further notes about [[networking]] and home hints about
[[networking/sharing_files]].
## Internet Access
If you just want to access the internet from within QEMU, you can setup pfinet for QEMU's user-networking:
# settrans -afgp /servers/socket/2 /hurd/pfinet -i eth0 -a 10.0.2.15 -g 10.0.2.2 -m 255.255.255.0
# echo "nameserver 10.0.2.3" > /etc/resolv.conf
(See also <http://fabrice.bellard.free.fr/qemu/qemu-doc.html#SEC30>.)
Outgoing internet connections should just work then.
If you want to connect from the host system to the Hurd system running in QEMU, you need to setup something more advanced, like bridged networking.
## Bridged Networking
### What is Needed
1. Your Linux kernel will need 802.1d Ethernet Bridging support and TUN/TAP device driver support.
2. You will need to install [bridge-utils](http://bridge.sourceforge.net).
### Setting Up the Host Bridge
You need to setup a bridge on the host first. This assumes `eth0` is down. I have modified my hosts network startup scripts to automatically setup a bridge, you may want to do this also.
# brctl addbr br0
# ifconfig eth0 0.0.0.0 promisc up
# brctl addif br0 eth0
At this point you will need to setup `br0` as you would normally `eth0` (`dhcpcd br0` for example).
### The qemu-ifup Script
This script gets called when QEMU starts and will attach the tun device to the bridge. QEMU will look for this file at `/etc/qemu-ifup` and that is where I keep mine.
#!/bin/sh
sudo ifconfig $1 0.0.0.0 promisc up
sudo brctl addif br0 $1
### Setting up the Network in the Hurd
Now it is time to start-up your QEMU Hurd system and get networking going in there.
**Important:** Remember you may need to use the `-M isapc` or `-isa` flag if using an older version of the gnumach package.
$ qemu -hda hd0.img -cdrom debian-K9-hurd-i386-CD1.iso -fda floppy.img -boot a -net nic -net tap
Once you have logged in as `root` run the `pfinet` translator with values that apply to your network. Think of your QEMU client as another computer in your network.
# settrans -fgap /servers/socket/2 /hurd/pfinet -i eth0 -a xxx.xxx.xxx.xxx -g xxx.xxx.xxx.xxx -m xxx.xxx.xxx.xxx
That should do it! Do not forget to edit/update `/etc/resolv.conf` to get DNS working.
# Related Links
These are links that users may find helpful.
Debian [[debian/after_install]] -- good source of information pertaining to your
system after installation.
[[Image_for_L4]] -- a QEMU image for the Hurd/L4 project.
<http://eyeside.net/hurd/Hurd-on-QEMU.html>
# TODO
[[IRC]], #hurd, 2007-07-04.
<azeem-uni> so, is there a way to use a Debian GNU/Hurd partition (/dev/hda6) with qemu directly?
<tschwinge> Don't dare to do that, please.
<tschwinge> It will lead to inconsistencies.
<tschwinge> Because the Linux kernel thinks that it has complete control over the disk, or something.
<tschwinge> In theory you could run something like ``-hda /dev/hda'', having GRUB installed on there to offer you to boot your Hurd system from hda6 and that will even work, but then don't get the idea to stop qemu, mount that partition on your Linux system and restart qemu. That's where I got lots of inconsistencies then, afterwards.
<azeem-uni> it's probably the same problem as having that partition mounted, suspending to disk, booting into it in the Hurd, and resume Linux
<neal> right
<tschwinge> That's a different problem.
<tschwinge> Then the partitoon is still mounted.
<neal> no, I think it is basically the same problem
<tschwinge> The file system stuff is cached in the kernel.
<neal> you have data that has not been written to disk yet
<tschwinge> Right.
<neal> and neither is prepared for the resource to be shared
<tschwinge> In the azeem-uni scenarion the data is on the file system layer and in my scenarion it's some disk block caching inside the Linux kernel, I guess.
<azeem-uni> anyway, do you guys think if I use -hda /dev/hda and tell Grub to boot off /dev/hda6, that the rest of hda should be fine, right?
<azeem-uni> maybe adding -snapshot makes it totally safe
<neal> azeem: Should be fine.
<tschwinge> Yes.
The problem is actually that the linux block cache doesn't make any consistency between /dev/hda and /dev/hda6, so if you give /dev/hda to qemu, qemu writings won't be consistent with mounting /dev/hda6 in linux. You can give /dev/hda6 directly to qemu and it will be fine. |
_________________ Being unpolitical means being political without realizing it. - Arne Babenhauserheide ( http://draketo.de )
pkgcore: So fast that it feels unreal - by doing only what is needed. |
|
Back to top |
|
|
ArneBab Guru
Joined: 24 Jan 2006 Posts: 429 Location: Graben-Neudorf, Germany
|
Posted: Tue Nov 04, 2008 7:38 am Post subject: Quickly testing the Hurd in qemu |
|
|
If you just want to take a look at the Hurd, you can simply download the official Debian GNU/Hurd qemu image:
$ wget http://ftp.debian-ports.org/debian-cd/K16/debian-hurd-k16-qemu.img.tar.gz
$ tar xzf debian-hurd-k16-qemu.img.tar.gz
$ qemu debian-hurd-k16-qemu.img
To get a glimpse of its capabilities, you can try the following "Hello World!" translator:
Code: | $ touch hello
$ setrans hello /hurd/hello
$ cat hello
"Hello World!"
$ settrans -g hello
$ cat hello
|
_________________ Being unpolitical means being political without realizing it. - Arne Babenhauserheide ( http://draketo.de )
pkgcore: So fast that it feels unreal - by doing only what is needed. |
|
Back to top |
|
|
ArneBab Guru
Joined: 24 Jan 2006 Posts: 429 Location: Graben-Neudorf, Germany
|
Posted: Tue Nov 04, 2008 8:04 am Post subject: |
|
|
Kollin wrote: | it would be very interesting to try gentoo with micro-kernel |
There's still an old try at a Gentoo GNU/Hurd online - maybe you can use that as base.
- http://www.mundurat.net/ggh/ _________________ Being unpolitical means being political without realizing it. - Arne Babenhauserheide ( http://draketo.de )
pkgcore: So fast that it feels unreal - by doing only what is needed. |
|
Back to top |
|
|
ArneBab Guru
Joined: 24 Jan 2006 Posts: 429 Location: Graben-Neudorf, Germany
|
|
Back to top |
|
|
steveL Watchman
Joined: 13 Sep 2006 Posts: 5153 Location: The Peanut Gallery
|
Posted: Thu Nov 06, 2008 12:43 am Post subject: |
|
|
Lovely Arne, nice one :-)
Will look into scripting it when I get a bit of time (if no-one else has ofc;) _________________
creaker wrote: | systemd. It is a really ass pain |
update - "a most excellent portage wrapper"
#friendly-coders -- We're still here for you™ ;) |
|
Back to top |
|
|
nova.alpha n00b
Joined: 17 May 2008 Posts: 4
|
Posted: Tue Nov 18, 2008 2:16 pm Post subject: |
|
|
Would love to see Gentoo/HURD up and running. Love the whole HURD philosophy. Not sure if I have any skills necessary to help with this project |
|
Back to top |
|
|
ArneBab Guru
Joined: 24 Jan 2006 Posts: 429 Location: Graben-Neudorf, Germany
|
Posted: Tue Nov 18, 2008 6:47 pm Post subject: |
|
|
nova.alpha wrote: | Would love to see Gentoo/HURD up and running. Love the whole HURD philosophy. Not sure if I have any skills necessary to help with this project |
You can definitely help - even if it's only documenting what you can do with Hurd translators, because the Hurd has a severe documentation shortage, and by helping to improve the documentation of the Hurd in general, you can help a Gentoo version.
And as soon as someone began a new Gentoo GNU/Hurd, you can test it and help getting Gentoo GNU/Hurd applications stable.
Naturally the second one depends on someone else doing a Gentoo GNU/Hurd in the first place, but you can do the first anytime. _________________ Being unpolitical means being political without realizing it. - Arne Babenhauserheide ( http://draketo.de )
pkgcore: So fast that it feels unreal - by doing only what is needed. |
|
Back to top |
|
|
ArneBab Guru
Joined: 24 Jan 2006 Posts: 429 Location: Graben-Neudorf, Germany
|
|
Back to top |
|
|
ArneBab Guru
Joined: 24 Jan 2006 Posts: 429 Location: Graben-Neudorf, Germany
|
Posted: Wed May 20, 2009 6:38 pm Post subject: |
|
|
And here's an info about the state of the 2006 try at the GGH:
Mikel Olasagasti wrote: | Hi!
> Hi,
>
> Did you work a bit more on the Gentoo GNU/Hurd?
I tried to resume my work 3-4 months ago but I found some problems with
portage and python functions not implemented on Hurd so I stopped. I think
that back in 2006 with portage 2.0.54 those functiones weren't necessary.
>
> And do you have some information which might help others advance what you
> began?
I just have all the ebuilds and binary packages I merged online on
http://www.mundurat.net/ggh/portage
To continue my work just take a Debian/Hurd and install portage by hand.
Once there take the profile and start bootstraping portage and all the
ebuild it needs (patch, python, bzip2...).
The major problems are:
- combine the perfect gcc/binutils/glibc/gnumach/hurd and to be able to boot
- lack of development on gnumach/hurd and current 'degraded' status.
I don't think I can help much right now, but if you have any other
question just write me.
MiKeL
|
_________________ Being unpolitical means being political without realizing it. - Arne Babenhauserheide ( http://draketo.de )
pkgcore: So fast that it feels unreal - by doing only what is needed. |
|
Back to top |
|
|
|