tech-kern archive

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

re: "Boot this kernel once" functionality? (amd64)



Reinoud Zandijk writes:
> On Wed, Sep 16, 2020 at 12:09:43PM +0200, Martin Husemann wrote:
> > On Wed, Sep 16, 2020 at 12:05:26PM +0200, Anthony Mallet wrote:
> > > I was also wondering if it would be possible to pass arguments to the
> > > primary or secondary bootloader via reboot(2) and the boothowto
> > > flags. But this doesn't seem doable. Right?
> > 
> > This works fine on e.g. sparc*; I can do: shutdown -b netbsd.t -r now
> > 
> > and it will pass "netbsd.t" as boot argument to the firmware, which passes
> > it on to the bootloader and then it boots /netbsd.t once.
> 
> In shutdown(8) I read that the arguments are passed to reboot(8) and that is
> mentioned in kloader(4) so I guess its using that mechanism.

this does not use kloader(4), which appeared in netbsd 1.6.
the "pass boot args to loader" appeared in netbsd 1.3, and
it is implemented on sparc* by asking the firmware to reboot
with these arguments instead of the default.  it very much
relies upon this firmware feature.


.mrg.


Home | Main Index | Thread Index | Old Index