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

Re: Building my own Debian m68k NETINST ISO from Debian Installer kernel and initrd



Hello Carlos!

On 12/6/21 16:10, Carlos Milán Figueredo wrote:
> I have successfully built my own hd-media initrd and kernel image by cloning the
> Debian Installer repository [1] and building them from a Debian install on Aranym
> from the latest snapshot [2]. My Aranym has the following kernel:
> 
> Linux aranym 5.15.0-2-m68k #1 Debian 5.15.5-1 (2021-11-26) m68k GNU/Linux

Building debian-installer yourself is rather easy. It can be built using sbuild like
any other package. You just need to make sure that build/config/common has the
correct kernel ABI version set that the current kernel in unstable uses, e.g.:

> https://tracker.debian.org/pkg/linux

So, currently we're at 5.15.5-1 and that needs to be set in build/config/common.

> So the d-i generated kernel and initrd modules target that version, that mismatch
> the 2021-10-20 one (5.14.0-3). So in order to use them I need to build my own NETINST
> ISO.

No, in order to use them, you must first make sure that the ABI version in build/config/common
is up to date. It won't work otherwise as the installer needs to know which kernel module
packages to use.

> The Debian Installer repository says:
> 
> "Note that this does not create full debian ISO images; that is left to the
> debian-cd package. As a shortcut, you can create a mini-ISO image, with
> only the netboot initrd on it. make build_netboot will create a
> dest/netboot/mini.iso, using isolinux. Any size initrd can be placed on
> this ISO, which may be useful for testing."
> 
> I am not figuring out what would be the steps to use the debian-cd package (got here [3])
> with my own hd-media and kernel images. Could someone let me know how to build a NETINST
> ISO?

Building a full ISO is more difficult you actually need a local copy of the repository on
your build machine. However, you can build ISO images for any architectures on amd64, you
don't need to do it natively.

Here is an outdated and rough guide on how it works:

> https://wiki.debian.org/PortsDocs/CreateDebianInstallerImages

You can omit the part which explains how to build debian-installer, you already have that,
you just have to unpack the debian-installer-images tarball to the correct location where
debian-cd can find it. You can also skip the bootloader part as all the necessary bootloaders
are in the Debian repositories.

Basically you need to do the following:

1. Create a local copy of the Debian Ports unstable mirror with reprepro
2. Checkout debian-cd from source
3. Edit CONF.sh and and easy-build.sh to suit your needs (see my attached variants)
4. run ./easy-build.sh NETINST m68k

PS: Sorry for not having updated the hd-media images yet. I got sick last month and work
    kept on piling. I hope to do it over the Christmas holidays.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

Attachment: easy-build.sh
Description: application/shellscript

Attachment: CONF-ports.sh
Description: application/shellscript


Reply to: