Reproducible panic - Going nowhere without my init!
Konstantin Belousov
kostikbel at gmail.com
Wed Oct 5 08:43:38 UTC 2016
On Wed, Oct 05, 2016 at 05:32:18AM +1000, Andy Farkas wrote:
> On 04/10/2016 23:11, Andy Farkas wrote:
> > On 04/10/2016 21:24, Konstantin Belousov wrote:
> >> On Tue, Oct 04, 2016 at 11:14:38AM +1000, Andy Farkas wrote:
> >>> Is it just me or....
> >>>
> >>> Step 1: boot
> >>> Step 2: login as root
> >>> Step 3: type "w<enter>" *
> >>> Step 4: type "shutdown now; logout<enter>"
> >>> Step 5: press <enter> at the 'Enter full pathname of shell or RETURN
> >>> for
> >>> /bin/sh:' prompt
> >>> Step 6: type "reboot<enter>"
> >>> Step 7: get a Panic: "Going nowhere without my init!"
> >> This means that init process (pid 1) exited for some reason. Show
> >> exact console log of the events.
>
> I can also offer a (badly taken) photo of the console screen:
>
> http://imgur.com/1xixODY
>
> -andyf
>
> ps. Thank you for taking an interest. I only really wanted to know
> if anyone else could reproduce the panic because it has happened
> on several of my (home network) boxes since 10.0....
Apply the following patch. I am interested if anything additional appear
on the console. Screenshot is good enough.
diff --git a/sbin/init/init.c b/sbin/init/init.c
index bda86b5..1e88964 100644
--- a/sbin/init/init.c
+++ b/sbin/init/init.c
@@ -884,8 +884,13 @@ single_user(void)
if (Reboot) {
/* Instead of going single user, let's reboot the machine */
sync();
- reboot(howto);
- _exit(0);
+ if (reboot(howto) == -1) {
+ emergency("reboot(%#x) failed, %s", howto,
+ strerror(errno));
+ _exit(1); /* panic and reboot */
+ }
+ warning("reboot(%#x) returned", howto);
+ _exit(0); /* panic as well */
}
shell = get_shell();
More information about the freebsd-stable
mailing list