Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Jan 2018 22:17:51 +0400
From:      Roman Bogorodskiy <novel@FreeBSD.org>
To:        freebsd-ppc@freebsd.org
Subject:   Booting an alternate kernel
Message-ID:  <20180108181749.GA3689@kloomba>

index | next in thread | raw e-mail

[-- Attachment #1 --]
Hi,

Recently I upgraded FreeBSD -CURRENT as of mid-2016 to a fresh one (Jan
6-7 -CURRENT). Of course I didn't read UPDATING and missed 20171125
entry so it failed to find root. However, when I manually set root to
'ufs:/dev/ada0s3', it failed to boot because init segfaulted (I did
installkernel but not installworld).

I decided to boot kernel.old. There's a note here:

https://www.freebsd.org/platforms/ppc.html#issues

that tells how to boot a custom kernel, e.g. doing

0 > boot hd:loader hd:0

It doesn't work for me.

I figured out that I can proceed to normal boot from the OpenFirmware
shell using

0 > boot hd:\ppc\boot1.elf

But I don't quite understand how to specify invalid partition?

I tried things like "boot hd:\ppc\boot1.elf hd:4" but it appears to
treat "hd:4" as a loader.

As far as I understand, boot1.elf source code is:

https://github.com/freebsd/freebsd/blob/master/stand/powerpc/boot1.chrp/boot1.c

From what I can see:

https://github.com/freebsd/freebsd/blob/master/stand/powerpc/boot1.chrp/boot1.c#L414

it only allows to define 'path' which is PATH_LOADER "/boot/loader" by
default; and bootpath is set from /chosen bootpath property.

Would appreciate if somebody could help with the follow:

 * How do I force invalid 'bootpath' so it drops into loader without
   loading kernel (or other ways to load kernel.old)?
 * Hints how to debug init segfault issue

Thanks,

Roman Bogorodskiy

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----

iQEcBAEBAgAGBQJaU7XNAAoJEMltX/4IwiJqDscH/A3HYtTm0vZWdBqpBqaIGNz5
153XbSVRk8tAMXYeWcSzeKEagjjnyEHH89UuYKsII4jovVv9WyOP+Hvsmo2hw2fg
J0n+eVw53lqp7XEufEYPYLBEHKLkWbojohjRErsamXMQw129zLqNxFpNNEO91BTM
olf9yWr50HOK3YnU9XsNZ7MvGnuFMm2Wa7aoJwaLp89bhYHtw2XVUpwcmbN5vQdM
03sGUkxpyDPRaOrIdMLFcofG3eipw/o6biHyLm62ZSYxm7s1WVXCya+ErMYwM55C
BXxzvJ9Fwr6dxMnruH3LcyOD9uAt5ai1jEw3PszAxnb8QQnQIZ7th5hoyEh8nJk=
=RiJB
-----END PGP SIGNATURE-----
home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180108181749.GA3689>