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 11th July 2015
mfaridi's Avatar
mfaridi mfaridi is offline
Spam Deminer
 
Join Date: May 2008
Location: Afghanistan
Posts: 320
Default I install OpenBSD 5.7-beta (GENERIC.MP) #852 and want upgrade to release

I install
Code:
OpenBSD 5.7-beta (GENERIC.MP) #852
and I want upgrade it to Release ,
which way is better and easy
__________________
http://www.mfaridi.com
First site about FreeBSD and OpenBSD in persian or Farsi.
Reply With Quote
  #2   (View Single Post)  
Old 11th July 2015
ibara ibara is offline
OpenBSD language porter
 
Join Date: Jan 2014
Posts: 783
Default

Code:
$ su
# cp /bsd.rd /obsd.rd
# cd /
# ftp http://<your-openbsd-mirror>/pub/OpenBSD/5.7/`machine -a`/bsd.rd
<reboot>
boot> /bsd.rd
Follow the installer. I suggest doing a new install at this point.
Reply With Quote
  #3   (View Single Post)  
Old 11th July 2015
mfaridi's Avatar
mfaridi mfaridi is offline
Spam Deminer
 
Join Date: May 2008
Location: Afghanistan
Posts: 320
Default

what I must do about install media ?
__________________
http://www.mfaridi.com
First site about FreeBSD and OpenBSD in persian or Farsi.
Reply With Quote
  #4   (View Single Post)  
Old 11th July 2015
ibara ibara is offline
OpenBSD language porter
 
Join Date: Jan 2014
Posts: 783
Default

You do nothing? That's what getting sets via http is for.
Reply With Quote
  #5   (View Single Post)  
Old 11th July 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

The instructions from ibara are to boot the -release RAMDISK kernel, bsd.rd. This is the installation/upgrade/rescue system which is included with installation media. and is run when you boot installation media.

If you follow his instructions, you would not need separate installation media, because you would be able to complete your installation from the network, without separate bootable media.

You can still follow his instructions and select filesets from the network, or from other media, as you desire. Or, you can skip his instructions and boot the installation media. You have many choices. All should work.

Note that ibara recommended a fresh installation rather than an upgrade. One reason for the recommendation may have been due to the minimal information provided. Kernel build numbers are not tracked or archived, and vary by architecture, also. The first few lines from a dmesg(8) or the output of $ sysctl kern.version, which is the same thing, would have been clearer.
Reply With Quote
  #6   (View Single Post)  
Old 12th July 2015
bsd-keith bsd-keith is offline
Real Name: Keith
Open Source Software user
 
Join Date: Jun 2014
Location: Surrey/Hants Border, England
Posts: 343
Default

I'd be tempted to grab the install disk/image & do an 'upgrade' - would that be wrong?
__________________
Linux since 1999, & also a BSD user.
Reply With Quote
  #7   (View Single Post)  
Old 12th July 2015
mfaridi's Avatar
mfaridi mfaridi is offline
Spam Deminer
 
Join Date: May 2008
Location: Afghanistan
Posts: 320
Default

last night I try upgrade beta to release and boot with bsd.rd and start installation and I can not continue installation and I reboot machine ,
but today when I want boot system and sart /bsd.rd , I see this error
please see screenshot
I want continue upgrade process
Attached Images
File Type: png Screenshot from 2015-07-12 14:54:29.png (38.8 KB, 71 views)
__________________
http://www.mfaridi.com
First site about FreeBSD and OpenBSD in persian or Farsi.
Reply With Quote
  #8   (View Single Post)  
Old 12th July 2015
blackhole's Avatar
blackhole blackhole is offline
Spam Deminer
 
Join Date: Mar 2014
Posts: 314
Default

The error is defined here: http://www.openbsd.org/cgi-bin/man.c...ec=8&arch=i386

"I cannot continue installation" is not helpful. Why did you abort the installation and reboot?

OpenBSD is not supported by virtualbox. I have had better luck with vmware, but recommend that you stop wasting time and just install on bare metal.
Reply With Quote
  #9   (View Single Post)  
Old 12th July 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Quote:
Originally Posted by bsd-keith View Post
I'd be tempted to grab the install disk/image & do an 'upgrade' - would that be wrong?
I've answered here.
Reply With Quote
Old 12th July 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Quote:
Originally Posted by mfaridi View Post
...I can not continue installation and I reboot machine ,
but today when I want boot system and sart /bsd.rd , I see this error...
Quote:
Originally Posted by cynwulf View Post
Why did you abort the installation and reboot?
cynwulf asks a great question. You have damaged your system by stopping your upgrade. The first and second stage bootloaders are no longer linked.

The i386 boot process has multiple steps.
  1. The Master Boot Record (MBR) is loaded by the BIOS.
  2. The MBR loads the Partition Boot Record (PBR), which for OpenBSD is the first stage bootloader, biosboot(8).
  3. The first stage bootloader, biosboot, loads the larger, second stage bootloader, /boot, based on its prior knowledge of the file's location on hard drive.
  4. The second stage bootloader issues the boot> prompt, and selects and runs an OpenBSD kernel.
In order for the first stage bootloader to load the second stage bootloader, it must have knowledge of the location of the file on hard drive. This information is provided when the first stage bootloader is installed in the PBR by installboot(8). If the second stage bootloader is deleted or moved, the first stage bootloader will not find it, and will produce the "ERR M" message you have seen.

You have this problem because the /boot file changed locations on disk, but the upgrade script was stopped before installboot(8) was executed.

You can fix this, by booting installation media and either running the upgrade again and allow it to complete, or running the installboot(8) program manually.

Last edited by jggimi; 12th July 2015 at 12:13 PM. Reason: clarity
Reply With Quote
Old 12th July 2015
mfaridi's Avatar
mfaridi mfaridi is offline
Spam Deminer
 
Join Date: May 2008
Location: Afghanistan
Posts: 320
Default

Quote:
Originally Posted by jggimi View Post
cynwulf asks a great question. You have damaged your system by stopping your upgrade. The first and second stage bootloaders are no longer linked.

The i386 boot process has multiple steps.
  1. The Master Boot Record (MBR) is loaded by the BIOS.
  2. The MBR loads the Partition Boot Record (PBR), which for OpenBSD is the first stage bootloader, biosboot(8).
  3. The first stage bootloader, biosboot, loads the larger, second stage bootloader, /boot, based on its prior knowledge of the file's location on hard drive.
  4. The second stage bootloader issues the boot> prompt, and selects and runs an OpenBSD kernel.
In order for the first stage bootloader to load the second stage bootloader, it must have knowledge of the location of the file on hard drive. This information is provided when the first stage bootloader is installed in the PBR by installboot(8). If the second stage bootloader is deleted or moved, the first stage bootloader will not find it, and will produce the "ERR M" message you have seen.

You have this problem because the /boot file changed locations on disk, but the upgrade script was stopped before installboot(8) was executed.

You can fix this, by booting installation media and either running the upgrade again and allow it to complete, or running the installboot(8) program manually.
when I start with installation media and I choose upgrade option , I see this
Attached Images
File Type: png Screenshot from 2015-07-12 16:54:41.png (32.0 KB, 75 views)
__________________
http://www.mfaridi.com
First site about FreeBSD and OpenBSD in persian or Farsi.
Reply With Quote
Old 12th July 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

OK, then your root file system is more damaged than previously indicated in this thread.

That RAMDISK kernel has a shell. If you lack the skills to use that shell to inspect your root filesystem and make appropriate repairs, you will need to restore the system from a backup or reinstall it.
Reply With Quote
Old 12th July 2015
ibara ibara is offline
OpenBSD language porter
 
Join Date: Jan 2014
Posts: 783
Default

I know exactly where you stopped. You stopped after running disklabel (as in, you already chose to wipe the disk and disklabel did it for you) but before the newfs'ing. Therefore, it is as if you have no data on the disk whatsoever.

You need to reboot the media and use (I)nstall.
Reply With Quote
Old 12th July 2015
mfaridi's Avatar
mfaridi mfaridi is offline
Spam Deminer
 
Join Date: May 2008
Location: Afghanistan
Posts: 320
Default

thnaks all guys , I install 5.7 beta again and start upgrade it to release and everything go and i have OpenBSD 5.7 . during installation , I choose http for media installation and installer start download all packages and after reboot I have new OpenBSD
Thanks all guys again
__________________
http://www.mfaridi.com
First site about FreeBSD and OpenBSD in persian or Farsi.
Reply With Quote
Old 12th July 2015
mfaridi's Avatar
mfaridi mfaridi is offline
Spam Deminer
 
Join Date: May 2008
Location: Afghanistan
Posts: 320
Default

another question
If I have data on my HDD , during installation , what I must do ? I must choose whole drive or OpenBSD partition .?
I do not want lose my data
__________________
http://www.mfaridi.com
First site about FreeBSD and OpenBSD in persian or Farsi.
Reply With Quote
Old 12th July 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

What data? OpenBSD data, or data from another OS that shares the same disk drive? Your answer will make a difference, since you are referring to a question about the MBR partition reserved for OpenBSD's use. This is a separate from disklabel partitions and OpenBSD filesystems.

Architectures that use MBRs during boot have two layers of partitioning: a) MBR partitions, where we define a contiguous area reserved for all of OpenBSD, which may be the whole drive or a portion of the drive, and b) disklabel partitions, used within OpenBSD. Architectures that do not use MBRs only have disklabel partitions.

If you are referring to data stored within OpenBSD, you must back it up before reinstalling. Backup before reinstallation is critical. The installation of OpenBSD formats partitions you define, rendering any data in those sectors effectively erased.
A very technically skilled , expert administrator can ensure that pre-existing partitions are not overwritten during installation, and can then manually redefine these partitions and integrate them into the new system. But just like you, most people do not have this skill.
Upgrades do not format any partitions. The upgrade script copies kernels to the root directory and uses tar(1) to extract executables, libraries, scripts, and other OpenBSD files into their correct locations. User files in /home and data in /var is untouched. Administrative configurations files in /etc or /root are not revised. The admin must revise configuration files manually, or with sysmerge(8). Existing packages in /usr/local remain in place, and the supporting libraries they might use are not deleted. If there are no interface changes between the old and new versions of the OS, older packages will still work.

---

It is a best practice to ALWAYS back up your data, so that it can be restored if needed. Data losses can occur due to hardware or software issues, but more commonly, data loss occurs because we are people, and people make mistakes.
Reply With Quote
Old 12th July 2015
ibara ibara is offline
OpenBSD language porter
 
Join Date: Jan 2014
Posts: 783
Default

Quote:
Originally Posted by mfaridi View Post
thnaks all guys , I install 5.7 beta again and start upgrade it to release and everything go and i have OpenBSD 5.7 . during installation , I choose http for media installation and installer start download all packages and after reboot I have new OpenBSD
Thanks all guys again
Why did you start with 5.7-beta again? If you have an empty hard drive, it is best to start with your target.

Quote:
Originally Posted by mfaridi View Post
another question
If I have data on my HDD , during installation , what I must do ? I must choose whole drive or OpenBSD partition .?
I do not want lose my data
Questions about data need to be answered before starting an install, not after. As jggimi said, backups are best. A backup can be as simple as running
Code:
$ su
# cd /home
# tar -cz -f username.tgz username/
and copying the resulting tarball to an external drive, which you then extract back in place after the new install. I do this on my dev machines, because of how often I update my snapshots.

On my main work machine, I keep all the data I care about on an internal mSATA drive that I mount to /ssd. I don't touch that drive (which shows up as /dev/sd1c on my machine) during upgrades.

Those are options. Of course, data backup can be more complicated depending on your situation.

Quote:
Originally Posted by jggimi View Post
A very technically skilled , expert administrator can ensure that pre-existing partitions are not overwritten during installation, and can then manually redefine these partitions and integrate them into the new system. But just like you, most people do not have this skill.
There are also other ways of upgrading OpenBSD if this is your goal.
Reply With Quote
Old 12th July 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Even that ideal, "technically skilled" admin would, if he or she were being smart -- take a backup before beginning that complex exercise. Otherwise, with one typo in a command, that admin would be explaining why they lost data to someone who cared about it. It might be a personal platform, but even then, the admin would still be having an uncomfortable conversation about it with themselves.
Reply With Quote
Old 12th July 2015
mfaridi's Avatar
mfaridi mfaridi is offline
Spam Deminer
 
Join Date: May 2008
Location: Afghanistan
Posts: 320
Default

Thanks all guys. I have some pictures on my home folder.. I need way to keep my data and upgrade my system. For example if I have windows partition with data.. I want keep them and install OpenBSD
I start with beta. Because I want test upgrade way. OpenBSD is great OS
__________________
http://www.mfaridi.com
First site about FreeBSD and OpenBSD in persian or Farsi.
Reply With Quote
Old 12th July 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Quote:
Originally Posted by mfaridi View Post
For example if I have windows partition with data.. I want keep them and install OpenBSD
Please, mfaridi, please do not multiboot from a single disk drive.

You have not demonstrated you have the technical skills required to undertake this safely and successfully. If you attempt it, you are very likely to lose data, and damage one or both OSes.

Instead, please do this by acquire a second disk drive, or, a second computer. If you use a second drive, it can be as simple as an external USB drive.

Install OpenBSD in that second drive or completely separate system. You are less likely to destroy data on your Windows system through error, confusion, misunderstanding, or typo.
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
Fail to upgrade opencv on FreeBSD 8.3-RELEASE bsdnotbdsm FreeBSD Ports and Packages 0 29th April 2013 08:14 PM
Kernel freezes on boot after install (OpenBSD 5.0 release) grantwgmartin OpenBSD Installation and Upgrading 4 8th January 2012 09:43 AM
Best way to upgrade from -release to snapshot Carpetsmoker OpenBSD General 5 26th July 2009 08:51 PM
Upgrade to 7.1-RELEASE fails drl FreeBSD Installation and Upgrading 4 27th March 2009 09:39 PM
FreeBSD 6.2-RELEASE > 7.0-RELEASE Upgrade Marci FreeBSD Installation and Upgrading 2 23rd July 2008 02:10 PM


All times are GMT. The time now is 04:26 AM.


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