Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Mar 2016 22:13:34 +0100
From:      Dimitry Andric <dim@FreeBSD.org>
To:        Nikolai Lifanov <lifanov@mail.lifanov.com>
Cc:        Oliver Pinter <oliver.pinter@hardenedbsd.org>, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, owner-svn-src-head@freebsd.org
Subject:   Re: svn commit: r296428 - head/sys/boot/common
Message-ID:  <0D2DFD32-B29F-48EA-8D60-458960993E97@FreeBSD.org>
In-Reply-To: <5ba9554b9066227c883140c7c12e4703@mail.lifanov.com>
References:  <201603061557.u26FvhMi033982@repo.freebsd.org> <CAPQ4ffut5jLNp5X4cV_DCsPGfv4Fw%2BPVm0ANNftuj2PLFZrjtQ@mail.gmail.com> <0FC43773-1BF0-43FF-BB97-35B482ABBE12@FreeBSD.org> <5ba9554b9066227c883140c7c12e4703@mail.lifanov.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_D1ADE014-F301-4960-843C-3F867AEA9CC4
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

On 06 Mar 2016, at 20:57, Nikolai Lifanov <lifanov@mail.lifanov.com> =
wrote:
>=20
> On 2016-03-06 11:17, Dimitry Andric wrote:
>> On 06 Mar 2016, at 17:00, Oliver Pinter =
<oliver.pinter@hardenedbsd.org> wrote:
>>> On 3/6/16, Dimitry Andric <dim@freebsd.org> wrote:
>>>> Author: dim
>>>> Date: Sun Mar  6 15:57:43 2016
>>>> New Revision: 296428
>>>> URL: https://svnweb.freebsd.org/changeset/base/296428
>>>> Log:
>>>> Since kernel modules can now contain sections of type =
SHT_AMD64_UNWIND,
>>>> the boot loader should not skip over these anymore while loading =
images.
>>>> Otherwise the kernel can still panic when it doesn't find the =
.eh_frame
>>>> section belonging to the .rela.eh_frame section.
>>>> Unfortunately this will require installing boot loaders from =
sys/boot
>>>> before attempting to boot with a new kernel.
>>> Could you please add a note about this to UPDATING file?
>> I am a bit torn on this, because normally we always tell people to
>> install the kernel first, reboot, then run make installworld (which =
also
>> installs the boot loaders).
>> However, in this case, people might depend on their boot loader =
loading
>> modules which are required to make the system boot at all.  So if =
they
>> happened to forget updating their boot loader first, a panic might be
>> the result.
>> I wonder what a failsafe and acceptable upgrade scenario is, in this
>> case.  Normally the procedure is something like:
>>  make buildworld
>>  make buildkernel (with KERNCONF=3Dwhatever, if needed)
>>  make installkernel (again with KERNCONF, if needed)
>>  reboot (to single user, but cheating is possible usually)
>>  mergemaster -p
>>  make installworld
>> This could maybe be modified to:
>>  make buildworld
>>  make buildkernel (with KERNCONF=3Dwhatever, if needed)
>>  make installkernel (again with KERNCONF, if needed)
>>  make -C sys/boot install
>>  reboot (to single user, but cheating is possible usually)
>>  mergemaster -p
>>  make installworld
>> E.g. insert the step which installs the boot loaders just after (or
>> before) the step which installs the kernel.
>> Is something like this acceptable as a one-time workaround, or maybe =
it
>> is better in general, in case we ever add other new features to the =
boot
>> loaders?
>> -Dimitry
>=20
> In my opinion, boot *blocks* (boot1) should be updated seldomly and =
not on every install.
> All (?) instances of not updating these resulting in a failed boot =
have an UPDATING
> entry or a similar warning (like the one during "zpool upgrade").

Well, each time you run make installworld, almost all the files in /boot
(except for configuration) get reinstalled.  For e.g. mbr, boot1 and
such, this has no consequences at all, until you install them into some
partition using gpart, but changes to loader, loader.efi or zfsloader
*will* affect the next startup.

Per a suggestion from Kostik, maybe it would be nice to have a separate
"make installboot" target, which installs just the components in /boot.
This could then be used before or after "make installkernel".

-Dimitry


--Apple-Mail=_D1ADE014-F301-4960-843C-3F867AEA9CC4
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP using GPGMail

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.29

iEYEARECAAYFAlbcnYIACgkQsF6jCi4glqMjDwCgyp/oUg3vwXo/7JZBMwexMmk5
FMIAoNXpEXyq4Iem3Uotn4FNkR2UbILn
=Xu6U
-----END PGP SIGNATURE-----

--Apple-Mail=_D1ADE014-F301-4960-843C-3F867AEA9CC4--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0D2DFD32-B29F-48EA-8D60-458960993E97>