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 1st February 2012
delorean delorean is offline
New User
 
Join Date: Feb 2012
Posts: 7
Thanked 0 Times in 0 Posts
Default Big problems 4.9->5.0 with softRAID

Hi,

Im trying to make an upgrade to 4.9 -> 5.0 with softraid root filesystem and im having big problems.Anybody know how to do it ?¿?

Trying the upgrade with the CDrom, the bsd.rd loaded it hasn´t softraid support so it doesn´t detect the root Raid filesystem and it´s impossible to make the upgrade.

Im trying to compile the bsd kernel of 5.0 with softraid in other machine and then using this compiled kernel in the upgrade process following these steps, but im not sure if this will work.(obviously it´s not for an 3.7 version)

------------
If we did this, we'd run into trouble when we reboot (#3), because the generic kernel does not include RAID support. I'm assuming that you are running your OpenBSD 3.6 RAID system... so here's what we need to do:
1. Follow the OpenBSD upgrade guide and STOP when you "Place install files in a "good" location."
2. Download the OpenBSD 3.7 kernel source
3. Perform the actions in part 2 ("Recompile RAID Into the Kernel") section 4 ("Configuiring the kernel") and 5 ("Compiling the kernel"). This will install the 3.7 kernel. Note: you will not need to perform the "Clean up after yourself" step... since we're not using /mnt to juggle space.
4. reboot on your RAID'ed 3.7 kernel
5. Continue following the OpenBSD upgrade guide with the step "Install new /etc/firmware files"

This will get your main RAID system onto OpenBSD 3.7, however your initial boot partitions (/dev/wd0a and /dev/wd1a) will still be running OpenBSD 3.6. If you are lazy, you can leave them alone. If you want to upgrade them, you can do the following:
1. mount the /dev/wd0a partition (foo# mount /dev/wd0a /mnt)
2. copy the 3.7 RAID kernel to the mounted partition (foo# cp -R /bsd/* /mnt/bsd/)
3. Follow the OpenBSD upgrade guide (skip the "Reboot on the new kernel" step. For step "Install new userland applications", change "cd /" to "cd /mnt")
4. unmount /dev/wd0a and repeat with /dev/wd1a
------------

Anybody could help me ?? Thanks !!
Reply With Quote
  #2   (View Single Post)  
Old 1st February 2012
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,686
Thanked 214 Times in 189 Posts
Default

Hello and welcome. Root on Softraid was not possible until just a couple of months ago for 5.0-current. It is not possible with 4.9 or 5.0-release.

I believe you are confusing RAIDframe and Softraid, which are entirely different technologies. Root-on-RAID has been available with RAIDframe for years.

If you want to convert from RAIDframe to Softraid, you will need to either use -current or wait for 5.1-release.

If you want to upgrade from 4.9 to 5.0 with RAIDframe, you will need to build a 5.0-release RAIDframe kernel on a separate build machine of the same architecture, then follow the 4.9 -> 5.0 upgrade guide, following the steps for upgrading without using the install kernel (bsd.rd).
Reply With Quote
  #3   (View Single Post)  
Old 2nd February 2012
delorean delorean is offline
New User
 
Join Date: Feb 2012
Posts: 7
Thanked 0 Times in 0 Posts
Default

Hello jggimi,

First of all thank you for your response.

Yes, it´s RAIDframe and not softraid, i was confused becouse i have no idea about openbsd yet

So, building a Raidframe kernel 5.0 to upgrade from 4.9 to 5.0 it´s that i did.But i was not sure if this could be work.But i will try using it and following the update steps without the bsd.rs.I´ll post the results, thanks
Reply With Quote
  #4   (View Single Post)  
Old 2nd February 2012
delorean delorean is offline
New User
 
Join Date: Feb 2012
Posts: 7
Thanked 0 Times in 0 Posts
Default

Hi Again,

I already did all the steps with a compiled 5.0 kernel with RAIDframe and it works, the system starts ok but..

uname -a
OpenBSD 4.9 GENERIC.MP#0 amd64

how i can check if im really running openbsd5.0 ?

Thanks !

Last edited by delorean; 2nd February 2012 at 11:35 AM.
Reply With Quote
  #5   (View Single Post)  
Old 2nd February 2012
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,686
Thanked 214 Times in 189 Posts
Default

Try "sysctl kern.version"
Reply With Quote
  #6   (View Single Post)  
Old 2nd February 2012
delorean delorean is offline
New User
 
Join Date: Feb 2012
Posts: 7
Thanked 0 Times in 0 Posts
Default

sysctl kern.version
kern.version=OpenBSD 4.9 (GENERIC.MP) #0: Fri Jan 27 14:54:30 CET 2012
rootFW2.local:/usr/src/sys/arch/amd64/compile/GENERIC.MP


My RAIDframe configuration is this one:

I hace 2 disks
/dev/sd0
/dev/sd1

the raid device is /dev/raid0a , but in the boot, i think that the system actually boots with /dev/sd0a partition where it is another bsd kernel file(4.9) and then it loads the raid device.So maybe i have to put the compiled bsd kernel file(5.0) in the sd0a ?

Last edited by delorean; 2nd February 2012 at 11:51 AM.
Reply With Quote
  #7   (View Single Post)  
Old 2nd February 2012
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,686
Thanked 214 Times in 189 Posts
Default

You are correct; the OpenBSD/amd64 second stage bootloader (the small program that produces the "boot>" prompt) loads the kernel from a physical disk drive partition, it does not map RAIDframe volumes.

With your configuration, I assume that would be the "a" partition of either of your physical drives.

---

When you create a custom kernel, it is standard practice to copy GENERIC or GENERIC.MP to a new configuration file, so that kern.version or dmesg(8) produce obvious indications that a custom kernel is in use and not GENERIC. For example, if your favorite $EDITOR is vi(1) you might do something like this on your build platform:
Code:
# cd /usr/src/sys/arch/amd64/conf
# cp GENERIC.MP RAID.MP
# vi RAID.MP
# config RAID.MP
# cd ../compile/RAID.MP
# make clean && make
Reply With Quote
  #8   (View Single Post)  
Old 2nd February 2012
delorean delorean is offline
New User
 
Join Date: Feb 2012
Posts: 7
Thanked 0 Times in 0 Posts
Default

Doing these things(following the guide steps)

mount /dev/sd0a /mnt
cd /openbsd5.0 (where are the install files)
here the bsd file it´s not the original, its my bsd 5.0 compiled in other machine with RAIDFrame
then:

using the multiprocessor kernel:

export RELEASEPATH=/openbsd5.0 # where you put the files
cd ${RELEASEPATH}
rm /mnt/obsd ; ln /mnt/bsd /mnt/obsd && cp bsd.mp /mnt/nbsd && mv /mnt/nbsd /mnt/bsd
cp bsd.rd /mnt
cp bsd /mnt/bsd.sp

and rebooting i have an error and its impossible to load the system , with this error:

raidctl: unable to open devfile:/dev/raid0c
cant open /dev/rraid0a: dev not configured
cant check file system

hopefully i have backup files of bsd* in /dev/sd0a and i restored everything.

Im not sure but maybe the error its becouse i did not make this following changes before rebooting ?¿

***
Save yourself a copy of the old reboot(1) command: You are still running the old kernel, it is possible the new reboot command will not run on the old kernel.

cp /sbin/reboot /sbin/oreboot

Install new userland applications. Do NOT install etc50.tgz and xetc50.tgz now, because that will overwrite your current configuration files! Note that we are installing base50.tgz LAST, because it will include a new tar(1) utility, which may or may not run on the old kernel. We reboot immediately, as the system is probably barely runnable now.

tar -C / -xzphf xserv50.tgz
tar -C / -xzphf xfont50.tgz
tar -C / -xzphf xshare50.tgz
tar -C / -xzphf xbase50.tgz
tar -C / -xzphf game50.tgz
tar -C / -xzphf comp50.tgz
tar -C / -xzphf man50.tgz
tar -C / -xzphf base50.tgz # Install last!
/sbin/oreboot
*****

im not sure if installing base50.tgz solves the problem but i think this is not the problem.. What a nightmare !!

Last edited by delorean; 2nd February 2012 at 05:04 PM.
Reply With Quote
  #9   (View Single Post)  
Old 2nd February 2012
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,686
Thanked 214 Times in 189 Posts
Default

I am glad you were able to recover from your backup.

You are attempting to upgrade a system with a custom kernel. And your system will not function, as configured, without that custom kernel. This requires advanced OpenBSD administration skill; you are attempting this without that background. You are very brave, and should be congratulated.

The OpenBSD userland (all of the OS programs and tools) and the OpenBSD kernel must be kept in sync, so the custom 5.0 kernel and the 5.0 *.tgz filesets must be installed simultaneously.

The errors you posted indicate that kernel you booted is not correct; either you booted GENERIC.MP as supplied by the OpenBSD project, or, you incorrectly configured the kernel you deployed.

You can check the kernel to determine what it is -- using something like:
Code:
# mount /dev/sd0a /mnt
# config -o /tmp/not.used -e /mnt/bsd
This use of the config program will display the equivalent of "sysctl kern.version" before producing a prompt, where you can type "quit" to exit. Here is another good reason to create a RAID.MP kernel configuration file rather than editing GENERIC directly.

RAIDframe Root-on-RAID requires two additions to the kernel configuration. If you don't have both, you will not have a properly configured kernel:
  1. The raid pseudo-device and its count of device drivers.
  2. The raid auto configuration option.
---

If this were my production system, I would create my custom kernel and test it on a separate system of the same architecture:
  1. install 5.0-release
  2. download and unpack the 5.0-release kernel source code tarball
  3. configure my RAID.MP kernel and build it
  4. boot my custom kernel
  5. create a set of RAID partitions, configure an array, and test that it autoconfigures when I reboot.
Then, and only then, I would package my custom kernel with the release filesets, and conduct an upgrade per the OpenBSD Upgrade Guide.
Reply With Quote
Old 3rd February 2012
delorean delorean is offline
New User
 
Join Date: Feb 2012
Posts: 7
Thanked 0 Times in 0 Posts
Default

Hi,

First of all, i would like to thank you for all your help, people like you and these kind of forums gives people more knowledge and interest in systems such as openbsd.

Well, i have the same problem doing all these steps:

# mount /dev/sd0a /mnt
# config -o /tmp/not.used -e /mnt/bsd
OpenBSD 5.0 (GENERIC.MP) #0: Wed Feb 1 15:12:36 CET 2012
root@foo.my.domain:/usr/src/sys/arch...ile/GENERIC.MP

this kernel was configured correctly with raid pseudo device and the raid autoconfiguration option, im pretty sure becouse i did a raid configuration with 2 disks and it boots right and the raid device was ok.(all of this made in an exact same version machine)

Then i followed the guide steps and installed the tar files before rebooting, and bang ! the same crash !! (((( whyyyyy ! :_( I dont know why, but this is personal now, i dont know how but i´ll solve this problem.

The only thing i didn´t try is compiling the kernel with RAID.MP instead of the GENERIC.MP . you really think maybe this is the reason ? I´m not sure.
Reply With Quote
Old 3rd February 2012
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,686
Thanked 214 Times in 189 Posts
Default

I'm sure that copying the configuration file won't make any difference at all. That's strictly so you avoid confusing yourself, or others, when you (or they) look at your dmesg output.

I see raidctl failing to find the raid0 drive, and that's why I thought it might be your use of the wrong kernel, or an invalid kernel. If you are sure this kernel is tested and valid, then an examination of the device nodes in /dev/raid* may be helpful. The untarring of base50.tgz will not eliminate /dev device nodes, but it might renumber them.

One thing you might try, after restoring (again), is to copy your custom 5.0 kernel into the root partition of your production machine as some other name, and then selecting this kernel in single-user mode from the amd64 bootloader (the "boot>" prompt). For example, "boot hd0a:/50bsd -s" -- watch the dmesg and see if the autoconfiguration discovers the array and configures it. If it doesn't, the kernel will not find a root directory and will panic. If you are able to install 5.0-release onto a USB stick/disk, you can boot your custom kernel with "-a" and select the USB stick's root partition, and then while running from the stick attempt to diagnose why autoconfiguration or raidctl may be failing. In addition, the dmesg can then be collected and then posted here, or better yet, to the OpenBSD Project's misc@ mailing list, so that a wider and more knowledgeable audience can assist you.

Other choices are possible, including staying on 4.9, doing a clean install of 5.0 rather than an upgrade of 4.9, converting from RAIDframe to Softraid now with -current or with 5.1 when it is released on or about 1 May. Are any of these of interest?
Reply With Quote
Old 22nd February 2012
delorean delorean is offline
New User
 
Join Date: Feb 2012
Posts: 7
Thanked 0 Times in 0 Posts
Default

Hi, i had to leave this becouse some other work problems.

I started the other day and today i solved it !!! well.. im pretty sure about that, althougt im working in some proofs to be ensure 100%

First of all i made your tip:

copy the bsd kernel 5.0 compiled with Raidframe file in bsd_50 and put in /dev/sd0a , then boot with hd0a:/bsd_50 -s , and i saw that it boots correctly with raidframe support, so i did this:

In the upgrade official guide they say :

export RELEASEPATH=/usr/rel # where you put the files
cd ${RELEASEPATH}
rm /obsd ; ln /bsd /obsd && cp bsd.mp /nbsd && mv /nbsd /bsd
cp bsd.rd /
cp bsd /bsd.sp


doing this, doesn´t work , you can see how bsd.mp will be the bsd file.. maybe this is the main problem

So, if i just put my bsd kernel 5.0 compiled with Raidframe file in /dev/sd0a
it works.. the machine boots correctly with the 5.0 kernel and the RAIDframe it´s working:

#uname -a

OpenBSD 5.0 GENERIC.MP#0 amd64

#raidctl -s raid0
raid0 Components:
/dev/sd0d: optimal
/dev/sd1d: optimal
No spares.
Parity status: clean
Reconstruction is 100% complete.
Parity Re-write is 100% complete.
Copyback is 100% complete.


# df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/raid0a 229G 1.2G 216G 1% /


The tgz files upgrade was done previously so im assuming that this is ok.How can i verify 100% that all the upgrade 4.9 ->5.0 is ok ?

thanks !
Reply With Quote
Old 22nd February 2012
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,686
Thanked 214 Times in 189 Posts
Default

Congratulations on solving the problem!

I believe the error was caused by following the scripted commands without first determining what they did. It appears you installed the OpenBSD Project kernel, rather than your custom kernel.

----

It may be helpful to chant the incantation posted here.
Reply With Quote
Old 22nd February 2012
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,686
Thanked 214 Times in 189 Posts
Default

Oh, yes. Look to any of your files in /usr/bin, /usr/sbin, etc. If the creation date for those files is in August of 2011, they are from 5.0-release.
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
RAIDframe -> Softraid jggimi OpenBSD General 12 3rd October 2011 12:16 AM
RAID1 rebuild for softraid bsdplus OpenBSD General 1 19th June 2010 03:17 PM
OpenBSD heads up - softraid metadata change J65nko News 0 26th March 2010 10:27 PM
softraid encryption Sunnz OpenBSD Security 6 24th September 2009 04:58 AM
SOFTRAID(4) revzalot OpenBSD Installation and Upgrading 3 27th July 2008 08:40 PM


All times are GMT. The time now is 11:58 PM.


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