Quantcast

Bad kernel for OpenBSD 6.1 sparc64 ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Bad kernel for OpenBSD 6.1 sparc64 ?

Jeff-2
Hi,

I have a Sunfire V120 (Sparc) with mirrored disks running OpenBSD 6.0.
I attempted to update to OpenBSD 6.1 using the files first from:

http://mirrors.sonic.net/pub/OpenBSD/6.1/sparc64

Then from:

https://ftp3.usa.openbsd.org/pub/OpenBSD/6.1/sparc64

First I tried to copy bsd.rd to / and boot from it.  When I boot
using 6.1 bsd.rd (boot /bsd.rd), the boot messages still show
OpenBSD 6.0.

I selected update, selected my mirrored boot/root device but it would
only give options to update bsd, bsd.rd & bsd.mp.  I selected http and
it defaulted to a URL that had /6.0/ in the path.  I changed it to 6.1
but it wouldn't list any of the *61.tgz files.

After rebooting normally (using the new /bsd), it would still show
that I'm running 6.0 (and BOOT 1.7).

Then I tried burning the install61.iso to a CD and booting from it.
The boot messages would show OpenBSD 6.1 (and BOOT 1.9) and it gave
me the option of updating with the *61.tgz files.  Everything seemed
to install just fine.

However, upon rebooting with /bsd, the boot messages showed I was
still running 6.0 (and BOOT 1.7).  To make matters worse, my IP
filters wouldn't load yielding the error:

pfctl: DIOCADDRULE: Operation not supported by device

Also, pkg_add -u gave the following error:

Couldn't find updates for bash-4.3.46 gettext-0.19.7 libiconv-1.14p3
  libidn-1.32p1 libpsl-0.13.0 libunistring-0.9.7 pcre-8.38p0
  pkglocatedb-1.2 sudo-1.8.17.1 vim-7.4.1467p1-no_x11 wget-1.18

This, of course, broke internet access from my internal network.  I
tried upgrading again from the CD and also tried manually upgrading
using the manual upgrade steps.  All this still resulted in the above
error.

I finally decided to roll back by following the manual update steps
but with the files from the install60.iso media.  My firewall rules
are working again.

Could there be something wrong with the kernel files (bsd, bsd.rd)
available for the OpenBSD 6.1 sparc64 release or am I missing a step?

Thanks!

-Jeff

P.S. As an aside, after downgrading to 6.0, I ran add_pkg -u but
forgot to change the URL in my /etc/pkg.conf back to 6.0 from 6.1.  I
let the packages install but should I do a full manual rollback to 6.0
before reattempting another 6.1 upgrade?

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Bad kernel for OpenBSD 6.1 sparc64 ?

Mickael Torres-2
On 2017-04-21 02:13, Jeff wrote:
> I have a Sunfire V120 (Sparc) with mirrored disks running OpenBSD 6.0.
> ...
> First I tried to copy bsd.rd to / and boot from it.  When I boot
> using 6.1 bsd.rd (boot /bsd.rd), the boot messages still show
> OpenBSD 6.0.

Hi Jeff,

If you use softraid on sparc64, you should have a small ffs FS on your
first disk, containing the kernel and ofwboot.
That *is* where you should put the new bsd.rd, and copy the new
kernel(s)
at the end of install.

The firmware doesn't know how to boot a softraid volume, hence the need
for this small FS.

Best regards,
Mickael.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Bad kernel for OpenBSD 6.1 sparc64 ?

Stefan Sperling-5
In reply to this post by Jeff-2
On Thu, Apr 20, 2017 at 06:13:47PM -0600, Jeff wrote:

> Hi,
>
> I have a Sunfire V120 (Sparc) with mirrored disks running OpenBSD 6.0.
> I attempted to update to OpenBSD 6.1 using the files first from:
>
> http://mirrors.sonic.net/pub/OpenBSD/6.1/sparc64
>
> Then from:
>
> https://ftp3.usa.openbsd.org/pub/OpenBSD/6.1/sparc64
>
> First I tried to copy bsd.rd to / and boot from it.  When I boot
> using 6.1 bsd.rd (boot /bsd.rd), the boot messages still show
> OpenBSD 6.0.

Did you actually type '/boot bsd.rd'?
When booting from softraid you need to pass the virtual 'sr' drive
as part of the boot path. Try again with: boot sr0a:/bsd.rd

From the boot_sparc64(8) man page:

     To boot from a softraid(4) volume by default, boot-device must be set to
     a disk device hosting a chunk of the softraid volume:

           ok setenv boot-device disk0

     and boot-file must contain the (sr) device name of the softraid volume
     and optionally a partition letter and/or kernel:

           ok setenv boot-file sr0a:/bsd

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Bad kernel for OpenBSD 6.1 sparc64 ?

Stefan Sperling-5
In reply to this post by Mickael Torres-2
On Fri, Apr 21, 2017 at 09:04:07AM +0200, Mickael Torres wrote:

> On 2017-04-21 02:13, Jeff wrote:
> > I have a Sunfire V120 (Sparc) with mirrored disks running OpenBSD 6.0.
> > ...
> > First I tried to copy bsd.rd to / and boot from it.  When I boot
> > using 6.1 bsd.rd (boot /bsd.rd), the boot messages still show
> > OpenBSD 6.0.
>
> Hi Jeff,
>
> If you use softraid on sparc64, you should have a small ffs FS on your
> first disk, containing the kernel and ofwboot.
> That *is* where you should put the new bsd.rd, and copy the new kernel(s)
> at the end of install.
>
> The firmware doesn't know how to boot a softraid volume, hence the need
> for this small FS.

A separate boot partition is not required.

The first stage boot loader is a Forth script which reads a second stage
(ofwboot) from the softraid meta data area. ofwboot will load a kernel
from RAID1 and CRYPTO volumes. See the last few slides in
https://www.openbsd.org/papers/eurobsdcon2015-softraid-boot.pdf

The install/upgrade scripts run installboot(8) to set this up.

The only differences to i386/amd64 is that bootable sparc64 RAID partitions
must use the letter 'a' (the first stage does not try any other letters) and
that the boot-device and boot-file open firmware environment variables must
be set up correctly (see boot_sparc64(8)).

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Bad kernel for OpenBSD 6.1 sparc64 ?

Mickael Torres-2
On 2017-04-21 10:50, Stefan Sperling wrote:

> On Fri, Apr 21, 2017 at 09:04:07AM +0200, Mickael Torres wrote:
>> On 2017-04-21 02:13, Jeff wrote:
>> > I have a Sunfire V120 (Sparc) with mirrored disks running OpenBSD 6.0.
>> > ...
>> > First I tried to copy bsd.rd to / and boot from it.  When I boot
>> > using 6.1 bsd.rd (boot /bsd.rd), the boot messages still show
>> > OpenBSD 6.0.
>>
>> Hi Jeff,
>>
>> If you use softraid on sparc64, you should have a small ffs FS on your
>> first disk, containing the kernel and ofwboot.
>> That *is* where you should put the new bsd.rd, and copy the new
>> kernel(s)
>> at the end of install.
>>
>> The firmware doesn't know how to boot a softraid volume, hence the
>> need
>> for this small FS.
>
> A separate boot partition is not required.
>
> The first stage boot loader is a Forth script which reads a second
> stage
> (ofwboot) from the softraid meta data area. ofwboot will load a kernel
> from RAID1 and CRYPTO volumes. See the last few slides in
> https://www.openbsd.org/papers/eurobsdcon2015-softraid-boot.pdf
>
> The install/upgrade scripts run installboot(8) to set this up.
>
> The only differences to i386/amd64 is that bootable sparc64 RAID
> partitions
> must use the letter 'a' (the first stage does not try any other
> letters) and
> that the boot-device and boot-file open firmware environment variables
> must
> be set up correctly (see boot_sparc64(8)).

Wow, you've just made my day!
Thanks, Stefan.

Best regards,
Mickael.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Bad kernel for OpenBSD 6.1 sparc64 ?

Jeff-2
In reply to this post by Stefan Sperling-5
On Fri, 21 Apr 2017, Stefan Sperling wrote:

> On Thu, Apr 20, 2017 at 06:13:47PM -0600, Jeff wrote:
> > Hi,
> >
> > I have a Sunfire V120 (Sparc) with mirrored disks running OpenBSD 6.0.
> > I attempted to update to OpenBSD 6.1 using the files first from:
> >
> > http://mirrors.sonic.net/pub/OpenBSD/6.1/sparc64
> >
> > Then from:
> >
> > https://ftp3.usa.openbsd.org/pub/OpenBSD/6.1/sparc64
> >
> > First I tried to copy bsd.rd to / and boot from it.  When I boot
> > using 6.1 bsd.rd (boot /bsd.rd), the boot messages still show
> > OpenBSD 6.0.
>
> Did you actually type '/boot bsd.rd'?
> When booting from softraid you need to pass the virtual 'sr' drive
> as part of the boot path. Try again with: boot sr0a:/bsd.rd
>
> >From the boot_sparc64(8) man page:
>
>      To boot from a softraid(4) volume by default, boot-device must be set to
>      a disk device hosting a chunk of the softraid volume:
>
>            ok setenv boot-device disk0
>
>      and boot-file must contain the (sr) device name of the softraid volume
>      and optionally a partition letter and/or kernel:
>
>            ok setenv boot-file sr0a:/bsd
>

Hi Stefan,

Thanks!

I must have missed that man page when I originally installed 6.0.
Booting with sr0a:/bsd* did work but it took a much longer time
loading the symbols with both bsd & bsd.rd.  I'll be sure to read
that man page and try again later today after I'm done working (in
case I muck it up again).

Using a non-standard name for the bsd.rd file seems to help clarify
things.

ok printenv boot-device
boot-device =         disk1:a /pci@1f,0/pci@1/scsi@8/disk@1,0:a

ok boot disk1:a /bsd.rd.61
...
Executing last command: boot disk1:a /bsd.rd.61
Boot device: /pci@1f,0/pci@1/scsi@8/disk@1,0:a  File and args:
/bsd.rd.61
OpenBSD IEEE 1275 Bootblock 1.4
..>> OpenBSD BOOT 1.7
Can't read disk label.
Can't open disk label package
Drive not ready
Can't read disk label.
Can't open disk label package
sr0*
open /pci@1f,0/pci@1/scsi@8/disk@1,0:a/etc/random.seed: No such file or directory
open /pci@1f,0/pci@1/scsi@8/disk@1,0:a/bsd.rd.61: No such file or directory

Boot:

lom> reset

ok boot sr0a:/bsd.rd.61
Boot device: /pci@1f,0/pci@1/scsi@8/disk@1,0:a  File and args:
sr0a:/bsd.rd.61
OpenBSD IEEE 1275 Bootblock 1.4
..>> OpenBSD BOOT 1.7
Can't read disk label.
Can't open disk label package
Drive not ready
Can't read disk label.
Can't open disk label package
sr0*
Booting sr0:a/bsd.rd.61
4045496@0x1000000+1352@0x13dbab8+3251904@0x1800000+942400@0x1b19ec0
symbols @ 0xfff42300 120 start=0x1000000
console is /pci@1f,0/pci@1,1/isa@7/serial@0,3f8
Copyright (c) 1982, 1986, 1989, 1991, 1993
   The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2017 OpenBSD. All rights reserved.
https://www.OpenBSD.org
OpenBSD 6.1 (RAMDISK) #55: Sat Apr  1 17:41:52 MDT 2017
    [hidden email]:/usr/src/sys/arch/sparc64/compile/RAMDISK

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Bad kernel for OpenBSD 6.1 sparc64 ?

Jeff-2
On Fri, 21 Apr 2017, Jeff wrote:

> On Fri, 21 Apr 2017, Stefan Sperling wrote:
>
> > On Thu, Apr 20, 2017 at 06:13:47PM -0600, Jeff wrote:
> > > Hi,
> > >
> > > I have a Sunfire V120 (Sparc) with mirrored disks running OpenBSD 6.0.
> > > I attempted to update to OpenBSD 6.1 using the files first from:
> > >
> > > http://mirrors.sonic.net/pub/OpenBSD/6.1/sparc64
> > >
> > > Then from:
> > >
> > > https://ftp3.usa.openbsd.org/pub/OpenBSD/6.1/sparc64
> > >
> > > First I tried to copy bsd.rd to / and boot from it.  When I boot
> > > using 6.1 bsd.rd (boot /bsd.rd), the boot messages still show
> > > OpenBSD 6.0.
> >
> > Did you actually type '/boot bsd.rd'?
> > When booting from softraid you need to pass the virtual 'sr' drive
> > as part of the boot path. Try again with: boot sr0a:/bsd.rd
> >
> > >From the boot_sparc64(8) man page:
> >
> >      To boot from a softraid(4) volume by default, boot-device must be set to
> >      a disk device hosting a chunk of the softraid volume:
> >
> >            ok setenv boot-device disk0
> >
> >      and boot-file must contain the (sr) device name of the softraid volume
> >      and optionally a partition letter and/or kernel:
> >
> >            ok setenv boot-file sr0a:/bsd
> >
>
> Hi Stefan,
>
> Thanks!
>
> I must have missed that man page when I originally installed 6.0.
> Booting with sr0a:/bsd* did work but it took a much longer time
> loading the symbols with both bsd & bsd.rd.  I'll be sure to read
> that man page and try again later today after I'm done working (in
> case I muck it up again).
>
> Using a non-standard name for the bsd.rd file seems to help clarify
> things.
>
> ok printenv boot-device
> boot-device =         disk1:a /pci@1f,0/pci@1/scsi@8/disk@1,0:a
>
> ok boot disk1:a /bsd.rd.61
> ...
> Executing last command: boot disk1:a /bsd.rd.61
> Boot device: /pci@1f,0/pci@1/scsi@8/disk@1,0:a  File and args:
> /bsd.rd.61
> OpenBSD IEEE 1275 Bootblock 1.4
> ..>> OpenBSD BOOT 1.7
> Can't read disk label.
> Can't open disk label package
> Drive not ready
> Can't read disk label.
> Can't open disk label package
> sr0*
> open /pci@1f,0/pci@1/scsi@8/disk@1,0:a/etc/random.seed: No such file or directory
> open /pci@1f,0/pci@1/scsi@8/disk@1,0:a/bsd.rd.61: No such file or directory
>
> Boot:
>
> lom> reset
>
> ok boot sr0a:/bsd.rd.61
> Boot device: /pci@1f,0/pci@1/scsi@8/disk@1,0:a  File and args:
> sr0a:/bsd.rd.61
> OpenBSD IEEE 1275 Bootblock 1.4
> ..>> OpenBSD BOOT 1.7
> Can't read disk label.
> Can't open disk label package
> Drive not ready
> Can't read disk label.
> Can't open disk label package
> sr0*
> Booting sr0:a/bsd.rd.61
> 4045496@0x1000000+1352@0x13dbab8+3251904@0x1800000+942400@0x1b19ec0
> symbols @ 0xfff42300 120 start=0x1000000
> console is /pci@1f,0/pci@1,1/isa@7/serial@0,3f8
> Copyright (c) 1982, 1986, 1989, 1991, 1993
>    The Regents of the University of California.  All rights reserved.
> Copyright (c) 1995-2017 OpenBSD. All rights reserved.
> https://www.OpenBSD.org
> OpenBSD 6.1 (RAMDISK) #55: Sat Apr  1 17:41:52 MDT 2017
>     [hidden email]:/usr/src/sys/arch/sparc64/compile/RAMDISK
>
>

Hi,

Booting from sr0a seemed to do the trick to get my system upgraded to
6.1.  Unfortunately, it's now panicing frequently with, "panic:
psycho0: uncorrectable DMA error" but on different commands each time.
I know this is old hardware so I'm trying to swap out hardware to see
if it's hardware related but it's been pretty stable until I attempted
to upgrade from 6.0.  Thus far, I've swapped out the DIMMs.  I think
I'm going to try installing 6.1 on a spare V120 partially to see if
I still have issues and partially to have a backup system.

Question: After upgrading to 6.1, it's still booting with "OpenBSD
BOOT 1.7" but I noticed when booting from the burned install61.iso
CD, it reports BOOT 1.9.  I tried running "installboot sd2"  but
there's no change.  Is there another method I'm overlooking to
update the boot image?

Thanks!

-Jeff

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Bad kernel for OpenBSD 6.1 sparc64 ?

Stefan Sperling-5
On Sat, Apr 22, 2017 at 04:31:02PM -0600, Jeff wrote:
> Booting from sr0a seemed to do the trick to get my system upgraded to
> 6.1.  Unfortunately, it's now panicing frequently with, "panic:
> psycho0: uncorrectable DMA error" but on different commands each time.

Please follow the steps in https://www.openbsd.org/report.html

In the past we have found bugs in drivers where the hardware ends up
doing an out of bounds access during DMA transactions. On most platforms
those bugs don't get noticed but psycho on sparc64 is catching them
which results in this panic.

> Question: After upgrading to 6.1, it's still booting with "OpenBSD
> BOOT 1.7" but I noticed when booting from the burned install61.iso
> CD, it reports BOOT 1.9.  I tried running "installboot sd2"  but
> there's no change.  Is there another method I'm overlooking to
> update the boot image?

Is sd2 your softraid disk? What does installboot -n -v sd2 say?

Loading...