DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 24th May 2018
mefisto mefisto is offline
Fdisk Soldier
 
Join Date: Sep 2017
Posts: 46
Default OpenBSD quit booting

As the tile says. This is OpneBSD 6.3. The screen shows:
Code:
Loading . . . . . .
probing: pc0 mem[630k 3061M 1024M a20=on]
disk: hd0+
>> OpenBSD/amd64 BOOT 3.34
boot>
booting hda0:/bsd [several numbers separated by + I cannot read so quickly]
entry point at 0x1000158
There was no unclean shutdown, power failure, or any other unusual condition that I could observe. There is also no problem with the single hard drive.

I can boot /bsd.rd

Any help would be appreciated.

Kindest regards,

M

Last edited by ocicat; 24th May 2018 at 09:54 PM. Reason: Please use [code] & [/code] tags when posting console output.
Reply With Quote
  #2   (View Single Post)  
Old 24th May 2018
GarryR's Avatar
GarryR GarryR is offline
Real Name: Garry Ricketson
Spam Deminer
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 254
Default

Quote:
I can boot /bsd.rd
Then can you get a compete 'dmesg' report and paste it into code boxes here ?
There really is not enough details to guess at this.
__________________
My best friends are parrots
Reply With Quote
  #3   (View Single Post)  
Old 25th May 2018
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,238
Default

The symptom you are showing is a failure of a GENERIC or GENERIC.MP kernel to boot, cause unknown. Since you can boot /bsd.rd, then it is possible you may be able circumvent the problem and recover.

If your /bsd image is the GENERIC.MP kernel, then there should be a uniprocessor GENERIC kernel file installed in your root directory, named /bsd.sp. If so, try booting it, and see if you get the same symptom, or if you are able to boot without error.

If you are able to run the /bsd.sp uniprocessor kernel but not the multiprocessor kernel, then perhaps the /bsd kernel file is to blame. OpenBSD re-links and replaces this kernel file each and every boot sequence. The prior kernel will be stored in /bsd.booted.
Reply With Quote
  #4   (View Single Post)  
Old 25th May 2018
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,238
Default

Posting a follow-up to be sure these are conducted in the least disruptive order.
  1. Attempt to boot the /bsd.booted kernel. If this successfully boots, then you will know that there is an error in the /bsd kernel file. The kernel rebuild process should successfully recreate a /bsd kernel file, and this should resolve the problem.
  2. If the /bsd.booted kernel does not boot, THEN try the /bsd.sp kernel file if your computer has multiple cores or multiple threads. This is the uniprocessor kernel, as noted in my first reply.
If your computer is a uniprocessor (not multi-core, not multi-thread) then the /bsd kernel file will be GENERIC instead of GENERIC.MP, and there will be a /bsd.mp file in the root directory instead of a /bsd.sp file. You may attempt to boot this /bsd.mp kernel file in the event /bsd.booted and /bsd both fail to boot.
Reply With Quote
  #5   (View Single Post)  
Old 25th May 2018
mefisto mefisto is offline
Fdisk Soldier
 
Join Date: Sep 2017
Posts: 46
Default

Hi GarryR,

first, thank you for a reply. Since I can boot both /bsd.rd and /bsd.sp, see my response to jggimi below, I can certainly post the dmesg. However, before I pollute the thread, what is to be gained? Since the system boots, there should be no anomaly there, should it?

Hi jggimi,

thank you for the reply. The system does boot both /bsd.rd and /bsd.sp, but does not boot /bsd.booted and/or /bsd, with the same symptoms as described in my first post. Likewise, /bsd.mp does not boot with message: "No such file or directory". And, indeed, the file is not present, although I would think that such file should be present because the CPU is a two-core unit (T2370). Or is the /bsd really a copy of /bsd.mp?

So, what do I do now?

Kindest regards,

M
Reply With Quote
  #6   (View Single Post)  
Old 25th May 2018
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,238
Default

The kernel file /bsd is the default kernel, and will either be GENERIC or GENERIC.MP, depending on the number of cpu(4) devices discovered during installation.
  • On a uniprocessor, the file /bsd is GENERIC, and the GENERIC.MP kernel is stored as /bsd.mp
  • On a multiprocessor, the file /bsd is GENERIC.MP, and the GENERIC kernel is stored in /bsd.sp
For reasons unknown, either your GENERIC.MP kernel was damaged, or, your computer is no longer physically able to boot the GENERIC.MP kernel.
Quote:
So, what do I do now?
Obtain a copy of the 6.3 GENERIC.MP kernel for your architecture, from your installation media or from a nearby mirror. If you were running 6.3-release, its kernel is available from http://<your nearby mirror>/pub/OpenBSD/6.3/<your architecture>/bsd.mp or, a recent -current kernel can be obtained from http://<your nearby mirror>/pub/OpenBSD/snapshots/<your architecture>/bsd.mp.

If you copy the appropriate bsd.mp file into your root directory as /bsd, it will be the default kernel loaded at boot time.

If that GENERIC.MP kernel boots, you will know that the problem was caused by a local problem with your kernel files, and is not a problem with your hardware.

If you were running -release plus binary patches obtained through the syspatch(8) utility, I recomend reverting all patches (-R) then reinstalling them to be sure you have a correctly patched kernel.
Reply With Quote
  #7   (View Single Post)  
Old 25th May 2018
mefisto mefisto is offline
Fdisk Soldier
 
Join Date: Sep 2017
Posts: 46
Default

Hi jggimi,

thank you for your help. I have downloaded the bsd.mp, then:
Code:
syspatch -R
The patches were uninstalled with a message "Relinking to create unique kernel . . . failed!" I attributed it to the problem with the kernel, so I continued:
Code:
rm bsd.booted
rm bsd
mv bsd.mp bsd
I shut down the machine and upon restart, the machine booted. Thus:
Code:
syspatch
The patches were installed with a message "Relinking to create unique kernel . . . failed!" Now, I could not ignore it, and eventually found that the relink.log complains of nonexistent kernel.SHA256, which was partially true because the /var/db contains a file kernel.SHA256 with 0 size.

I cannot find any source how to re-create the file. Any more help, please?

Kindest regards,

M
Reply With Quote
  #8   (View Single Post)  
Old 25th May 2018
mefisto mefisto is offline
Fdisk Soldier
 
Join Date: Sep 2017
Posts: 46
Default

O.K., I am officially an idiot:
Code:
sha256 -h /var/db/kernel.SHA256 /bsd
Thank you very much jggimi, you are awesome.

There is still a question - is there a way to find out what caused the problem?

Kindest regards,

M
Reply With Quote
  #9   (View Single Post)  
Old 25th May 2018
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,238
Default

I would not consider you an idiot. Kernel relinking failed at some point. You might find an indication of the cause in /var/log/messages*.
Reply With Quote
Old 25th May 2018
mefisto mefisto is offline
Fdisk Soldier
 
Join Date: Sep 2017
Posts: 46
Default

Hi jggimi,

The idiot comment was in regards to the kernel.SHA256 issue. Not that there are no other reasons.

And, you are, of course, correct again. I looked through the /var/log/messages and, indeed, the re-link failure was what cause the boot to abort. The kernel.SHA256 file still existed, but was corrupted to make its size 0.

Once again, thank you.

Kindest regards,

M
Reply With Quote
Old 25th May 2018
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,238
Default

I'll guess that you may have powered down while the relinking process was still in progress. But that is not necessarily idiotic. Discovering the hash failure and recreating (or deleting) the hash file is the hallmark of an astute, self-supporting admin.

You owe yourself a beer.
Reply With Quote
Old 25th May 2018
mefisto mefisto is offline
Fdisk Soldier
 
Join Date: Sep 2017
Posts: 46
Default

Hi jggimi,

Well, studying the /var/log/messages, the re-link failed, then the system issued reboot and so on. It really is a mystery.

With all due respect, I would have never figured it out without your help/hints, so if someone is owed a beer, it is you.

Kindest regards,

M
Reply With Quote
Old 25th May 2018
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,290
Default

Quote:
Originally Posted by mefisto View Post
...I can certainly post the dmesg. However, before I pollute the thread, what is to be gained? Since the system boots, there should be no anomaly there, should it?
dmesg(8) output gives the kernel’s complete understanding of the hardware environment. From a troubleshooting standpoint, it answers many questions both circulating in people’s minds along with questions which have not occurred in anyone’s mind yet.

Many threads on these forums would be solved more quickly is the original poster would provide dmesg(8) output at the very beginning.
Reply With Quote
Old 26th May 2018
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,238
Default

Quote:
Originally Posted by ocicat View Post
... it answers many questions ...
True. I had to guess the possibility of an MP architecture, and did not know if this was -release, -release+patches, -stable, or -current.
Reply With Quote
Old 27th May 2018
mefisto mefisto is offline
Fdisk Soldier
 
Join Date: Sep 2017
Posts: 46
Default

Hi ocicat, jggimi,

if I understand correctly, the dmesg, does not necessarily identify the problem, but provides information helpful for troubleshooting, correct?

How do you make the dmesg(8) point to the man page?

Kindest regards,

M
Reply With Quote
Old 27th May 2018
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,290
Default

Quote:
Originally Posted by mefisto View Post
if I understand correctly, the dmesg, does not necessarily identify the problem, but provides information helpful for troubleshooting, correct?
Correct.
Quote:
How do you make the dmesg(8) point to the man page?
See the FAQ page, and look for the oman tag.
Reply With Quote
Old 28th May 2018
mefisto mefisto is offline
Fdisk Soldier
 
Join Date: Sep 2017
Posts: 46
Default

Hi ocicat,

thank you.

Kindest regards,

M
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to guarantee booting without manual intervention on an OpenBSD router mamalos OpenBSD General 11 29th January 2016 03:05 PM
OpenBSD Native EFI booting coming to OpenBSD ocicat News 10 17th September 2015 01:25 PM
Dual booting encrypted OpenBSD with Windows e1-531g OpenBSD General 2 16th August 2015 02:06 PM
dual booting OpenBSD and NetBSD daemonfowl NetBSD Installation and Upgrading 1 21st February 2012 01:06 PM
Beep or visual signal after booting OpenBSD/sparc64 hansivers OpenBSD General 10 20th September 2009 04:08 PM


All times are GMT. The time now is 01:42 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick