:: Re: [devuan-dev] Documentation anyw…
Top Page
Delete this message
Reply to this message
Author: Simon Richter
Date:  
To: devuan developers internal list, Dennis Clarke
Subject: Re: [devuan-dev] Documentation anywhere regarding debootstrap to another architecture
Hi,

On 9/10/25 1:53 PM, Dennis Clarke wrote:

> Looking at https://www.devuan.org/os/install it seems everything is
> x86_64 only. Is there any documentation anywhere regarding a cross
> debootstrap to something like RISC-V or even aarch64?


There is a --foreign option in both debootstrap and cdebootstrap. Last
time I looked, only the latter was working properly.

The basic idea behind bootstrapping Debian is that "Essential: yes"
packages and their dependencies are supposed to work if they are only
unpacked but have not been configured yet. So the process is

1. download all packages that are Essential or in a list of "base
system" packages (or added on the command line)
2. unpack the Essential packages
3. chroot into the system, install all the Essential packages (that
unpacks them again, because their files need to be registered)
4. chroot into the system, install the remaining packages

The latter two are actually run in one go, by chrooting into the system
and calling "debootstrap --second-stage" there.

If you use the "--foreign" option to debootstrap, it will stop after
unpacking, and you can then manually run the second stage. cdebootstrap
makes this a bit more convenient and diverts /sbin/init to a different
path and instead places a script there that runs the second stage, then
removes the diversion and re-execs /sbin/init.

So if you don't want to use an emulator to bootstrap, you can get a root
file system that will perform the second half of bootstrapping on first
boot -- but you need a kernel, and you need to be able to access the
root file system.

    Simon