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 5th October 2017
bsd007's Avatar
bsd007 bsd007 is offline
Always learning
 
Join Date: Sep 2014
Posts: 242
Default New to OpenBSD ...How to update system ?

New to OpenBSD ...What is equivalent of apt-get update and apt-get upgrade in OpenBSD?
Reply With Quote
  #2   (View Single Post)  
Old 6th October 2017
TronDD TronDD is offline
Spam Deminer
 
Join Date: Sep 2014
Posts: 304
Default

EDIT: I see 6.2 in your sig, are you following snapshots? Then read my upgrading section.

For release and stable:

Understand that OpenBSD does not do rolling releases like Linux distros. The focus is on a stable release plus security patches. Also OpenBSD does not package the abse OS in the same way as 3rd part ports applications. Unlike Linux where everything is available as package.

So you have two processes to learn. Security updates to your running system, and updating to a new release. And within that, you have the base system and ports which are maintained separately.

To start off simply, apply security updates to the base system with syspatch.
'man syspatch' and
https://www.openbsd.org/faq/faq10.html#Patches

OpenBSD does not have the resources to package security updates to ports. You can either build them yourself or use a 3rd party such as m:tier.
https://stable.mtier.org/

Upgrading to a new releaes is a similar process as the installation. The easist way to download the new release's bsd.rd file to /, reboot and at the boot> prompt, type 'b bsd.rd' to boot the new installer and choose [U]pgrade. Then 'sysmerge' if needed and 'pkg_add -u'.

The 6.2 release is right around the corner so we can get into those details if you need them then.

Meanwhile, read the man pages for pkg_add, pkg_delete, pkg_info.
Reply With Quote
  #3   (View Single Post)  
Old 6th October 2017
bsd007's Avatar
bsd007 bsd007 is offline
Always learning
 
Join Date: Sep 2014
Posts: 242
Default

Thanks for replying.

What if I never install anything from ports ?

Then I am left with the base system and binary packages.

Kindly give me the commands which will update the base

system and the binary packages.
Reply With Quote
  #4   (View Single Post)  
Old 6th October 2017
hitest's Avatar
hitest hitest is offline
Real Name: George Nielsen
VPN Cryptographer
 
Join Date: Sep 2008
Location: B.C., Canada
Posts: 373
Default

Quote:
Originally Posted by bsd007 View Post
Kindly give me the commands which will update the base
Once you have set-up /etc/installurl you can update the base by running:

doas syspatch

You can run doas syspatch as a regular user ( see man doas).
__________________
hitest
Reply With Quote
  #5   (View Single Post)  
Old 6th October 2017
bsd007's Avatar
bsd007 bsd007 is offline
Always learning
 
Join Date: Sep 2014
Posts: 242
Default

Quote:
Originally Posted by hitest View Post
Once you have set-up /etc/installurl you can update the base by running:

doas syspatch

You can run doas syspatch as a regular user ( see man doas).
I am getting this.

Code:
$ doas syspatch 
doas: doas is not enabled, /etc/doas.conf: No such file or directory
Reply With Quote
  #6   (View Single Post)  
Old 6th October 2017
hitest's Avatar
hitest hitest is offline
Real Name: George Nielsen
VPN Cryptographer
 
Join Date: Sep 2008
Location: B.C., Canada
Posts: 373
Default

Quote:
Originally Posted by bsd007 View Post
I am getting this.

Code:
$ doas syspatch 
doas: doas is not enabled, /etc/doas.conf: No such file or directory
You need to create /etc/doas.conf

The contents of /etc/doas.conf should be:

permit yourusername

For example my /etc/doas.conf is:

permit hitest

Save and exit. Then when you run doas syspatch with a properly configured /etc/installurl it will update your system.
__________________
hitest
Reply With Quote
  #7   (View Single Post)  
Old 6th October 2017
bsd007's Avatar
bsd007 bsd007 is offline
Always learning
 
Join Date: Sep 2014
Posts: 242
Default

Quote:
Originally Posted by hitest View Post
You need to create /etc/doas.conf

The contents of /etc/doas.conf should be:

permit yourusername

For example my /etc/doas.conf is:

permit hitest

Save and exit. Then when you run doas syspatch with a properly configured /etc/installurl it will update your system.
I have added myself to /etc/doas.conf

Code:
$ cat /etc/doas.conf                                                           
permit open
But now when I try to run doas syspatch its still asking for password. Is this normal ?

Code:
$ doas syspatch       
doas (open@open.my.domain) password:
After entering the password I get this

Code:
syspatch: invalid URL configured in /etc/installurl
Please help me set /etc/installurl.
Reply With Quote
  #8   (View Single Post)  
Old 6th October 2017
TronDD TronDD is offline
Spam Deminer
 
Join Date: Sep 2014
Posts: 304
Default

Quote:
Originally Posted by bsd007 View Post
But now when I try to run doas syspatch its still asking for password. Is this normal ?
Yes, as configured.
man doas.conf for options.

Quote:
After entering the password I get this

Code:
syspatch: invalid URL configured in /etc/installurl
Please help me set /etc/installurl.
Choose a mirror from https://www.openbsd.org/ftp.html and 'man installurl'
Reply With Quote
  #9   (View Single Post)  
Old 6th October 2017
bsd007's Avatar
bsd007 bsd007 is offline
Always learning
 
Join Date: Sep 2014
Posts: 242
Default

Quote:
Originally Posted by TronDD View Post
Choose a mirror from https://www.openbsd.org/ftp.html and 'man installurl'
Code:
# cat /etc/installurl                                                          
https://ftp.yzu.edu.tw/pub/OpenBSD/
After setting the above url I am getting this

Code:
$ doas syspatch 
doas (open@open.my.domain) password: 
syspatch: invalid URL configured in /etc/installurl
Code:
$ uname -a
OpenBSD open.my.domain 6.2 GENERIC.MP#134 amd64
Reply With Quote
Old 6th October 2017
hitest's Avatar
hitest hitest is offline
Real Name: George Nielsen
VPN Cryptographer
 
Join Date: Sep 2008
Location: B.C., Canada
Posts: 373
Default

Quote:
Originally Posted by bsd007 View Post
Code:
# cat /etc/installurl                                                          
https://ftp.yzu.edu.tw/pub/OpenBSD/
After setting the above url I am getting this

Code:
$ doas syspatch 
doas (open@open.my.domain) password: 
syspatch: invalid URL configured in /etc/installurl
Code:
$ uname -a
OpenBSD open.my.domain 6.2 GENERIC.MP#134 amd64
Here's my /etc/installurl

Code:
$ cat /etc/installurl
https://mirrors.sonic.net/pub/OpenBSD
__________________
hitest
Reply With Quote
Old 6th October 2017
bsd007's Avatar
bsd007 bsd007 is offline
Always learning
 
Join Date: Sep 2014
Posts: 242
Default

Code:
# cat /etc/installurl   
https://ftp.openbsd.org/pub/OpenBSD
After modifying the installurl file I got

Code:
$ doas syspatch
doas (open@open.my.domain) password:
As you can see the command just ended like that. Is that normal ?
Reply With Quote
Old 6th October 2017
bsd007's Avatar
bsd007 bsd007 is offline
Always learning
 
Join Date: Sep 2014
Posts: 242
Default

I just added https://mirrors.sonic.net/pub/OpenBSD but same thing

Code:
$ doas syspatch 
doas (open@open.my.domain) password: 
$
Reply With Quote
Old 6th October 2017
hitest's Avatar
hitest hitest is offline
Real Name: George Nielsen
VPN Cryptographer
 
Join Date: Sep 2008
Location: B.C., Canada
Posts: 373
Default

Quote:
Originally Posted by bsd007 View Post
I just added https://mirrors.sonic.net/pub/OpenBSD but same thing

Code:
$ doas syspatch 
doas (open@open.my.domain) password: 
$
After you run doas syspatch it will prompt you for your regular user password. Type in your user password and press enter. That should run syspatch

P.S. Do you have a working internet connection on your openbsd unit?
__________________
hitest

Last edited by hitest; 6th October 2017 at 01:58 AM. Reason: addition
Reply With Quote
Old 6th October 2017
bsd007's Avatar
bsd007 bsd007 is offline
Always learning
 
Join Date: Sep 2014
Posts: 242
Default

Quote:
Originally Posted by hitest View Post
After you run doas syspatch it will prompt you for your regular user password. Type in your user password and press enter. That should run syspatch

P.S. Do you have a working internet connection on your openbsd unit?
Yes my Internet is working fine. Do you think because I am using 6.2 there are no updates available yet ?
Reply With Quote
Old 6th October 2017
TronDD TronDD is offline
Spam Deminer
 
Join Date: Sep 2014
Posts: 304
Default

Quote:
Originally Posted by bsd007 View Post
Yes my Internet is working fine. Do you think because I am using 6.2 there are no updates available yet ?
Yes. syspatch will not output anything if there was nothing to do. 6.2 is not released yet, you are running a snapshot. syspatch is for applying security patches to an installation of a release.

If you want to track snapshots, it's a different process as I stated in my first post.
Reply With Quote
Old 6th October 2017
bsd007's Avatar
bsd007 bsd007 is offline
Always learning
 
Join Date: Sep 2014
Posts: 242
Default

Quote:
Originally Posted by TronDD View Post
Yes. syspatch will not output anything if there was nothing to do. 6.2 is not released yet, you are running a snapshot. syspatch is for applying security patches to an installation of a release.

If you want to track snapshots, it's a different process as I stated in my first post.
So my question is like in Linux if you are running a beta and keep on updating you will end up with a stable system when the release day arrives.

Is it same with OpenBSD ?
Reply With Quote
Old 6th October 2017
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

Welcome back.

No, OpenBSD's development and release process is not the same as Linux. The process is outlined in the OpenBSD FAQ, here.

The OpenBSD FAQ is a key resource for new users. Spending time with it will help you understand more about this OS.
Reply With Quote
Old 6th October 2017
bsd007's Avatar
bsd007 bsd007 is offline
Always learning
 
Join Date: Sep 2014
Posts: 242
Default

Quote:
Originally Posted by jggimi View Post
Hello, and welcome.

No, OpenBSD's development and release process is not the same as Linux. The process is outlined in the OpenBSD FAQ, here.

The OpenBSD FAQ is a key resource for new users. Spending time with it will help you understand more about this OS.
From the link you gave me

Quote:
-current: The -current branch is where active development work is done. Every six months, -current is tagged and becomes the next -release.
That is what I wanted to know. If I continue with the current it will become the next -release within six months.
Reply With Quote
Old 6th October 2017
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

No. OpenBSD -current is a constantly moving target, as *ALL* development occurs on -current, including the preparation for -release, which, for simplicity, can be considered a very carefully prepared snapshot, that is published separately from -current, and once published never changes.


As it happens, 6.2-release has been "tagged" in CVS just this week. So, any particular snapshot of -current you might be running right now is either older than -release, or newer than -release. Not -release, as it is unpublished and will be published separately.

And as you update from snapshot to snapshot, your system will be newer and newer than 6.2-release.
Reply With Quote
Old 6th October 2017
bsd007's Avatar
bsd007 bsd007 is offline
Always learning
 
Join Date: Sep 2014
Posts: 242
Default

Quote:
Originally Posted by jggimi View Post
No. OpenBSD -current is a constantly moving target, as *ALL* development occurs on -current, including the preparation for -release, which, for simplicity, can be considered a very carefully prepared snapshot, that is published separately from -current, and once published never changes.


As it happens, 6.2-release has been "tagged" in CVS just this week. So, any particular snapshot of -current you might be running right now is either older than -release, or newer than -release. Not -release, as it is unpublished and will be published separately.

And as you update from snapshot to snapshot, your system will be newer and newer than 6.2-release.
Got it.

So if I use 6.2 and do snapshot to snapshot is security an issue ?
The main reason I am using OpenBSD is security.
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
Most software already has a “golden key” backdoor: the system update J65nko News 0 27th February 2016 10:31 PM
Installed OpenBSD 5.7.Need update help Itproman OpenBSD Installation and Upgrading 18 19th August 2015 02:57 PM
Ran make update and the system decided to install Gnome? sparky NetBSD Package System (pkgsrc) 6 22nd April 2013 02:53 PM
Clonezilla Live clone system update J65nko News 0 28th September 2011 05:53 PM
how update openbsd 4.8 craze OpenBSD Installation and Upgrading 6 6th March 2011 03:20 PM


All times are GMT. The time now is 06:38 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