:: Re: [DNG] upcoming usr merge requir…
Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Didier Kryn
Ημερομηνία:  
Προς: dng
Αντικείμενο: Re: [DNG] upcoming usr merge requirements
Le 29/11/2023 à 01:19, o1bigtenor via Dng a écrit :
>>      The boot sequence is nowadays done in two steps:
>>
>>      1) boot into a first partition which, for distros, is always an initramfs; perform some mounts and maybe other things;
>>
>>      2) pivot-root to the final partition and continue the init sequence there.
>>
>>      Note that, if you decide to craft your own first step, the initial partition is not necessarily an initramfs, provided your kernel is able to mount it, i.e. it has the drivers built-in, which implies you must build it from source.
>>
> Hmmmmmmmmmmm - - - - thank you!
>
> How do I slowly step through my boot sequence to see what's happening?
>
> (I'm running from SSDs and trying to follow the boot sequence on the
> screen - - -
>   I bet I miss at least 70% of it and maybe more even though I read
> very very quickly.)


    For the kernel, you get it from kernel.org and there is a very
friendly build system.

    For user space, everybody uses Busybox. Read all you can about
Busybox to understand a maximum of things about it.

    Once you have your Busybox built as a static program and installed
in your initial boot partition, boot your new kernel into this partition
with the shell as init program and experiment commands from the command
line. You must first mount /proc, /sys and /dev, start the hotplugger
mdev and then prepare your system for the second step... Initially you
type commands from the console, which is not very convenient; switch as
soon as possible to tty0 and do the necessary hacks to give it the usual
behavior (cttyhack, setsid). The funny thing is that your interactive
shell is pid1! Once you're satisfied with the sequence, make it a script
and run this script as the init program.

    Make your system look exactly like Devuan expects to find it when
it enters the second step. I mean if you want to run Devuan.

    You can do all this on a USB memory stick with the kernel in the
first partition, with syslinux as a bootloader, and userspace on a
second partition.

    You have a lot of work.

--     Didier