Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Sep 2024 00:23:23 -0500
From:      Scott Bennett <bennett@sdf.org>
To:        freebsd-stable@freebsd.org
Cc:        torfinn.ingolfsen@getmail.no, pete@twisted.org.uk, marklmi@yahoo.com, karl@denninger.net, ax61@disroot.org
Subject:   Re: 13.3R's installworld killed system--please help!
Message-ID:  <202409150523.48F5NNVj003365@sdf.org>

next in thread | raw e-mail | index | archive | help
     On Tue, 10 Sep 2024 10:46:20 +0100 Pete French <pete@twisted.org.uk> wrote:

>>       And so I still have no clue what destroyed my system's ability to boot
>> except that it appears to have happened as part of "make installworld".  I
>> also still have no idea how to fix it. :-(
>
>...and fixing it is the important bit. This is old enough that its using 

     Yes, indeed.

>BIOS and MBR boot, yes ? What do you have that you can actually boot 

     Yes.

>into on the machine which would let you access the discs ? I understand 
>that a USB stick doesn't work, but do you have a CD drive maybe you 
>could use to boot it ?

     Yes, but I need the tower working in order to burn a disk.
>
>What I would try, assuming you can get access to the discs, it to 
>rewrite both the boot sector and the boot partition. I got bitten by 
>this once, and since then I have a little script which I run after every 
>update which does this:
>
>
>$ cat /root/update_boot_blocks
>#!/bin/sh
>for DRIVE in ada0 ada1
>do
> /sbin/gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ${DRIVE}
>done
>
>That's specific to my disc layout of course. But the point is I make 
>sure I always update both the MBR and the boot partition which goes away 
>to find the zpool I boot from. So, obviously you cant do directly that 
>if you cant boot the machine - but if you can boot some kind of FreeBSD 
>from a CD you have (I think you said you couldnt burn a new one, but do 
>you have an older version lying around?) then you could boot that, 
>download the latest pmbr and gptzfsboot files from the internet, and 
>write them to the discs.
>
     Thank you very much for this suggestion!  It hadn't crossed my mind,
likely because I thought I had thrown all those old CD-Rs and DVD+/-Rs away
when I moved to a different apartment in February.  After seeing your message,
though, I went looking.  In the very first place I checked, lo and behold, I
found a DVD-R I had labeled "PC-BSD 8.2 (64-bit) Installer, LiveCD, and Repair
Disk" and "PCBSD8.2-x64-DVD.iso Disk 1 of 1". 8-D  So I then did as you
suggested.  Unfortunately, it made no change in the resulting boot behavior.
:-(  At least I now know I have such a disk at hand to try such things.
>
>This is what I ended up having to do when I got into a similarly 
>unbootable state a few years ago. Mine was slightly easier than yours 
>though, as I could boot form a USB stick.
>
     Yes, that would be very nice to be able to do.
     Pete also wrote on Wed, 11 Sep 2024 23:18:37 +0100:

>On 11/09/2024 22:20, Karl Denninger wrote:
>> 13.x does work on the bios-based boot code I have systems in a cloud 
>> provider where I can't run EFI that boot off of that and they're on. 13.
>
>Same here - I still BIOS boot all my machines, and am now up to 14.1 on
>them. I always update the boot code though, as I did once end up in the
>situation of having an unbootable system after updating. But yes, you
>can have confidence that BIOS boot continues to work fine.

     Thank you both for that reassuring information.  After all this, it is
now clear that the boot code was not the problem and that I *still* have no
idea what went wrong.  I do not remember ever having an upgrade from source
actually fail before this experience.  Even the trickiest one many years ago--
a merged procedure to upgrade from i386 to amd64 in place and from, I *think*,
9.x to 10.x, went well.  (Trust me, I was as nervous as I would be on a
non-precision approach in nighttime IMC in a non-radar, mountainous environment
with flashes of light around me (yes, that happened to me once), but I had
planned all the steps carefully, and my combined procedure was successful.)
     But now for the limited, but very good news.  Last night I finally did
what I should have done over a week ago instead of desperately trying to
salvage my "upgraded" system.  (I seemed to have forgotten that snapshot and
why I had made it.  Duh.)  I pulled the boot drives out of the tower again,
placed them into the docking station, plugged that into the laptop, imported
the "system" pool with no mounting of file systems, located the recursive
snapshot of all of the pool's file systems, which I'd had the presence of mind
to take before running "make installkernal KERNCONF=hellas", and one by one
rolled every file system back to that snapshot.  After reinserting the drives
into the tower, I booted it and ... my 12.4-RELEASE-p2 system was up and
running again.  What a relief!
     So I'm back to where I was before attempting the upgrade.  It's a good
system, but it is out of support, so thank you very much to everyone who
responded anyway.  I am pondering what my next step should be.  I am now not
thrilled with the idea of doing a source upgrade, freebsd-update being out of
the question, to any supported version of 13.  It looks like I'll need to try
a source upgrade to 14.1 or 14.2.  However, the handbook does not recommend
skipping whole major releases entirely, IIRC; rather, it recommends installing
each in sequence until arriving at the desired release.  If anyone reading this
has done this directly from 12.x (or earlier) to 14.x, especially as upgrades
from source, please let me know if you ran into any notable problems in doing
so.
     Many thanks also to Torfinn Ingolfsen <torfinn.ingolfsen@getmail.no> for
his pointer to the nifty tool called Plop!  I'd never heard of it, but it looks
like it could be a lifesaver in some situations.
     Thanks very much to everyone who offered suggestions.  Also, I offer my
apology for not doing the obvious, which worked as intended, much sooner.


                                  Scott Bennett, Comm. ASMELG, CFIAG
                                  DeKalb, Illinois 60115
**********************************************************************
* Internet:   bennett at sdf.org   *xor*   bennett at freeshell.org  *
*--------------------------------------------------------------------*
* "A well regulated and disciplined militia, is at all times a good  *
* objection to the introduction of that bane of all free governments *
* -- a standing army."                                               *
*    -- Gov. John Hancock, New York Journal, 28 January 1790         *
**********************************************************************



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