DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Installation and Upgrading

OpenBSD Installation and Upgrading Installing and upgrading OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 23rd December 2021
openletter openletter is offline
Real Name: Paul
New OpenBSD User
 
Join Date: Feb 2020
Posts: 23
Default Upgrading VPS from single core to multi-core isn't automatically recognized

I just noticed that when I upgrade my VPS from a 1 core to 2 core plan, OpenBSD does not automatically recognize the change.

I can see:

Code:
# sysctl hw.ncpu
hw.ncpu=1
# sysctl hw.ncpufound
 hw.ncpufound=2
# sysctl hw.ncpuonline
hw.ncpuonline=1
What would be the better way to configure the second core?

Note the ISP is Vultr and I installed from http using bsd.rd (as most excellently recommended by another forum user here).

Last edited by openletter; 23rd December 2021 at 12:18 AM. Reason: Forgot ncpuonline
Reply With Quote
  #2   (View Single Post)  
Old 23rd December 2021
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 8,000
Default

  • OpenBSD's GENERIC kernel is a single-processor configuration. The name of this kernel in installation media is "bsd".
  • OpenBSD's GENERIC.MP kernel is the multi-processor configuration, and the name of this kernel in installation media is "bsd.mp".
At install time, if the system is single-processor, the GENERIC "bsd" kernel is copied to the new root filesystem as "/bsd", the GENERIC.MP kernel "bsd.mp" is copied to the new root filesystem as "/bsd.mp".

At install time, if the system is multi-processor, the GENERIC "bsd" kernel is copied and renamed to the new root filesystem as "/bsd.sp" and stored in the event it needs to be used, while the GENERIC.MP "bsd.mp" kernel is copied and renamed to the new root filesystem as "/bsd", the name of the default kernel file.

You do not need to reinstall. You can rename these kernel files:
Code:
# cd /
# mv bsd bsd.sp
# mv bsd.mp bsd
Then re-enable randomly linked kernels (KARL) for the next boot with:
Code:
# sha256 -h /var/db/kernel.SHA256 /bsd
Reply With Quote
  #3   (View Single Post)  
Old 23rd December 2021
openletter openletter is offline
Real Name: Paul
New OpenBSD User
 
Join Date: Feb 2020
Posts: 23
Default

The only bsd files I have in / are /bsd, /bsd.booted, and /bsd.rd.


I did find elsewhere posts about /bsd.mp, but they were some years old and I wasn't clear if maybe things have changed?
Reply With Quote
  #4   (View Single Post)  
Old 23rd December 2021
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 8,000
Default

Then bsd.mp wasn't included during your initial install. You can try upgrading to 7.0 again, and pick up the file during that process, or, copy it from installation media.
Reply With Quote
  #5   (View Single Post)  
Old 23rd December 2021
openletter openletter is offline
Real Name: Paul
New OpenBSD User
 
Join Date: Feb 2020
Posts: 23
Default

During the reboot I got the message:
Code:
reorder_kernel: failed -- see /usr/share/relink/kernel/GENERIC.MP/relink.log
In the file:
Code:
# cat 
/usr/share/relink/kernel/GENERIC.MP/relink.log
(SHA256) /bsd: OK
make: don't know how to make newbsd
Stop in /usr/share/relink/kernel/GENERIC.MP
And now I have the following:
Code:
# sysctl hw.ncpu
hw.ncpu=2
# sysctl hw.ncpufound
 hw.ncpufound=2
# sysctl hw.ncpuonline
hw.ncpuonline=1
Reply With Quote
  #6   (View Single Post)  
Old 23rd December 2021
openletter openletter is offline
Real Name: Paul
New OpenBSD User
 
Join Date: Feb 2020
Posts: 23
Default

Okay, so I failed to read correctly. Apparently I ran the relink command before rebooting. Let met reinstall and try again, because now I still get the message with the log entry:
Code:
(SHA256) /bsd: OK
make: don't know how to make newbsd
Stop in /usr/share/relink/kernel/GENERIC.MP
Reply With Quote
  #7   (View Single Post)  
Old 23rd December 2021
openletter openletter is offline
Real Name: Paul
New OpenBSD User
 
Join Date: Feb 2020
Posts: 23
Default

I did a reinstall with the 2 core instance, and I noticed that it installed bsd.mp as the kernel (I then destroyed the instance).

I did an install on a single core instance and I noticed that it did not even give the option to install bsd.mp.

I upgraded the patches, rebooted, upgraded the instance, downloaded bsd.mp, followed the above instructions, and now I still get the message:
Code:
reorder_kernel: failed -- see /usr/share/relink/kernel/GENERIC.MP/relink.log
In the log file:
Code:
(SHA256) /bsd: OK
make: don't know how to make newbsd
Stop in /usr/share/relink/kernel/GENERIC.MP
Reply With Quote
  #8   (View Single Post)  
Old 23rd December 2021
openletter openletter is offline
Real Name: Paul
New OpenBSD User
 
Join Date: Feb 2020
Posts: 23
Default

I just noticed that the Vultr single core default install image uses bsd.mp kernel:
Code:
# ls /bsd*
/bsd    /bsd.booted  /bsd.rd    /bsd.sp
# strings /bsd | grep ^GENERIC.MP
GENERIC.MP#232
(BTW, not saying this is a good idea, just sharing an observation.)
Reply With Quote
  #9   (View Single Post)  
Old 23rd December 2021
openletter openletter is offline
Real Name: Paul
New OpenBSD User
 
Join Date: Feb 2020
Posts: 23
Default

I was able to safely get bsd.mp installed by booting into bsd.rd and selecting (U)pgrade.

When I got to the set selection, I could see [x] bsd.mp was there and later in the process it printed the message "Multiprocessor machine: using bsd.mp instead of bsd."

I am still stuck with hw.ncpuonline=1. I'm wondering if this has more to do with the security restrictions on Intel CPUs or hyper-threading that, frankly, I don't know enough about.
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
Help with *.core file? RJPugh FreeBSD General 1 18th December 2021 06:48 PM
PowerShell Core bsdun General software and network 3 17th May 2020 03:20 PM
openbsd 5.8 KDE core pawkolor OpenBSD General 3 26th August 2015 07:10 PM
OpenBSD OpenBSD 5.2 arrives with improved multi-core support J65nko News 0 2nd November 2012 01:19 PM
Single and Multi User Mode Logging chicago OpenBSD General 2 13th May 2011 06:51 PM


All times are GMT. The time now is 04:27 PM.


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