I see. So the third stage bootloader loads the kernel into memory, as well
as the boot_archive, informs the kernel where the archive is (in memory),
then the kernel uses the drivers and such in the programs to load the root
and execute /sbin/init?

I checked the filelist document in
https://github.com/illumos/illumos-gate/blob/master/usr/src/cmd/boot/filelist/i386/filelist.ramdisk
and didn't see an /init, do does that mean that whatever the kernel does at
that time is completely controlled by the drivers (as I would expect)?

If so, then could it be as simple as sliding an /init into the boot_archive
and then avoid mounting any disk filesystems?

On Fri, Jul 26, 2024, 12:58 PM Bill Sommerfeld via illumos-discuss <
discuss@lists.illumos.org> wrote:

> On 7/26/24 07:14, Bryce wrote:
> > I tried some googling but I couldn't find out what's usually in
> > `boot_archive', nor could I find anything in illumos-gate relating to a
> > default, nor in oi-userland. Is boot_archive generated per distro or is
> > it in illumos-gate?
>
> The boot archive is generated by 'bootadm update-archive', which can be
> run manually by the administrator but it generally gets run
> automatically when needed at reboot time and by the
> svc:/system/boot-archive-update SMF service (which runs at boot once the
> relevant filesystems are mounted read-write).
>
> Under the covers, 'bootadm update-archive' runs the
> /boot/solaris/bin/extract_boot_filelist script to enumerate the files
> and directories from the real root that should be included in the
> archive.   Note that if a directory is named, the entire tree rooted at
> that directory is included.
>
> As others have mentioned, SmartOS does things somewhat differently but
> the above applies to most general-purpose illumos distributions.
>
> > I read the bootadm(8) man page hoping for some answers but none came.
> > Although it did mention the available archive formats, does that mean
> > that boot_archive is archived into an (eg cpio) archive, and then
> > mounted RO by the kernel so it can load the modules necessary to talk to
> > the hardware?
> 
> Yes.
> 

------------------------------------------
illumos: illumos-discuss
Permalink: 
https://illumos.topicbox.com/groups/discuss/Tc9bfa679c7294ee7-M96a23a88deac9c4b51094660
Delivery options: https://illumos.topicbox.com/groups/discuss/subscription

Reply via email to