[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Installing Debian GNU/Hurd without CD-ROM



Hello,

On Sun, Apr 20, 2025 at 12:30:51AM +0200, Samuel Thibault wrote:
> João, le sam. 15 mars 2025 13:17:40 +0000, a ecrit:
> > I am aware of mmdebstrap mentioned in this mailing list at the end of last year,
> > which could work in the similar way to crosshurd, but I did not find enough
> > information to be able to make it work for an installation on real hardware.
> 
> Johannes provided information on:
> https://lists.debian.org/debian-hurd/2024/12/msg00003.html

I have tried to use mmdebstrap to install a hurd on a separate partition from an
existing linux installation, but have not managed to make it work yet.

For convenience I reproduce here the command posted by Johannes to generate a
pre-installed image file:

    mmdebstrap --variant=apt \
        --include=passwd,debian-ports-archive-keyring,mmdebstrap,sysvinit-core,sysv-rc,e2fsprogs,libarchive13 \
        --customize-hook='chroot "$1"
            mmdebstrap --mode=chrootless --arch=hurd-i386
            --include=sysvinit-core,sysv-rc,debian-ports-archive-keyring,gnumach-image-1-486
            --customize-hook="passwd --root=\"\$1\" --delete root"
            --customize-hook="copy-out /boot/gnumach-1.8-486-up.gz /hurd/exec.static /hurd/ext2fs.static /tmp"
            --variant=apt unstable -
            "deb http://ftp.ports.debian.org/debian-ports/ unstable main"
            "deb http://ftp.ports.debian.org/debian-ports/ unreleased main"
            | chroot "$1" /sbin/mkfs.ext2 -q -F -o hurd -I 128 -b 4096 -d - /tmp/hurd.ext2 204800' \
        --customize-hook='copy-out /tmp/hurd.ext2 /tmp/gnumach-1.8-486-up.gz /tmp/exec.static /tmp/ext2fs.static .'
        unstable /dev/null

What I think this is doing is creating a throwaway linux chroot and in that
creating a hurd chroot and making an ext2 image file out of it.

Instead of making a file I would like to install into a mounted (or unmounted)
partition. However I am unable to access it from within the created linux
chroot.

To create the hurd-i386 chroot from linux, the chrootless mode seems to be
needed, and the documentation
(https://gitlab.mister-muffin.de/josch/mmdebstrap/wiki)
recommend running this on a throwaway chroot (as above) or as a regular user.
But when trying to run mmdebstrap --mode=chrootless --format=directory
on the target ext2 partition mountpoint (an empty directory with just
lost+found) as a regular user but with writing permissions, mmdebstrap gives an
error:
    readdir() attempted on invalid dirhandle

Is this a bug I should report?
Would anyone have an idea on how to make this work?

Best regards,
João


Reply to: