summaryrefslogtreecommitdiff
path: root/hurd/running/debian
diff options
context:
space:
mode:
Diffstat (limited to 'hurd/running/debian')
-rw-r--r--hurd/running/debian/CrossInstall.mdwn134
-rw-r--r--hurd/running/debian/qemu_image.mdwn2
2 files changed, 104 insertions, 32 deletions
diff --git a/hurd/running/debian/CrossInstall.mdwn b/hurd/running/debian/CrossInstall.mdwn
index 0f56a3e7..675d9992 100644
--- a/hurd/running/debian/CrossInstall.mdwn
+++ b/hurd/running/debian/CrossInstall.mdwn
@@ -1,31 +1,41 @@
-## <a name="Easy_install_with_CrossHurd"> Easy install with CrossHurd </a>
+Curious about the Hurd? Have a 1-5 GiB partition free? Let's install GNU/Hurd on it!
-Qurious about the Hurd? Have a 1-5 GiB partition free? Let's install GNU/Hurd on it!
+This page covers two ways to install a Debian GNU/Hurd system from a running
+Debian GNU/Linux in a dual boot type of setup, using either
+[crosshurd](#CrossHurd) or [mmdebstrap](#mmdebstrap).
-### <a name="Preparing_the_partition"> Preparing the partition </a>
+For the sake of the examples in this page we will consider `/dev/hda3` as
+the partition where you want to install your Hurd system as displayed from linux.
-We'll assume you have a partition ready, for the sake of argument we use an example here: /dev/hda3 is the Hurd partition (type: Linux) and /dev/hda4 is the Linux swap that we'll reuse.
+The examples here assume the installation of a `hurd-i386` system, but it is
+simple to modify for a `hurd-amd64` installation.
-First we create the Ext2 filesystem, notice the `hurd` option.
- # mke2fs -o hurd /dev/DEVICE
+## <a name="CrossHurd"> CrossHurd method </a>
-Next we create a useful mountpoint and mount the partition.
+First install the [crosshurd package](http://packages.debian.org/crosshurd).
- # mkdir /gnu
- # mount /dev/hda3 /gnu
+ # apt install crosshurd
-### <a name="Retrieving_CrossHurd"> Retrieving CrossHurd </a>
+If you have problems it might be because the crosshurd version in the Stable
+distribution is out of date, try the version in Unstable before reporting the issue.
-Unless you don't run Debian GNU/Linux download it from <http://packages.debian.org/crosshurd>, or simply apt the package from Testing or Unstable. Avoid using the version from Stable since it probably is outdated. In case of problems, make sure to try the Unstable version before reporting the issue.
+### <a name="Preparing_the_partition"> Preparing the partition </a>
+
+Create the Ext2 filesystem for the Hurd system, notice the `hurd` option.
+
+ # mke2fs -o hurd /dev/hda3
+
+Next create a useful mountpoint and mount the partition.
+
+ # mkdir /gnu
+ # mount /dev/hda3 /gnu
- # apt install crosshurd
### <a name="Cross_installing"> Cross installing </a>
The crosshurd package only operates in the given target directory, which is the first question asked when running the program.
- # cd /gnu
# crosshurd
Answer the questions you get: $ What is the target directory?: `/gnu` $ Target Debian system?: gnu $ Target CPU?: i386
@@ -34,34 +44,96 @@ Now the program starts retrieving all the necessary base packages.
### <a name="Preparing_to_reboot"> Preparing to reboot </a>
-When all packages have been extracted we must prepare [[GRUB]] for the Hurd when we reboot. Add the below entry to your `/boot/grub/menu.lst` file to boot the Hurd in single user mode (-s). Single user mode is needed only for the two reboots when running the Native Install.
+When all packages have been extracted we must prepare [[GRUB]] for the Hurd when we reboot.
+Add the below entry to `/etc/grub.d/40_custom` file in your linux installation.
+
+ menuentry "Debian GNU/Hurd" {
+ set root='hd0,msdos3'
+ echo 'Loading GNU Mach ...'
+ multiboot /boot/gnumach-1.8-486-up.gz root=part:3:device:wd0 noide
+ echo 'Loading the Hurd ...'
+ module /hurd/pci-arbiter.static pci-arbiter \
+ --host-priv-port='${host-port}' --device-master-port='${device-port}' \
+ --next-task='${acpi-task}' \
+ '$(pci-task=task-create)' '$(task-resume)'
+ module /hurd/acpi.static acpi \
+ --next-task='${disk-task}' \
+ '$(acpi-task=task-create)'
+ module /hurd/rumpdisk.static rumpdisk \
+ --next-task='${fs-task}' \
+ '$(disk-task=task-create)'
+ module /hurd/ext2fs.static ext2fs \
+ --multiboot-command-line='${kernel-command-line}' \
+ --exec-server-task='${exec-task}' -T typed '${root}' \
+ '$(fs-task=task-create)'
+ module /hurd/exec.static exec '$(exec-task=task-create)'
+ }
- title GNU (kernel GNUmach 1.5)
- root (hd0,2)
- kernel /boot/gnumach-1.5-486.gz root=device:hd0s3 -s
- module /hurd/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)
- module /lib/ld.so.1 /hurd/exec $(exec-task=task-create)
+*Nota Bene:* In your menu file there should be no extra white space after the back slashes.
-**_Nota Bene:_** In your menu file there should be no extra white space after the back slashes.
+Following this, re-create the grub configuration file:
+
+ # update-grub
### <a name="Native_install"> Native install </a>
-Ah, reboot and select "GNU (kernel GNUmach 1.3)" from the Grub menu. At the prompt, setup TERM and run the native-install script.
+Then, reboot and select "Debian GNU/Hurd" from the Grub menu. At the prompt, setup TERM and run the native-install script.
# export TERM=mach
# ./native-install
-Done, continue setting up your system.
+You should add a swap partition to `/etc/fstab`. You can share the swap
+partition between your Hurd and linux installations. If the swap partition
+was `/dev/hda4` on linux, it will be `/dev/wd0s4` on the Hurd.
+
+Before you reboot the system be sure to set a root password.
+
+ # passwd
+
+We can now reboot into the newly configured system.
+
+ # reboot-hurd
+
+## <a name="mmdebstrap"> mmdebstrap method </a>
+
+First we need to install the [mmdebstrap](http://packages.debian.org/mmdebstrap) and libarchive13t64 packages.
+
+ # apt install mmdebstrap libarchive13t64
+
+The way this installation method works is to run mmdebstrap in the
+[chrootless mode](https://gitlab.mister-muffin.de/josch/mmdebstrap/wiki#modes)
+from a linux host. But because misconfigured package Maintainer scripts may
+damage the host installation while running in chrootless mode, we wrap two
+mmdebstrap calls: the first creates a throw-away linux chainroot from within
+which we call mmdebstrap in chrootless mode to install our GNU/Hurd image.
+
+We run the following command (we use line breaks for readability, but it is a
+single command):
+
+ # mmdebstrap --variant=apt
+ --include=passwd,debian-ports-archive-keyring,mmdebstrap,sysvinit-core,sysv-rc,e2fsprogs,libarchive13t64
+ --customize-hook='chroot "$1"
+ mmdebstrap --mode=chrootless --arch=hurd-i386
+ --include=sysvinit-core,sysv-rc,debian-ports-archive-keyring,netdde,gnumach-image-1-486
+ --customize-hook="passwd --root=\"\$1\" --delete root"
+ --variant=apt unstable -
+ "deb http://ftp.ports.debian.org/debian-ports/ unstable main"
+ "deb http://ftp.ports.debian.org/debian-ports/ unreleased main"
+ | mkfs.ext2 -o hurd -d - /dev/hda3'
+ stable /dev/null
+
+We then need to [configure the bootloader grub](#Preparing_to_reboot) in the
+same way as described in the crosshurd method above.
-----
+We can then reboot into the Debian GNU/Hurd system. If we check the `/etc/fstab`
+file we will note that the system boots even without specifying a root mountpoint.
+At the moment there is no swap partition defined either, and it is a good idea to
+edit `/etc/fstab` to add both root and swap partitions. We can share the swap
+partition between Hurd and linux installations. If the swap partition
+was `/dev/hda4` on linux, it will be `/dev/wd0s4` on the Hurd. To activate swap
+without rebooting we use the command
-Jeff Bailey has set up a system where you can install a Hurd system without having to use CDs. It's another type of cross-installation method which uses Debian package management tools to get the packages required as opposed to the one single big tarball.
+ # swapon /dev/wd0s4
-As of 2005-03-22, the latest version of crosshurd is 1.7.11. It can be found at <http://packages.debian.org/crosshurd>.
+Any other packages can now be installed using `apt`.
--- [[Main/PeterMelville]] - 12 Jun 2004
diff --git a/hurd/running/debian/qemu_image.mdwn b/hurd/running/debian/qemu_image.mdwn
index 8409bc8c..c6da1555 100644
--- a/hurd/running/debian/qemu_image.mdwn
+++ b/hurd/running/debian/qemu_image.mdwn
@@ -42,7 +42,7 @@ Optionally you may use `--curses` to keep your keyboard layout. If need be modpr
Note that if you do not have a command named `kvm`, you can try something across the lines of:
- $ qemu-system-i386 --enable-kvm -drive cache=writeback,file=$(echo debian-hurd-*.img) -net user,hostfwd=tcp:127.0.0.1:2222-:22 -net nic,model=e1000
+ $ qemu-system-i386 --enable-kvm -m 2G -drive cache=writeback,file=$(echo debian-hurd-*.img) -net user,hostfwd=tcp:127.0.0.1:2222-:22 -net nic,model=e1000
Or, if your machine does not allow for KVM acceleration, omit `--enable-kvm` from the command.