On 10/09/13 16:47, Jeff Ross wrote:
...
> Hi Nick!
> 
> Just the person I was hoping to hear chime in!

yeah, you got my attention.  and got me nervous. :)

> Standard ksh shell, as root, although I got there via sudo.
> 
> I for sure thought it was odd, but actually on 4 separate systems I've 
> had reboot fail.  The first was my little netbook in my lap, but that 
> was not problem because I could physically access the keyboard.  The 
> next was half of another pair of CARPed firewalls--I have yet to get 
> someone in there to fix that--and then the CARPed pair at my 
> work--yesterday for one and this morning for the other.
> 
> Here is the output of ls -l /sbin/*reboot
> 
> jross@samsara1:/home/jross $ ls -l /sbin/*reboot
> -r-xr-xr-x  1 root  wheel  189236 Oct  8 13:42 /sbin/oreboot
> -r-xr-xr-x  2 root  bin    193332 Oct  1 11:46 /sbin/reboot

That is spookily like mine. :)  Same file sizes, same dates.  (not a
surprise when one thinks about it, but ...)

> The oreboot is the copy of the previous /sbin/reboot--and the size 
> matches exactly the /sbin/reboot file on another system from about a 
> month before the time_t change.

I want to argue with you on this but I find no grounds. :-/

> Here's my update script from the first system I tried to upgrade at 
> work.  In this case I tried running pwd_mkdb (since I'd checked that it 
> was a static binary) before rebooting.
> 
> Every command after the extracting base failed.

as it should.

> #!/bin/sh
> path=/usr/releasedir/
> 
> export RELEASEPATH=$path   # where you put the files
> cd ${RELEASEPATH}
> rm /obsd ; ln /bsd /obsd && cp bsd.mp /nbsd && mv /nbsd /bsd
> cp bsd.rd  /
> cp bsd  /bsd.sp
> 
> rm -rf /usr/X11R6/lib/modules/*
> 
> cp /sbin/reboot /sbin/oreboot
> files="xserv xfont xshare xetc xbase game comp man base"
> for i in $files
>    do
>                  echo $i
>                  tar -C / -xzphf $i*
>                  rm -f $i*
>                  sync
>          done
> /usr/sbin/pwd_mkdb /etc/master.passwd
> cp /dev/null /var/log/lastlog
> cp /dev/null /var/log/wtmp
> /sbin/oreboot
> 
> 
> However, it just occurred to me that I was in a tmux shell as root--so 
> it was *not* ksh!  I'll bet it was tmux that was croaking! I've gotten 
> in the habit of using tmux since it's been in base so if my internet 
> connection drops the script doesn't stop, leaving the whole system in an 
> inconsistent state--which I had happen about halfway through extracting 
> base one time.
> 
> Hmm--should (and can) tmux be switched to a static binary in base? It's 
> great to have that safety net if either side of my sometimes crappy 
> internet goes away.
> 
> Thanks, as always, Nick!
> 
> Jeff
> 

could you have had something in /etc/rc.shutdown ?
I'm thinking this might be it -- any binary invoked here would generate
a core dump, and might prevent the reboot.

Maybe we should be recommending a "/sbin/oreboot -q" to skip anything
else that happens with a reboot(8).  Just flush the disks and reboot
now, dang it!


I am a bit tight on time right at the moment to do a lot of
investigation on this, but if you can figure out what went wrong here,
I'd be very curious...

For example, you should look around for *.core files that have a
timestamp near where the upgrade took place?  If what you are suspecting
is the case, you should find an oreboot.core file.  I think you won't; I
think you will find something else.

Nick.

Reply via email to