summaryrefslogtreecommitdiff
path: root/Distrib/HurdOnQEMU.mdwn
blob: 72ac93bef410da3ef9efd77fb6dbc1c82a98513a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
## <a name="Hurd_on_QEMU"> </a> Hurd on QEMU

I will assume you have already installed [QEMU](http://fabrice.bellard.free.fr/qemu/).

You may need the [floppy.img](http://24.109.97.177:57777/floppy.img) that I use. It is from the debian grub boot disk package.

The version of [lomount](http://24.109.97.177:57777/lomount.tar.gz) that I use.

First off use `qemu-img` to create a disk image. I set mine to 2 gigabytes.

    # qemu-img create hd0.img 2G

Now you will need a cdrom image or an install CD. I will use debian/hurd K8 in this example. I use a floppy image with grub on it to boot the system, after im done installing. The first time you run it you'll want to use `-boot d` to boot off the cdrom.

    # qemu -hda hd0.img -cdrom debian-K8-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. Instead of rebooting, just stop QEMU (it'll keep booting off the cdrom).

**Important:** Debian K8's gnumach will not boot in QEMU unless you use its `-isa` command line option.

Now run your image with floppy booting and finish the install (`./native-install` .. etc)

    # qemu -isa -hda hd0.img -cdrom debian-K8-hurd-i386-CD1.iso -fda floppy.img -boot a

So far I haven't been able to get networking going, it seems as if gnumach is not finding the ethernet device, although I haven't really looked into it that far.

### <a name="Mounting_disk_image"> Mounting disk image </a>

If you want to mount your disk image, you'll either have to use mount or a program called lomount to do this. If you are going to use mount, you will need to know the correct offset.

    # mount -o loop,offset=OFFSET hd0.img /mnt/diskimage

I personally use lomount cause its easier.

    # lomount -diskimage hd0.img -partition 1 /mnt/diskimage

-- [[Main/AndrewResch]] - 23 Feb 2005

Readers may be interested in [[Hurd/QemuImageForL4]] too.

-- [[Main/OgnyanKulev]] - 23 Feb 2005