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 3rd January 2015
kerasi kerasi is offline
Fdisk Soldier
 
Join Date: Mar 2013
Location: Germany
Posts: 54
Thanked 0 Times in 0 Posts
Default upgrade current

Hello

i will upgrade my current

Code:
# uname -a
OpenBSD cray.my.domain 5.6 GENERIC.MP#692 amd64
i have done this steps i hope it is ok so

Code:
mkdir ~/upgradefiles ; cd ~/upgradefiles
ftp ftp://openbsd.cs.fau.de
Code:
cd pub/OpenBSD/snapshots/amd64
prompt
mget SHA*
mget bsd*
mget *.tgz
cksum -a sha256 *

then i have to do
Code:
rm /obsd
ln /bsd /obsd && cp bsd.mp /bsd
cp bsd.rd /
but i dont have this obsd

Code:
tar -C / -xzphf xserv55.tgz
tar -C / -xzphf xfont55.tgz
tar -C / -xzphf xshare55.tgz
tar -C / -xzphf xbase55.tgz
tar -C / -xzphf game55.tgz
tar -C / -xzphf comp55.tgz
tar -C / -xzphf man55.tgz
tar -C / -xzphf base55.tgz
Code:
sysmerge
is that ok so?
Reply With Quote
  #2   (View Single Post)  
Old 3rd January 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 4,489
Thanked 214 Times in 189 Posts
Default

Do not perform a "manual" upgrade (unpacking tarballs yourself on a running OpenBSD system) if you have console access to the computer being upgraded. The supported best practice is to boot the new RAMDISK kernel and run its upgrade script.

Here are the steps I recommend.
  1. Back up your system, so that it can be recovered in the event of a problem with the new snapshot. (See my comment in this thread.)
  2. Read the Following -current FAQ, making note of any manual steps you must perform before or after running the upgrade script.
  3. Optional: In addition to the mandatory system backup mentioned in Step 1, you can make copies of your existing kernels in the event they assist with recovery. You can select one of them to boot from at boot> which may be helpful.

    # mkdir /backup.kernels ; cp /bsd* /backup.kernels
  4. Obtain the new RAMDISK kernel bsd.rd and the signed checksum file SHA256.sig from your nearby OpenBSD mirror.

    $ ftp http://<mirror>/pub/OpenBSD/snapshots/<arch>/bsd.rd
    $ ftp http://<mirror>/pub/OpenBSD/snapshots/<arch>/SHA256.sig
  5. Verify the RAMDISK kernel's data and signature. At this time, new snapshots are being built as "5.7-beta" and filesets are being named with *57.tgz. Use the matching public key. For guidance, see signify(1).

    $ signify -C -p /etc/signify/openbsd-57-base.pub -x SHA256.sig bsd.rd
  6. Move the tested ramdisk kernel to your root directory, reboot, and select it at the boot prompt.

    # mv bsd.rd /
    # shutdown -r now
    .
    .
    boot> bsd.rd
  7. At the "(I)nstall, (U)pgrade, (A)utointall or (S)hell?" prompt, reply with "u".
  8. Select new snapshot kernels and filesets from the same mirror.
  9. After rebooting, run sysmerge(8) as the script instructs.

Last edited by jggimi; 3rd January 2015 at 05:48 PM. Reason: typos, clarity, corrected links
Reply With Quote
  #3   (View Single Post)  
Old 3rd January 2015
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,109
Thanked 190 Times in 160 Posts
Default

kerasi, I'm going to reiterate jggimi's first point by emphasizing again the importance of backing up critical data. As a newcomer to OpenBSD, you will undoubtedly make mistakes. Everyone new to an unfamiliar to a new environment will. Save yourself the agony of losing what can't be replaced by backing it up now.

The OpenBSD community is small, & much responsibility is placed on its users to pro-actively learn how to use it. Studying the official FAQ is not just a platitude, it is a requirement.
Reply With Quote
  #4   (View Single Post)  
Old 3rd January 2015
ibara's Avatar
ibara ibara is offline
BSDCan Attendee
 
Join Date: Jan 2014
Posts: 369
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by kerasi View Post
then i have to do
Code:
rm /obsd
ln /bsd /obsd && cp bsd.mp /bsd
cp bsd.rd /
but i dont have this obsd
You wouldn't if this is your first time doing this. FWIW, using rm -f /obsd will kill the ENOENT. You might also consider keeping bsd.sp as /bsd.sp. Sometimes it's useful for debugging purposes.

Quote:
Originally Posted by kerasi View Post
is that ok so?
I don't remember if I use the h flag or not in the tar command but yes it's generally fine to do though I only tend to do this when upgrading from one release to another and not from -current to a newer -current. The booting off the new /bsd.rd method as jggimi recommended is much more likely to prevent mistakes and is generally easier to get support from. It also takes are of all the signature checking for you which is a nice plus. Until you're really used to OpenBSD, stick to the /bsd.rd method.
Reply With Quote
  #5   (View Single Post)  
Old 4th January 2015
kerasi kerasi is offline
Fdisk Soldier
 
Join Date: Mar 2013
Location: Germany
Posts: 54
Thanked 0 Times in 0 Posts
Default

Hi

I think upgrade is for me to difficult, how can i save my home folder?
What is the code for that?

Then i will burn a new cd with new snapshot
Reply With Quote
  #6   (View Single Post)  
Old 4th January 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 4,489
Thanked 214 Times in 189 Posts
Default

FAQ 14.10 shows an example of using dump(8) and restore(8) to backup and then restore a complete system with a tape device. Read about the -f option to dump/restore filesystems with other special devices, files, and standard input/output.

FAQ 10.2 shows examples of using dump(8)/restore(8) or tar(1) to copy a filesystem.

If the upgrade script is too difficult -- do not attempt unpacking of filesets on a running system as you had originally intended. Not only is the actual process much more complicated than upgrading by script, it is possible new commands will not run with the old kernel, or old commands will not run with the new kernel.
Reply With Quote
  #7   (View Single Post)  
Old 4th January 2015
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 3,355
Thanked 182 Times in 149 Posts
Default

If you have an USB stick that is large enough to save the contents of your home directory you could have a look at Using rsync to synchronize or mirror your home directory files to an USB stick
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #8   (View Single Post)  
Old 11th January 2015
kerasi kerasi is offline
Fdisk Soldier
 
Join Date: Mar 2013
Location: Germany
Posts: 54
Thanked 0 Times in 0 Posts
Default

hello

i have a USB Transcend StoreJet 25M3 1GB, i will save my home directory files there.
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
upgrade from 4.8 to 5.3 polken OpenBSD Installation and Upgrading 6 30th May 2013 05:41 AM
Keyboard layout lost after upgrade to -current sepuku OpenBSD General 28 23rd September 2011 08:37 PM
OpenBSD4.5 current to current... valorisa OpenBSD Installation and Upgrading 7 6th June 2009 09:26 AM
How do I upgrade? wubrgamer FreeBSD Ports and Packages 2 27th August 2008 07:18 PM


All times are GMT. The time now is 08:58 AM.


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