Hello, Fixed a bit and applied, thanks!
Samuel João Pedro Malhado, le sam. 04 oct. 2025 23:01:30 +0100, a ecrit: > Hello everyone, > > Please consider the attached patch that > * Updates instructions on crosshurd use. > * Eliminates duplication of crosshurd documentation. > * Documents use of mmdebstrap to create hurd image on disk partition. > > Best regards, > João > diff --git a/faq/drivers.mdwn b/faq/drivers.mdwn > index 16d60a9a..0d73f995 100644 > --- a/faq/drivers.mdwn > +++ b/faq/drivers.mdwn > @@ -24,9 +24,8 @@ Other working Thinkpads include the X200, T400, > which support internet connectivity via the ethernet port. You can > use an [[SSD|hurd/rump/rumpdisk]] on these laptops, which support a > maximum of 8GB of RAM. The Debian installer images from 2023 fail to > -boot these machines, but you can install the Hurd via [[Debian's > -CrossInstall|hurd/running/debian/CrossInstall]] or > -[[mmdebstrap|https://lists.debian.org/debian-hurd/2024/12/msg00003.html]]. > +boot these machines, but you can install the Hurd from a linux > +installation via [[crossinstall method|hurd/running/debian/CrossInstall]]. > > _While the [[64 bit port|faq/64-bit]] is about as stable as the 32-bit > port, the rumpdisk support needed for it is still relatively experimental. > diff --git a/hurd/running/debian/CrossInstall.mdwn > b/hurd/running/debian/CrossInstall.mdwn > dissimilarity index 73% > index 38a33040..f3f987dc 100644 > --- a/hurd/running/debian/CrossInstall.mdwn > +++ b/hurd/running/debian/CrossInstall.mdwn > @@ -1,69 +1,136 @@ > -## <a name="Easy_install_with_CrossHurd"> Easy install with CrossHurd </a> > - > -Qurious about the Hurd? Have a 1-5 GiB partition free? Let's install > GNU/Hurd on it! > - > -### <a name="Preparing_the_partition"> Preparing the partition </a> > - > -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. > - > -First we create the Ext2 filesystem, notice the `hurd` option. > - > - # mke2fs -o hurd /dev/DEVICE > - > -Next we create a useful mountpoint and mount the partition. > - > - # mkdir /gnu > - # mount /dev/hda3 /gnu > - > -### <a name="Retrieving_CrossHurd"> Retrieving CrossHurd </a> > - > -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. > - > - # 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 > - > -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. > - > - 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-x86-64.so.1 /hurd/exec $(exec-task=task-create) > - > -Note: use `ld.so.1` instead of `ld-x86-64.so.1` on 32b systems. > - > -**_Nota Bene:_** In your menu file there should be no extra white space > after the back slashes. > - > -### <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. > - > - # export TERM=mach > - # ./native-install > - > -Done, continue setting up your system. > - > ----- > - > -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. > - > -As of 2005-03-22, the latest version of crosshurd is 1.7.11. It can be found > at <http://packages.debian.org/crosshurd>. > - > --- [[Main/PeterMelville]] - 12 Jun 2004 > +Curious 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). > + > +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. > + > +The examples here assume the installation of a `hurd-i386` system, but it > should > +be simple to modify for a `hurd-amd64` installation. > + > + > +## <a name="CrossHurd"> CrossHurd method </a> > + > +First install the [crosshurd package](http://packages.debian.org/crosshurd). > + > + # apt install crosshurd > + > +If you have problems it might be because the corsshurd version in the Stable > +distribution is out of date, try the version in Unstable before reporting > the issue. > + > +### <a name="Preparing_the_partition"> Preparing the partition </a> > + > +We create the Ext2 filesystem for the Hurd system, notice the `hurd` option. > + > + # mke2fs -o hurd /dev/hda3 > + > +Next we create a useful mountpoint and mount the partition. > + > + # mkdir /gnu > + # mount /dev/hda3 /gnu > + > + > +### <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. > + > + # crosshurd > + > +Answer the questions you get: $ What is the target directory?: `/gnu` $ > Target Debian system?: gnu $ Target CPU?: i386 > + > +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 `/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)' > + } > + > +*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: > + > + # grub-mkconfig > /boot/grub/grub.cfg > + > +And then install it to your disk: > + > + # grub-install /dev/hda > + > + > +### <a name="Native_install"> Native install </a> > + > +Ah, 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 > + > +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. > + > +You can then reboot into the Debian GNU/Hurd system and install any further > +packages using `apt`. > + > diff --git a/unsorted/CrossHurd.mdwn b/unsorted/CrossHurd.mdwn > deleted file mode 100644 > index 6a01e1bc..00000000 > --- a/unsorted/CrossHurd.mdwn > +++ /dev/null > @@ -1,96 +0,0 @@ > -This will eventually become an installation guide for the Debian crosshurd > package (GNU/Hurd cross install only). However, for the time being I am > setting it up as a diet version of Hurd/InstalNotes, adapted for crosshurd, > adapted for me. > - > --- [[Main/JoachimNilsson]] - 14 Mar 2004 > - > -## <a name="Reserving_partitions"> Reserving partitions </a> > - > -You need a swap and root partition, much like any other UNIX system. Two > things to remember: > - > -1. Root partition still <2.0 GiB > -2. Root partition: mke2fs -o hurd -b 4096 -L Carlsberg > - > -From a Debian GNU/Linux installation preparing install of GNU/Hurd on > /dev/hdb2 reusing the Linux swap on /dev/hdb4. > - > - # mke2fs -o hurd -b 4096 -L Carlsberg /dev/hdb2 > - > -<div> > - <center> "Carlsberg. Probably the best beer in the world." </center> > -</div> > - > -## <a name="Bootstrapping"> Bootstrapping </a> > - > -After having installed the Debian crosshurd package you need to mount your > newly created Hurd partition. > - > - mkdir /gnu > - mount /dev/hdb2 /gnu > - > -Now, simply run the crosshurd program and follow the onscreen directions. > **Do** select the usr symlink. > - > - crosshurd > - > -crosshurd burps a lot of unneeded information on screen and probably fails > to install one or two files due to duplicates between GNU and Debian > packages. Lets hope this mess is worked out some day. > - > -## <a name="Rebooting"> Rebooting </a> > - > -Before we reboot you must setup a Hurd entry in the menu.lst file of Grub. > Do it like this and remember, **no trailing spaces**! > - > -The first two runs (reboots) you must run the Hurd in single-user mode! > - > - title GNU (kernel GNUmach 1.5) > - root (hd1,1) > - kernel /boot/gnumach-1.5-486.gz root=device:hd1s2 -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-x86-64.so.1 /hurd/exec $(exec-task=task-create) > - > -Note: use `ld.so.1` instead of `ld-x86-64.so.1` on 32b systems. > - > -N.B. the '-s' on the kernel line, it is "single user mode", which you need > for the first two reboots. > - > -OK, reboot now. > - > -## <a name="First_steps"> First steps </a> > - > -Set TERM variable and run native-install script. > - > - export TERM=mach > - ./native-install > - > -You can then remove the '-s' in the kernel line above and boot GNU/Hurd as a > normal user. > - > -## <a name="Logging_in"> Logging in </a> > - > -Finally, a complete bootstrapped GNU system. > - > - login root > - > - export TERM=mach > - > - nano /etc/fstab > - [add swap partition /dev/hd1s4] > - > - nano /etc/ttys > - [remove all hashes to enable the new Hurd Console] > - > - settrans -fgap /servers/socket/2 /hurd/pfinet -i /dev/eth0 -a > 192.168.1.3 -g 192.168.1.1 -m 255.255.255.0 > - > - dselect > - > -Now, do the old Debian thing of dancing with dselect for a couple of hours. > - > -Reboot and start the new [[Console]] > - > - login root > - > - console -d vga -d pc_kbd -d generic_speaker /dev/vcs > - > -Move around just like in Linux console, but with persistent scroll-back > buffers for each console. > - > -## <a name="References"> References </a> > - > -* [[Network]] > -* [[Console]] > -- > 2.47.3 > -- Samuel <c> ya(ka|ma|to)* ca existe une fois sur 2 au japon, c'est facile ;-) -+- #ens-mim au japon -+-
