summaryrefslogtreecommitdiff
path: root/hurd/running/qemu.mdwn
diff options
context:
space:
mode:
Diffstat (limited to 'hurd/running/qemu.mdwn')
-rw-r--r--hurd/running/qemu.mdwn85
1 files changed, 67 insertions, 18 deletions
diff --git a/hurd/running/qemu.mdwn b/hurd/running/qemu.mdwn
index 6df06ace..c56292c8 100644
--- a/hurd/running/qemu.mdwn
+++ b/hurd/running/qemu.mdwn
@@ -24,6 +24,56 @@ You can use the following images to give the Hurd a try.
[[!inline pages=hurd/running/debian/qemu_image raw=yes feeds=no]]
+#### Trying out rumpdisk
+
+[[Rump kernels|hurd/rump]] provide new modern drivers for the Hurd.
+We refer to rumpdisk as a rump kernel that provides drivers for modern
+hard drives, SSDs, etc. The Rump kernels' integration into the Hurd
+are still somewhat experimental, but they seem to work fairly well on
+bleeding edge Debian.
+
+Once you have your latest qemu Debian GNU/Hurd image running, then you
+can try the rumpdisk (be sure to pass "-m 2GB" or more). First,
+add these sources to your /etc/apt/sources.list
+
+ deb http://deb.debian.org/debian-ports unstable main
+ deb-src http://deb.debian.org/debian unstable main
+ deb http://deb.debian.org/debian-ports unreleased main
+
+Then, upgrade to the bleeding edge Debian GNU/Hurd:
+
+ # apt update
+ # apt upgrade --without-new-pkgs
+ # apt dist-upgrade
+
+Now test to see if the rump kernel works before you make the change
+permanent. Manually tweak your /boot/grub/grub.cfg like so:
+
+ # multiboot /boot/gnumach-1.8-486.gz root=part:2:device:hd0 console=com0
+ multiboot /boot/gnumach-1.8-486.gz root=part:2:device:wd0 console=com0 noide
+
+and your /etc/fstab
+
+ #/dev/hd0s2 / ext2 defaults 0 1
+ /dev/wd0s2 / ext2 defaults 0 1
+ #/dev/hd0s1 none swap sw 0 0
+ /dev/wd0s1 none swap sw 0 0
+ #/dev/hd2 /media/cdrom0 iso9660 noauto 0 0
+ /dev/wd2 /media/cdrom0 iso9660 noauto 0 0
+
+Now you can poweroff your machine, reboot, and start using the
+rumpdisk! You can make these changes permanent by tweaking
+/etc/default/grub and telling it to use rumpdisk:
+
+ GRUB_CMDLINE_GNUMACH="noide"
+
+Then update your grub:
+
+ # update-grub
+
+Check that "noide" does appear in your /boot/grub/grub.cfg.
+
+
## Arch Hurd Live CD
[[!inline pages=hurd/running/live_cd raw=yes feeds=no]]
@@ -50,7 +100,7 @@ volunteers and may not have been tested extensively.
## Debian Installer
-Instructions for creating a qemu image from the install CDs from debian installer can be found in the README alongside the d-i Hurd images: <http://people.debian.org/~sthibault/hurd-i386/installer/cdimage/>
+Instructions for creating a qemu image from the install CDs from debian installer can be found in the README alongside the d-i Hurd images: <https://cdimage.debian.org/cdimage/ports/latest/hurd-i386/>
---
# KVM acceleration
@@ -60,7 +110,7 @@ Check if your CPU supports kvm:
$ egrep '^flags.*(vmx|svm)' /proc/cpuinfo
#### If you don't have hardware support (slow):
- $ apt-get install qemu
+ $ apt install qemu
Do not enable kernel-kqemu, as that assumes some particular behavior from the guest kernel, which we are reluctant to artificially add to gnumach.
@@ -68,7 +118,7 @@ If QEMU with KVM is not available, [[Virtualbox]] reportedly has better
performance.
#### If you have hardware support (recommended):
- $ apt-get install qemu-kvm
+ $ apt install qemu-kvm
$ modprobe kvm
Intel VTx/VTd: Enable Intel kvm in the BIOS
@@ -119,7 +169,7 @@ First off you will need to create a disk image using `qemu-img`. I have set mine
Next you will want to start up QEMU and begin the installation process.
- $ qemu -m 1G -drive cache=writeback,file=hd0.img -cdrom debian-7.0-hurd-i386-NETINST-1.iso -net nic,model=rtl8139 -net user
+ $ qemu -m 1G -drive cache=writeback,file=hd0.img -cdrom debian-7.0-hurd-i386-NETINST-1.iso -net nic,model=e1000 -net user
Now at his point do the regular install using `hd0` as your harddrive. Partition it and install the base system.
@@ -167,7 +217,7 @@ Once you have finished installing the base system (might take some time) the sys
Starting qemu/qemu-kvm:
- $ kvm -m 1G -net nic -net user,hostfwd=tcp::5555-:22 -drive cache=writeback,file=hd0.img -vga vmware
+ $ kvm -m 1G -net nic,model=e1000 -net user,hostfwd=tcp::5555-:22 -drive cache=writeback,file=hd0.img -vga vmware
vmsvga_value_write: guest runs Linux.
Note: See below on port forwarding in the networking section.
@@ -252,13 +302,13 @@ If you are on [[Debian GNU/Hurd|debian]], you can even use [[debian/DHCP]].
To get ssh working:
- # apt-get install random-egd openssh-server (Similarly for telnet if preferred)
+ # apt install openssh-server (Similarly for telnet if preferred)
(See also <http://www.nongnu.org/qemu/qemu-doc.html#SEC32>.)
Outgoing internet connections should just work then.
Testing it can be difficult with a minimal installation,
-but `apt-get update` should work after you have filled out
+but `apt update` should work after you have filled out
`/etc/apt/sources.list`.
After that you should be able to install other network packages,
but note that `ping` doesn't work with QEMU's user-networking stack.
@@ -288,7 +338,7 @@ This is the recommended way to work with a Command Line Interface (CLI) since al
a) with ssh (assuming you have installed openssh-server)
- $ kvm -m 1G -net nic -net user,hostfwd=tcp::5555-:22 -drive cache=writeback,file=hd0.img &
+ $ kvm -m 1G -net nic,model=e1000 -net user,hostfwd=tcp::5555-:22 -drive cache=writeback,file=hd0.img &
Logging in to the running Hurd:
@@ -305,7 +355,7 @@ Copying files:
b) with telnet (assuming you have installed a telnet server, like telnetd)
- $ kvm -m 1G -net nic -net user,hostfwd=tcp::5556-:23 -drive cache=writeback,file=hurd-install.qemu &
+ $ kvm -m 1G -net nic,model=e1000 -net user,hostfwd=tcp::5556-:23 -drive cache=writeback,file=hurd-install.qemu &
Logging in to the running Hurd:
@@ -346,7 +396,7 @@ Now it is time to start-up your QEMU Hurd system and get networking going in the
**Important:** Remember you may need to use the `-M isapc` or `-isa` flag if using an older version of the gnumach package.
- $ qemu -m 1G -drive cache=writeback,file=hd0.img -cdrom debian-K9-hurd-i386-CD1.iso -fda floppy.img -boot a -net nic -net tap
+ $ qemu -m 1G -drive cache=writeback,file=hd0.img -cdrom debian-K9-hurd-i386-CD1.iso -fda floppy.img -boot a -net nic,model=e1000 -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.
@@ -355,14 +405,16 @@ Once you have logged in as `root` run the `pfinet` translator with values that a
That should do it! Do not forget to edit/update `/etc/resolv.conf` to get DNS working.
---
-# Multiboot
+# Booting Hurd without grub, using qemu's multiboot support
See "Linux/Multiboot boot specific" section on QEMU manpage.
Get the multiboot modules. Either extract them from the disk image, or,
download:
- $ wget http://people.debian.org/~sthibault/hurd-i386/installer/cdimage/current/{gnumach.gz,ext2fs.static,ld.so.1}
+ $ wget https://cdimage.debian.org/cdimage/ports/latest/hurd-i386/gnumach.gz
+ $ wget https://cdimage.debian.org/cdimage/ports/latest/hurd-i386/ext2fs.static
+ $ wget https://cdimage.debian.org/cdimage/ports/latest/hurd-i386/exec.static
Generally, these files need to correspond to the ones in the disk image, so
don't forget to keep them up to date.
@@ -372,18 +424,15 @@ you'll get told: *qemu: linux kernel too old to load a ram disk*.
$ qemu [...] \
> --kernel gnumach \
+ > --append 'root=device:hd0s1' \
> --initrd \
- > 'ext2fs.static --multiboot-command-line=${kernel-command-line} --host-priv-port=${host-port} --device-master-port=${device-port} --exec-server-task=${exec-task} -T typed device:hd0s1 $(task-create) $(task-resume)',\
- > 'ld.so.1 /hurd/exec $(exec-task=task-create)'
+ > 'ext2fs.static --multiboot-command-line=${kernel-command-line} --host-priv-port=${host-port} --device-master-port=${device-port} --exec-server-task=${exec-task} -T typed ${root} $(task-create) $(task-resume)',\
+ > 'exec.static $(exec-task=task-create)'
Note that, contrary to [[GRUB]]'s configuration file, you don't specify
"`argv[0]`" here, and it's fortunate that neither ext2fs nor exec need a comma
on their command line...
-You can also use `--append [...]`, which will show up in `/proc/cmdline`.
-
-Command line above crashes with old qemu versions, for instance qemu 1.1.2 on Debian Wheezy, fixed by upgrading to wheezy-backports currently qemu 1.7.0, see [[!debbug 741873]]
-
---
# Related Links