Received: from mail-pj1-f49.google.com (mail-pj1-f49.google.com [209.85.216.49]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id 4D5BB781335 for <~alpine/users@lists.alpinelinux.org>; Wed, 4 May 2022 15:12:26 +0000 (UTC) Received: by mail-pj1-f49.google.com with SMTP id iq10so1521400pjb.0 for <~alpine/users@lists.alpinelinux.org>; Wed, 04 May 2022 08:12:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=kxRK3qXdmflRMtvM/pIyLrFYqjMOn6Mutslo2x2D410=; b=jS8iBq4DlZCtkKWCEHMbnD18k02nZQ7OdrGYXRMsUWXVDiLxAb9UyL8SmCG0AaMKzA 8rSqahLCC4chC1Jg1M3a9EItY+ERV9Wa6vQAPcqQW9gKylN8cmh3riKaOPtWsA6WAmN+ C4A6xZ5EMDblqM3VEfwzrbdbYhQjanBt0egt8VKAIh6Xsv/UMw5qnbf/B5WMpdT+8zj3 +kyyt5IZfBJlFs0B5GQVImXtlqhzFO0GCYsu8UYQYwJFvTNGIr0S+awGYyhkhCk4mZST jxibDkucvzjz9u4Q1dw1YRG1wqmlbZIGY1p3GnxB77F1vHbh4gtZY88kq7ytA7jxiBBh aojw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=kxRK3qXdmflRMtvM/pIyLrFYqjMOn6Mutslo2x2D410=; b=kInNC9PXoqlx6lIh5O+MUJQtGVfjdEqSmxiRHjGxXT78B5s61Oo1XJ/Mo8f0TBm3it l/l/phpltaTXdRhSCevKqCCMJtgVn8J3kx6EEh20zO6cKe+sm0hWTM/kdNk9jCjtPdsU RtWnUuZKknhWU410eENopGg2av7vmzSz+bogznRIyZcL+N+okoMjSjMm2oJV2P0GaDzu NF1nSrAEqNXp3aDa7aPpJxuCsT5tsaqKO7Vo+Tmc8jZikKFzNKAvWyyWyUBrZc21YDdn aZzgnXP7jH6KgI9gsjxiHIJoAHXHbN5HLOtby+qs9zi9/ZF9zk0CfrddsM3u/W5G5Jh7 V1rQ== X-Gm-Message-State: AOAM533Tc8TzyivtyUq/zDXVRYqd/+ZEuI9ekN9YEVRNOH4ngUKF7o9t EvP05f3J4IDqp6cfvkTKkyiJ29AUM+k0jUw6PHzlN4adF4Q= X-Google-Smtp-Source: ABdhPJx/D7VjII8eyKjcd6k2CRFNvhGGnuNyYbWGKvWmGi7ZjcPWr1fH6qO4yUQhsx/qDajTexvjuz8WcRny2DokEH4= X-Received: by 2002:a17:902:b7ca:b0:15c:df6a:be86 with SMTP id v10-20020a170902b7ca00b0015cdf6abe86mr21627628plz.70.1651677144201; Wed, 04 May 2022 08:12:24 -0700 (PDT) MIME-Version: 1.0 From: Hokus Pokus Date: Wed, 4 May 2022 17:12:13 +0200 Message-ID: Subject: Custom Alpine Linux build To: ~alpine/users@lists.alpinelinux.org Content-Type: multipart/alternative; boundary="00000000000076bd2c05de310d49" --00000000000076bd2c05de310d49 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi all, I have a question related to custom OS based on Alpine Linux. First let me describe the current state: Hardware environment: - Dell server (PowerEdge R630) - 4 PCI Ethernet cards (QLogic 577xx/578xx 10Gb Ethernet BCM57800) - 16G RAM - 120G SSD ISO image I use: alpine-extended-3.15.4-x86_64.iso Everything is working fine, I am able to configure network cards, communicate with the world, update system etc. Those PCI network cards uses bnx2x modules and closed source firmware blobs from /lib/firmware (bnx2x package) if I am correct. It is working fine so far. Now the target: I want to make this install even smaller. The purpose of this new OS will be to: 1) Boot from hard drive 2) Load this new minimal "alpine based OS" rootfs with only needed set of binaries / libraries 3) Replace the whole init and /etc/init.d with single script which become new init process 4) This script-init will initialize all the hardware 5) This script-init will download encrypted disk image 6) This script-init will unpack encrypted disk image 7) This script-init will mount encrypted disk image 8) This script-init will chroot to encrypted disk image and continue there after pivot will be completed. So the new Alpine based OS I want to make will be sort of bootstrap for another OS (linux) and as such needs only minimum set of functions. I plan to remove all binaries and libraries which are not needed as only purpose of this OS will be to start hardware, get network working and download file from remote server. From the same reason I would like to replace the whole init and init.d scripts with single init.sh script called by kernel after boot. If someone has done something similar already and can point me which part of the Alpine system are core for the system functionality? Alpine is using mdev for device management. What else I need to have for binary blobs drivers working with linux kernel? Just /etc/mdev.conf in place and call "mdev -s" in the init script? Or there is more complicated hardware initialization procedure which I need to reproduce in my "init.sh" script? Should I just copy-paste some of /etc/init.d scripts and put them in one file in the right order? If I can go even further - replace the kernel with it modules by the monolithic kernel which has all needed modules compiled inside? This way if I will still need mdev for loading external firmware blobs? I was trying to find similar question on mailing lists and general forums but I failed. Best regards, Pawel --=20 Pozdrawiam Pawe=C5=82 Po=C5=82awski --00000000000076bd2c05de310d49 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi all,

I have a question re= lated to custom OS based on Alpine Linux.

First le= t me describe the current state:
Hardware environment:
= - Dell server (PowerEdge R630)
- 4 PCI Ethernet cards (QLogic 577= xx/578xx 10Gb Ethernet BCM57800)
- 16G RAM
- 120G SSD
ISO image I use: alpine-extended-3.15.4-x86_64.iso
Every= thing is working fine, I am able to configure network cards,
comm= unicate with the world, update system etc.
Those PCI network card= s uses bnx2x modules and closed source
firmware blobs from /lib/f= irmware (bnx2x package) if I am correct.
It is working fine so fa= r.

Now the target: I want to make this install eve= n smaller.
The purpose of this new OS will be to:
1) Bo= ot from hard drive
2) Load this new minimal "alpine based OS= " rootfs
with only needed set of binaries / libraries
3) Replace the whole init and /etc/init.d with single script
<= div>which become new init process
4) This script-init will in= itialize all the hardware
5) This script-init will download encry= pted disk image
6) This script-init will unpack encrypted disk im= age
7) This script-init will mount encrypted disk image
8) This script-init will chroot to encrypted disk image
and cont= inue there after pivot will be completed.

So the n= ew Alpine based OS I want to make will be sort of
bootstrap for a= nother OS (linux) and as such needs only
minimum set of functions= . I plan to remove all binaries and libraries
which are not neede= d as only purpose of this OS will be
to start hardware, get netwo= rk working and download file
from remote server. From the same re= ason I would like to replace
the whole init and init.d scripts wi= th single init.sh script called
by kernel after boot.

If someone has done something similar already and can poi= nt me which
part of the Alpine system are core for the system fun= ctionality?

Alpine is using mdev for device manage= ment. What else I need to have
for binary blobs drivers working w= ith linux kernel? Just /etc/mdev.conf in place
and call "mde= v -s" in the init script? Or there is more complicated
hardw= are initialization procedure which I need to reproduce in my "init.sh&= quot;
script? Should I just copy-paste some of /etc/init.d script= s and put
them in one file in the right order?

If I can go even further - replace the kernel with it modules by the= monolithic
kernel which has all needed modules compiled inside? = This way if I will still
need mdev for loading external firmware = blobs?

I was trying to find similar question o= n mailing lists and general forums
but I failed.
Best regards,
Pawel

--
Pozdrawiam

Pawe=C5=82 Po=C5=82awski
--00000000000076bd2c05de310d49--