Creating a Partition for RAID Arrays

2020-09-16 Thread Justin Noor
Hello Misc,

We need to create a partition on an OpenBSD server for the sole purpose of
mounting RAID arrays.

The mount point would be something like:

/data

Then we will create directories in that partition and mount the arrays:

/data/raid1
/data/raid2
/data/raid3


How big should this partition be?


Which AMD GPUs Work the Best with 6.7 Current and Above?

2020-07-22 Thread Justin Noor
Hello Misc,

Which AMD GPUs work the best for general purpose use?

“Best” is defined as the ability to run xenodm or startx to play every
videos, games, render 3D or CAD/CAM graphics, a desktop, etc. - without
causing any unexplainable or unreported crashes/freezes.

Specs:

6.7 Current
Ryzen 5 2600 processor

Thank you


Encrypting vnodes with softraid0

2020-06-08 Thread Justin Noor
Hi @misc,

Is there anything problematic about encrypting vnode devices with
softraid0? I made this work on two USB drives and it seems to be fine.

For example, if I have a pre-existing external RAID5 array with 20TB of
pooled storage (filesystem type 4.2BSD), and I want to encrypt a 2TB
portion of it.

Create a 2TB file:

# dd if=/dev/urandom of=/mnt/cryptfile bs=1g count=2000

Create and format the vnode:

# vnconfig vnd0 /mnt/cryptfile
# fidisk -iy -g -b 960 vnd0
# disklabel -E vnd0 (Make one big 'a' partition of type 'RAID')

Create and format the crypto device, using a keydisk:

# bioctl -c C -k sd2a -l vnd0a softraid0
(device attached as sd3)
# dd if=/dev/zero of=/dev/rsd3c bs=1m count=1
# fdisk -iy -g -b 960 sd3
# disklabel -E sd3 (Make one big 'a' partition of type 4.2BSD)
# newfs sd3a

Mount the crypto device:

# mount /dev/sd3a /mnt/crypto_device

I feel like this method offers flexibility for those who don't need
full-disk encryption.


Re: Filling a 4TB Disk with Random Data

2020-06-04 Thread Justin Noor
Thanks you @misc.

Using dd with a large block size will likely be the course of action.

I really need to refresh my memory on this stuff. This is not something we
do, or need to do, everyday.

Paul your example shows:

bs=1048576

How did you choose that number? Could you have gone even bigger? Obviously
it is a multiple of 512.

The disks in point are 4TB Western Digital Blues. They have 4096 sector
sizes.

I used a 16G USB stick as a sacrificial lamb to experiment with dd.
Interestingly, there is no difference in time between 1m, 1k, and 1g. How
is that possible? Obviously this will not be an accurate comparison of the
WD disks, but it was still a good practice exercise.

Also Paul, to clarify a point you made, did you mean forget the random data
step, and just encrypt the disks with softraid0 crypto? I think I like that
idea because this is actually a traditional pre-encryption step. I don't
agree with it, but I respect the decision. For our purposes, encryption
only helps if the disks are off the machine, and someone is trying to
access them. This automatically implies that they were stolen. The chances
of disk theft around here are slim to none. We have no reason to worry
about forensics either - we're not storing nuclear secrets.

Thanks for your time


On Mon, Jun 1, 2020 at 7:28 AM Paul de Weerd  wrote:

> On Mon, Jun 01, 2020 at 06:58:01AM -0700, Justin Noor wrote:
> | Hi Misc,
> |
> | Has anyone ever filled a 4TB disk with random data and/or zeros with
> | OpenBSD?
>
> I do this before disposing of old disks.  Have written random data to
> several sizes of disk, not sure if I ever wiped a 4TB disk.
>
> | How long did it take? What did you use (dd, openssl)? Can you share the
> | command that you used?
>
> It takes quite some time, but OpenBSD (at least on modern hardware)
> can generate random numbers faster than you can write them to spinning
> disks (may be different with those fast nvme(4) disks).
>
> I simply used dd, with a large block size:
>
> dd if=/dev/random of=/dev/sdXc bs=1048576
>
> And then you wait.  The time it takes really depends on two factors:
> the size of the disk and the speed at which you write (whatever the
> bottleneck).  If you start, you can send dd the 'INFO' signal (`pkill
> -INFO dd` (or press Ctrl-T if your shell is set up for it with `stty
> status ^T`))  This will give you output a bit like:
>
> 30111+0 records in
> 30111+0 records out
> 31573671936 bytes transferred in 178.307 secs (177074202 bytes/sec)
>
> Now take the size of the disk in bytes, divide it by that last number
> and subtract the second number.  This is a reasonable ball-park
> indication of time remaining.
>
> Note that if you're doing this because you want to prevent others from
> reading back even small parts of your data, you are better of never
> writing your data in plain text (e.g. using softraid(4)'s CRYPTO
> discipline), or (if it's too late for that), to physically destroy the
> storage medium.  Due to smart disks remapping your data in case of
> 'broken' sectors, some old data can never be properly overwritten.
>
> Cheers,
>
> Paul 'WEiRD' de Weerd
>
> --
> >[<++>-]<+++.>+++[<-->-]<.>+++[<+
> +++>-]<.>++[<>-]<+.--.[-]
>  http://www.weirdnet.nl/
>


Filling a 4TB Disk with Random Data

2020-06-01 Thread Justin Noor
Hi Misc,

Has anyone ever filled a 4TB disk with random data and/or zeros with
OpenBSD?

How long did it take? What did you use (dd, openssl)? Can you share the
command that you used?

Thank you so much


Re: Failed to install bootblocks. You will not be able to boot OpenBSD

2020-04-04 Thread Justin Noor
Hi Otto,

Yes you're right - I wiped the 'i' partition during the custom
installation. I started over from scratch leaving the 'i' partition intact
and the installation was successful. Thank you for your time.

On Fri, Apr 3, 2020 at 12:49 PM Otto Moerbeek  wrote:

> On Fri, Apr 03, 2020 at 05:03:23PM +0200, Otto Moerbeek wrote:
>
> > On Fri, Apr 03, 2020 at 07:11:12AM -0700, Justin Noor wrote:
> >
> > > Hello OpenBSD Community,
> > >
> > > Hope you all are staying safe during these crazy times.
> > >
> > > I am looking for any feedback on an installation error that occurred
> using
> > > the custom-layout partition option across two SSDs.
> > >
> > > ERROR:
> > >
> > >   Installboot: no OpenBSD partition
> > >   Failed to install bootblocks.
> > >   You will not be able to boot OpenBSD from sd0
> > >
> > > VERSION:
> > >
> > >   OpenBSD 6.6 release/install66.fs media
> >
> > I don't think so, the logs below shows you were using a snapshot, or
> > maybe a mixed install (boot from a snap install.fs, but install older
> > sets; don't do that).
> >
> > That would be my bet. Since you neglected to show any more detailad
> > info like the way you partitioned or an install log it is impossible
> > to diagnose what is going on.
>
> Thought about it a bit more. Since you did an EFI install and
> installboot did not find your EFI partion (it fell back to MBR) I must
> conclude that your custom disklabel did not include an entry for the
> EFI partition. Normally that would have been the 'i' partition in the
> auto-created disklabel.
>
>
> -Otto
> >
> > >
> > > MACHINE ARCHITECTURE:
> > >
> > >   amd64/AMD Ryzen 5 chipset
> > >
> > > BACKGROUND:
> > >
> > > The plan was to install OpenBSD 6.6 across two disks. Previously, these
> > > disks had FreeBSD-12.1-ZFS installed on them. Since the disks were new
> and
> > > had no data on them, other than the FreeBSD installation sets, I
> decided
> > > not to clean the boot code area with 'dd if=/dev/zero of=/dev/rsd0c
> bs=1
> > > count=1'.
> > >
> > > INSTALLATION STEPS:
> > >
> > >   1) Initialized disks for a GPT schema:
> > >
> > >  # fdisk -iy -g -b 960 sd0
> > >  # fdisk -iy -g -b 960 sd1
> > >
> > >   2) Entered the installer, choosing the custom-layout option for a
> whole
> > > disk GPT
> > >   3) Cleared the auto-generated partitions, and created all new
> partitions
> > > across sd0 and sd1
> > >   4) At the error installer dropped into a shell. At the shell, I
> entered
> > > reboot, and the machine booted.
> > >   5) Logged into the machine and ran the installboot command:
> > >
> > >  $ doas installboot -nv sd0
> > >
> > >  Output:
> > >
> > >Using / as root
> > >would install bootstrap on /dev/rsd0c
> > >using first-stage /usr/mdec/biosboot, second-stage
> /usr/mdec/boot
> > >would copy /usr/mdec/boot to //boot
> > >looking for superblock at 65536
> > >bad superblock magic 0x0
> > >lookign for superblock at 8192
> > >found valid ffs1 superblock
> > >//boot is 6 blocks x 16384 bytes
> > >fs block shift 2; part offset 1024; inode block 24, offset 1704
> > >expecting 32-bit fs blocks (incr 0)
> > >master boot record (MBR) at secto 0
> > >partition 0: type 0xEE offset 1 size 4294967295
> > >installboot: no OpenBSD partition
> > >
> > > KEY OBSERVATIONS:
> > >
> > >   1) The error only occurs with the custom-layout option. When OpenBSD
> is
> > > installed on a single disk using the auto-layout option, the error
> does not
> > > occur
> > >
> > >   2) The error says there is "no OpenBSD partition," but there is an
> > > OpenBSD partition.
> > >
> > >   $ doas fdisk sd0
> > >
> > >   Output:
> > >
> > >Disk: sd0  Usable LBA: 64 to 976772081 [976772081 Sectors]
> > >   #: type   [start:size ]
> > >
> > >
> 
> > >   1: EFI Sys  [ 64: 960 ]
> > >   2: OpenBSD  [ 1024:   976772081 ]
> > >
> &g

Failed to install bootblocks. You will not be able to boot OpenBSD

2020-04-03 Thread Justin Noor
Hello OpenBSD Community,

Hope you all are staying safe during these crazy times.

I am looking for any feedback on an installation error that occurred using
the custom-layout partition option across two SSDs.

ERROR:

  Installboot: no OpenBSD partition
  Failed to install bootblocks.
  You will not be able to boot OpenBSD from sd0

VERSION:

  OpenBSD 6.6 release/install66.fs media

MACHINE ARCHITECTURE:

  amd64/AMD Ryzen 5 chipset

BACKGROUND:

The plan was to install OpenBSD 6.6 across two disks. Previously, these
disks had FreeBSD-12.1-ZFS installed on them. Since the disks were new and
had no data on them, other than the FreeBSD installation sets, I decided
not to clean the boot code area with 'dd if=/dev/zero of=/dev/rsd0c bs=1
count=1'.

INSTALLATION STEPS:

  1) Initialized disks for a GPT schema:

 # fdisk -iy -g -b 960 sd0
 # fdisk -iy -g -b 960 sd1

  2) Entered the installer, choosing the custom-layout option for a whole
disk GPT
  3) Cleared the auto-generated partitions, and created all new partitions
across sd0 and sd1
  4) At the error installer dropped into a shell. At the shell, I entered
reboot, and the machine booted.
  5) Logged into the machine and ran the installboot command:

 $ doas installboot -nv sd0

 Output:

   Using / as root
   would install bootstrap on /dev/rsd0c
   using first-stage /usr/mdec/biosboot, second-stage /usr/mdec/boot
   would copy /usr/mdec/boot to //boot
   looking for superblock at 65536
   bad superblock magic 0x0
   lookign for superblock at 8192
   found valid ffs1 superblock
   //boot is 6 blocks x 16384 bytes
   fs block shift 2; part offset 1024; inode block 24, offset 1704
   expecting 32-bit fs blocks (incr 0)
   master boot record (MBR) at secto 0
   partition 0: type 0xEE offset 1 size 4294967295
   installboot: no OpenBSD partition

KEY OBSERVATIONS:

  1) The error only occurs with the custom-layout option. When OpenBSD is
installed on a single disk using the auto-layout option, the error does not
occur

  2) The error says there is "no OpenBSD partition," but there is an
OpenBSD partition.

  $ doas fdisk sd0

  Output:

   Disk: sd0  Usable LBA: 64 to 976772081 [976772081 Sectors]
  #: type   [start:size ]


  1: EFI Sys  [ 64: 960 ]
  2: OpenBSD  [ 1024:   976772081 ]

  3) The machine seems to boot and run fine.

 $ doas reboot

  Output:

  probing: pc0 mem[640K 63M 92M 16M 3308M 1M 42M 29171M]
  disk: hd0 hd1
  >> OpenBSD/amd64 BOOTX64 3.46
  boot>
  booting hd0a:/bsd: 12858696+2749448+326464+0+704512
[806406+128+1021271]

  4) The system successfully updates to current - it generates the error -
but it updates and reboots on its own.

  5) The 'installboot' command generates a "bad superblock magic 0x0" error

QUESTIONS:

  Why does the error say that there is no OpenBSD partition?
  Why does the error only occur with the custom-layout option?
  Should I have cleaned the boot-code region with dd if=/dev/zero
of=/dev/rsd0c bs=1 count=1 before the installation?
  Is the "bad superblock magic 0x0 error" related to pre-existing garabage
in the boot-code region?


Re: Catastrophic machine freezes - X related

2020-03-08 Thread Justin Noor
You’re using tmux with or without X? We’re getting different errors. Thus
far my errors are definitely X related.

Coincidentally I was just working on this. My machine crashed, and my logs
are showing:

rwsleep_nsec: Xorg[98908]: fsleep: trying to sleep zero nanoseconds

I’m looking into it as we speak.

On Sun, Mar 8, 2020 at 4:09 PM Avon Robertson  wrote:

> On Sat, Feb 29, 2020 at 07:41:59AM -0800, Justin Noor wrote:
> > Awesome - thank you for your time and for the valuable information.
> >
> > That’s hilarious about the serial port. I’ll try plugging into a switch,
> > reproducing the crash, and SSHing into it. I still haven’t tried the
> > syslogd tip you mentioned either. It’s time for me to start learning more
> > about X. Will be in touch.
> >
> > Regards
> >
> > On Fri, Feb 28, 2020 at 6:57 AM Stuart Longland <
> stua...@longlandclan.id.au>
> > wrote:
> >
> > > On 28/2/20 11:32 pm, Justin Noor wrote:
> > > > Thanks for offering to help and sorry for the delay - I got dragged
> into
> > > a
> > > > work emergency. I finally managed to SCP my dmesg to a remote
> machine.
> > >
> > > Heh, no problems, these things happen.
> > >
> > > > As a refresher I have a 6.6 current machine that crashes when X is
> > > running,
> > > > and almost instantly when Firefox is running - it runs fine without
> X.
> > > The
> > > > machine becomes totally frozen - I have to perform a forced shutdown
> to
> > > > exit this state. The issue appears to be graphics related and is
> > > > inconsistent - sometimes it crashes immediately, other times it does
> not.
> > >
> > > Sometimes it might be the way a particular graphics toolkit "tickles"
> > > the video hardware too.  For instance FVWM uses libxcb for drawing
> > > graphics which means you're likely to be just working with 2D
> primitives.
> > >
> > > Then Firefox with its GTK+ back-end fires off a few RENDER extension
> > > requests to the X server and whoopsie!  Down she goes!
> > >
> > > > There are indeed some "unknown product" messages related to my PCI
> > > graphics
> > > > card in my dmesg, but I haven't been able to decipher them yet. Those
> > > > usually mean the device is not supported, but it is, and I'm sure I
> have
> > > > the correct driver (amdgpu0). Previously I had no issues for months,
> > > which
> > > > is why I suspected hardware failure. Admittedly I've been lucky with
> > > > graphics cards over the years, and don't know much about PCI.
> > >
> > > No issues for months running a previous version of OpenBSD or the same
> > > you're running now?
> > >
> > > One suggestion I made too was to maybe try setting up a serial console
> > > link… turns out the motherboard makers know how to tease:
> > >
> > > > com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
> > > > com0: probed fifo depth: 0 bytes
> > >
> > > That says there is a RS-232 port somewhere… so I had a look at the
> > > handbook:
> > >
> > >
> https://dlcdnets.asus.com/pub/ASUS/mb/SocketAM4/ROG_STRIX_B450-I_GAMING/E14337_ROG_STRIX_B450-I_GAMING_UM_PRINT.pdf
> > >
> > > They didn't wire it up to a pin header, which is annoying.
> > >
> > > On the video front, I did see this:
> > > > initializing kernel modesetting (POLARIS11 0x1002:0x67EF
> 0x1002:0x0B04
> > > > 0xE5).
> > > > amdgpu_irq_add_domain: stub
> > > > amdgpu_device_resize_fb_bar: stub
> > > > amdgpu: [powerplay] Failed to retrieve minimum clocks.
> > > > amdgpu0: 1360x768, 32bpp
> > > > wsdisplay0 at amdgpu0 mux 1: console (std, vt100 emulation), using
> wskbd0
> > > > wskbd1: connecting to wsdisplay0
> > > > wsdisplay0: screen 1-5 added (std, vt100 emulation)
> > >
> > > The "stub" messages make me wonder if we're hitting some
> > > not-yet-implemented features.  That "failed to retrieve minimum clocks"
> > > has been seen on Linux as well, and there it was related to PCI
> prefetch
> > > register programming.
> > >
> > > The machine you've got isn't much different to what I have at work
> > > actually: Rysen 7 1700 (so previous generation), and a RX550 video card
> > > (POLARIS12, maybe slightly newer?)… the machine is fitted with a RS-232
> > > serial port so I might try a little experiment wi

Re: Catastrophic

2020-02-29 Thread Justin Noor
Yeah like Stuart said I need to reproduce the crash and get inside the
machine when it’s in that state. To be continued.

Best

On Fri, Feb 28, 2020 at 7:42 PM Avon Robertson  wrote:

> On Sat, Feb 29, 2020 at 12:57:07AM +1000, Stuart Longland wrote:
> > On 28/2/20 11:32 pm, Justin Noor wrote:
> > > Thanks for offering to help and sorry for the delay - I got dragged
> into a
> > > work emergency. I finally managed to SCP my dmesg to a remote machine.
> >
> > Heh, no problems, these things happen.
> >
> > > As a refresher I have a 6.6 current machine that crashes when X is
> running,
> > > and almost instantly when Firefox is running - it runs fine without X.
> The
> > > machine becomes totally frozen - I have to perform a forced shutdown to
> > > exit this state. The issue appears to be graphics related and is
> > > inconsistent - sometimes it crashes immediately, other times it does
> not.
> >
> > Sometimes it might be the way a particular graphics toolkit "tickles"
> > the video hardware too.  For instance FVWM uses libxcb for drawing
> > graphics which means you're likely to be just working with 2D primitives.
> >
> > Then Firefox with its GTK+ back-end fires off a few RENDER extension
> > requests to the X server and whoopsie!  Down she goes!
> >
> > > There are indeed some "unknown product" messages related to my PCI
> graphics
> > > card in my dmesg, but I haven't been able to decipher them yet. Those
> > > usually mean the device is not supported, but it is, and I'm sure I
> have
> > > the correct driver (amdgpu0). Previously I had no issues for months,
> which
> > > is why I suspected hardware failure. Admittedly I've been lucky with
> > > graphics cards over the years, and don't know much about PCI.
> >
> > No issues for months running a previous version of OpenBSD or the same
> > you're running now?
> >
> > One suggestion I made too was to maybe try setting up a serial console
> > link… turns out the motherboard makers know how to tease:
> >
> > > com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
> > > com0: probed fifo depth: 0 bytes
> >
> > That says there is a RS-232 port somewhere… so I had a look at the
> handbook:
> >
> https://dlcdnets.asus.com/pub/ASUS/mb/SocketAM4/ROG_STRIX_B450-I_GAMING/E14337_ROG_STRIX_B450-I_GAMING_UM_PRINT.pdf
> >
> > They didn't wire it up to a pin header, which is annoying.
> >
> > On the video front, I did see this:
> > > initializing kernel modesetting (POLARIS11 0x1002:0x67EF 0x1002:0x0B04
> > > 0xE5).
> > > amdgpu_irq_add_domain: stub
> > > amdgpu_device_resize_fb_bar: stub
> > > amdgpu: [powerplay] Failed to retrieve minimum clocks.
> > > amdgpu0: 1360x768, 32bpp
> > > wsdisplay0 at amdgpu0 mux 1: console (std, vt100 emulation), using
> wskbd0
> > > wskbd1: connecting to wsdisplay0
> > > wsdisplay0: screen 1-5 added (std, vt100 emulation)
> >
> > The "stub" messages make me wonder if we're hitting some
> > not-yet-implemented features.  That "failed to retrieve minimum clocks"
> > has been seen on Linux as well, and there it was related to PCI prefetch
> > register programming.
> >
> > The machine you've got isn't much different to what I have at work
> > actually: Rysen 7 1700 (so previous generation), and a RX550 video card
> > (POLARIS12, maybe slightly newer?)… the machine is fitted with a RS-232
> > serial port so I might try a little experiment with a USB stick and see
> > if I can install OpenBSD 6.6 to USB storage and try to reproduce the
> crash.
> > --
> > Stuart Longland (aka Redhatter, VK4MSL)
> >
> > I haven't lost my mind...
> >   ...it's backed up on a tape somewhere.
> >
>
> Hello Justin and Stuart,
>
> I hope the following may be of help in solving the cause of the crash.
>
> I have experienced a similar type of crash when using X on this machine
> for approximately the last 6 weeks. Prior to this, X had been running on
> this machine without apparent problems for 12 plus months.
>
> The only browser installed on this machine is lynx(1). My crashes have
> been random with no recognised culprit at the time of the crash, which
> usually occurred within 10 minutes of invoking startx(1).
>
> fvwm(1) is the only window manager installed on this machine. All my
> crashes have required the machine to be powered off to regain control.
>
> This machine's graphics card was identified by it's vendor as a:
>   Sapphire Nitro+ RX580 8G GDDR5 Graphics C

Re: Catastrophic

2020-02-29 Thread Justin Noor
Awesome - thank you for your time and for the valuable information.

That’s hilarious about the serial port. I’ll try plugging into a switch,
reproducing the crash, and SSHing into it. I still haven’t tried the
syslogd tip you mentioned either. It’s time for me to start learning more
about X. Will be in touch.

Regards

On Fri, Feb 28, 2020 at 6:57 AM Stuart Longland 
wrote:

> On 28/2/20 11:32 pm, Justin Noor wrote:
> > Thanks for offering to help and sorry for the delay - I got dragged into
> a
> > work emergency. I finally managed to SCP my dmesg to a remote machine.
>
> Heh, no problems, these things happen.
>
> > As a refresher I have a 6.6 current machine that crashes when X is
> running,
> > and almost instantly when Firefox is running - it runs fine without X.
> The
> > machine becomes totally frozen - I have to perform a forced shutdown to
> > exit this state. The issue appears to be graphics related and is
> > inconsistent - sometimes it crashes immediately, other times it does not.
>
> Sometimes it might be the way a particular graphics toolkit "tickles"
> the video hardware too.  For instance FVWM uses libxcb for drawing
> graphics which means you're likely to be just working with 2D primitives.
>
> Then Firefox with its GTK+ back-end fires off a few RENDER extension
> requests to the X server and whoopsie!  Down she goes!
>
> > There are indeed some "unknown product" messages related to my PCI
> graphics
> > card in my dmesg, but I haven't been able to decipher them yet. Those
> > usually mean the device is not supported, but it is, and I'm sure I have
> > the correct driver (amdgpu0). Previously I had no issues for months,
> which
> > is why I suspected hardware failure. Admittedly I've been lucky with
> > graphics cards over the years, and don't know much about PCI.
>
> No issues for months running a previous version of OpenBSD or the same
> you're running now?
>
> One suggestion I made too was to maybe try setting up a serial console
> link… turns out the motherboard makers know how to tease:
>
> > com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
> > com0: probed fifo depth: 0 bytes
>
> That says there is a RS-232 port somewhere… so I had a look at the
> handbook:
>
> https://dlcdnets.asus.com/pub/ASUS/mb/SocketAM4/ROG_STRIX_B450-I_GAMING/E14337_ROG_STRIX_B450-I_GAMING_UM_PRINT.pdf
>
> They didn't wire it up to a pin header, which is annoying.
>
> On the video front, I did see this:
> > initializing kernel modesetting (POLARIS11 0x1002:0x67EF 0x1002:0x0B04
> > 0xE5).
> > amdgpu_irq_add_domain: stub
> > amdgpu_device_resize_fb_bar: stub
> > amdgpu: [powerplay] Failed to retrieve minimum clocks.
> > amdgpu0: 1360x768, 32bpp
> > wsdisplay0 at amdgpu0 mux 1: console (std, vt100 emulation), using wskbd0
> > wskbd1: connecting to wsdisplay0
> > wsdisplay0: screen 1-5 added (std, vt100 emulation)
>
> The "stub" messages make me wonder if we're hitting some
> not-yet-implemented features.  That "failed to retrieve minimum clocks"
> has been seen on Linux as well, and there it was related to PCI prefetch
> register programming.
>
> The machine you've got isn't much different to what I have at work
> actually: Rysen 7 1700 (so previous generation), and a RX550 video card
> (POLARIS12, maybe slightly newer?)… the machine is fitted with a RS-232
> serial port so I might try a little experiment with a USB stick and see
> if I can install OpenBSD 6.6 to USB storage and try to reproduce the crash.
> --
> Stuart Longland (aka Redhatter, VK4MSL)
>
> I haven't lost my mind...
>   ...it's backed up on a tape somewhere.
>


Re: Catastrophic

2020-02-28 Thread Justin Noor
Thanks for offering to help and sorry for the delay - I got dragged into a
work emergency. I finally managed to SCP my dmesg to a remote machine.

As a refresher I have a 6.6 current machine that crashes when X is running,
and almost instantly when Firefox is running - it runs fine without X. The
machine becomes totally frozen - I have to perform a forced shutdown to
exit this state. The issue appears to be graphics related and is
inconsistent - sometimes it crashes immediately, other times it does not.
There are indeed some "unknown product" messages related to my PCI graphics
card in my dmesg, but I haven't been able to decipher them yet. Those
usually mean the device is not supported, but it is, and I'm sure I have
the correct driver (amdgpu0). Previously I had no issues for months, which
is why I suspected hardware failure. Admittedly I've been lucky with
graphics cards over the years, and don't know much about PCI.

dmesg:

OpenBSD 6.6-current (GENERIC) #606: Fri Jan 31 19:02:51 MST 2020
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC
real mem = 34268147712 (32680MB)
avail mem = 33217200128 (31678MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xe68e0 (48 entries)
bios0: vendor American Megatrends Inc. version "1001" date 09/27/2018
bios0: ASUSTeK COMPUTER INC. ROG STRIX B450-I GAMING
acpi0 at bios0: ACPI 6.0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC FPDT FIDT SSDT SSDT CRAT CDIT SSDT MCFG SSDT
HPET SSDT UEFI BGRT WPBT IVRS SSDT
acpi0: wakeup devices GPP0(S4) GPP0(S4) GPP1(S4) GPP3(S4) GPP4(S4) GPP5(S4)
GPP6(S4) GPP7(S4) GPP8(S4) X161(S4) GPP9(S4) X162(S4) GPPA(S4) GPPB(S4)
GPPC(S4) GPPD(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD Ryzen 5 2600 Six-Core Processor, 3394.18 MHz, 17-08-02
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,SKINIT,TCE,TOPEXT,CPCTR,DBKP,PCTRL3,MWAITX,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,RDSEED,ADX,SMAP,CLFLUSHOPT,SHA,IBPB,XSAVEOPT,XSAVEC,XGETBV1,XSAVES
cpu0: 64KB 64b/line 4-way I-cache, 32KB 64b/line 8-way D-cache, 512KB
64b/line 8-way L2 cache, 16MB 64b/line 16-way L3 cache
cpu0: ITLB 64 4KB entries fully associative, 64 4MB entries fully
associative
cpu0: DTLB 64 4KB entries fully associative, 64 4MB entries fully
associative
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=1.1, IBE
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
ioapic0 at mainbus0: apid 13 pa 0xfec0, version 21, 24 pins
ioapic1 at mainbus0: apid 14 pa 0xfec01000, version 21, 32 pins
acpimcfg0 at acpi0
acpimcfg0: addr 0xf800, bus 0-63
acpihpet0 at acpi0: 14318180 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (GPP0)
acpiprt2 at acpi0: bus -1 (GPP1)
acpiprt3 at acpi0: bus -1 (GPP3)
acpiprt4 at acpi0: bus -1 (GPP4)
acpiprt5 at acpi0: bus -1 (GPP5)
acpiprt6 at acpi0: bus -1 (GPP6)
acpiprt7 at acpi0: bus -1 (GPP7)
acpiprt8 at acpi0: bus 6 (GPP8)
acpiprt9 at acpi0: bus -1 (GPP9)
acpiprt10 at acpi0: bus -1 (GPPA)
acpiprt11 at acpi0: bus -1 (GPPB)
acpiprt12 at acpi0: bus -1 (GPPC)
acpiprt13 at acpi0: bus -1 (GPPD)
acpiprt14 at acpi0: bus -1 (GPPE)
acpiprt15 at acpi0: bus -1 (GPPF)
acpiprt16 at acpi0: bus 7 (GP17)
acpiprt17 at acpi0: bus 8 (GP18)
acpiprt18 at acpi0: bus 1 (GPP2)
acpiec0 at acpi0
acpicpu0 at acpi0: C2(0@400 io@0x414), C1(0@1 mwait), PSS
acpipci0 at acpi0 PCI0: 0x0010 0x0011 0x
acpicmos0 at acpi0
acpibtn0 at acpi0: PWRB
amdgpio0 at acpi0: GPIO uid 0 addr 0xfed81500/0x400 irq 7, 184 pins
"AMDIF030" at acpi0 not configured
"PNP0C14" at acpi0 not configured
"PNP0C14" at acpi0 not configured
"PNP0C14" at acpi0 not configured
cpu0: 3394 MHz: speeds: 3400 2800 1550 MHz
pci0 at mainbus0 bus 0
ksmn0 at pci0 dev 0 function 0 "AMD 17h Root Complex" rev 0x00
"AMD 17h IOMMU" rev 0x00 at pci0 dev 0 function 2 not configured
pchb0 at pci0 dev 1 function 0 "AMD 17h PCIE" rev 0x00
ppb0 at pci0 dev 1 function 3 "AMD 17h PCIE" rev 0x00: msi
pci1 at ppb0 bus 1
xhci0 at pci1 dev 0 function 0 vendor "AMD", unknown product 0x43d5 rev
0x01: msi, xHCI 1.10
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 configuration 1 interface 0 "AMD xHCI root hub" rev 3.00/1.00
addr 1
ahci0 at pci1 dev 0 function 1 "AMD 400 Series AHCI" rev 0x01: msi, 

Re: Catastrophic

2020-02-11 Thread Justin Noor
Yes the machine runs without X. I can scp a copy of my dmesg to a remote
machine and go from there. Will be in touch soon. Thank you.

On Sun, Feb 9, 2020 at 3:06 PM Stuart Longland 
wrote:

> On 27/1/20 11:59 pm, Justin Noor wrote:
> > I am unable to send any log files or anything. I had to send this
> > email from a different machine. I can take pictures of log files and
> > transfer the information, but I'm not sure where to start.
>
> A `dmesg` before the crash would at least tell us whether there's
> problematic hardware/drivers in use.  Even though it's not taken at the
> moment of the crash doesn't mean it's worthless.
>
> Has the machine got a serial port?  Maybe you could hook that up to a
> logging terminal emulator on another computer via a null-modem cable?
> (It may need to be a PCI(e)-connected serial port rather than USB, not
> many OSes support serial console over USB due to the complexities of USB
> itself.)
>
> Maybe you could configure syslogd(8) to send its logs via UDP to a
> syslog on another computer?  It might not catch the very last log
> messages, but maybe might capture enough?
> --
> Stuart Longland (aka Redhatter, VK4MSL)
>
> I haven't lost my mind...
>   ...it's backed up on a tape somewhere.
>
>


Re: strange dmesg

2020-02-08 Thread Justin Noor
Thank you. Yes they are truly superb devices. I’m using the RAM that it
came with, but I did change the mSATA SSD to a Samsung Evo. I haven’t found
time to investigate the weird output, but I don’t suspect any corruption -
the device works fine. Probably some garbage from previous boots as was
mentioned earlier. First time I’ve experienced that.

On Sat, Feb 8, 2020 at 4:50 PM Predrag Punosevac 
wrote:

> Justin Noor wrote:
>
> > I have the same output on a Protecli firewall device (it's not in
> > production yet) running 6.6 stable, and have yet to figure out what it
> > is.
> > I'm planning to spend some time on it next week. It's a brand new device
> > and there were no errors during installation.
> >
> > Specs:
> >
> >- Intel Dual Core Celeron J1800, 64 bit, 2.4GHz, 2MB L2 Cache
> >- 2 Intel Gigabit Ethernet NIC ports
> >- 2GB DDR3 RAM, 250GB Samsung Evo 860 mSATA SSD
>
> Protecli are super picky about RAM and SSD drives. I have had one in
> production for almost three years now. No problems. Please see dmesg
>
>
> OpenBSD 6.6 (GENERIC.MP) #4: Wed Jan 15 10:55:43 MST 2020
> r...@syspatch-66-amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/
> GENERIC.MP
> real mem = 4165738496 (3972MB)
> avail mem = 4026773504 (3840MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xebea0 (51 entries)
> bios0: vendor American Megatrends Inc. version "5.6.5" date 08/15/2016
> acpi0 at bios0: ACPI 5.0
> acpi0: sleep states S0 S3 S4 S5
> acpi0: tables DSDT FACP APIC FPDT FIDT TCPA MCFG HPET SSDT SSDT SSDT UEFI
> SSDT TPM2
> acpi0: wakeup devices EHC1(S4) PXSX(S4) PXSX(S4) PXSX(S4) PXSX(S4)
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: Intel(R) Celeron(R) CPU J1900 @ 1.99GHz, 2000.33 MHz, 06-37-08
> cpu0:
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,MOVBE,POPCNT,DEADLINE,RDRAND,NXE,RDTSCP,LONG,LAHF,3DNOWP,PERF,ITSC,TSC_ADJUST,SMEP,ERMS,MD_CLEAR,IBRS,IBPB,STIBP,SENSOR,ARAT,MELTDOWN
> cpu0: 1MB 64b/line 16-way L2 cache
> cpu0: smt 0, core 0, package 0
> mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
> cpu0: apic clock running at 83MHz
> cpu0: mwait min=64, max=64, C-substates=0.2.0.0.0.0.3.3, IBE
> cpu1 at mainbus0: apid 2 (application processor)
> cpu1: Intel(R) Celeron(R) CPU J1900 @ 1.99GHz, 2000.01 MHz, 06-37-08
> cpu1:
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,MOVBE,POPCNT,DEADLINE,RDRAND,NXE,RDTSCP,LONG,LAHF,3DNOWP,PERF,ITSC,TSC_ADJUST,SMEP,ERMS,MD_CLEAR,IBRS,IBPB,STIBP,SENSOR,ARAT,MELTDOWN
> cpu1: 1MB 64b/line 16-way L2 cache
> cpu1: smt 0, core 1, package 0
> cpu2 at mainbus0: apid 4 (application processor)
> cpu2: Intel(R) Celeron(R) CPU J1900 @ 1.99GHz, 2000.02 MHz, 06-37-08
> cpu2:
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,MOVBE,POPCNT,DEADLINE,RDRAND,NXE,RDTSCP,LONG,LAHF,3DNOWP,PERF,ITSC,TSC_ADJUST,SMEP,ERMS,MD_CLEAR,IBRS,IBPB,STIBP,SENSOR,ARAT,MELTDOWN
> cpu2: 1MB 64b/line 16-way L2 cache
> cpu2: smt 0, core 2, package 0
> cpu3 at mainbus0: apid 6 (application processor)
> cpu3: Intel(R) Celeron(R) CPU J1900 @ 1.99GHz, 2000.01 MHz, 06-37-08
> cpu3:
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,MOVBE,POPCNT,DEADLINE,RDRAND,NXE,RDTSCP,LONG,LAHF,3DNOWP,PERF,ITSC,TSC_ADJUST,SMEP,ERMS,MD_CLEAR,IBRS,IBPB,STIBP,SENSOR,ARAT,MELTDOWN
> cpu3: 1MB 64b/line 16-way L2 cache
> cpu3: smt 0, core 3, package 0
> ioapic0 at mainbus0: apid 1 pa 0xfec0, version 20, 87 pins
> acpimcfg0 at acpi0
> acpimcfg0: addr 0xe000, bus 0-255
> acpihpet0 at acpi0: 14318179 Hz
> acpiprt0 at acpi0: bus 0 (PCI0)
> acpiprt1 at acpi0: bus 1 (RP01)
> acpiprt2 at acpi0: bus 2 (RP02)
> acpiprt3 at acpi0: bus 3 (RP03)
> acpiprt4 at acpi0: bus 4 (RP04)
> acpiec0 at acpi0: not present
> acpicpu0 at acpi0: C3(10@1500 mwait.1@0x52), C2(10@500 mwait.1@0x51),
> C1(1000@1 mwait.1), PSS
> acpicpu1 at acpi0: C3(10@1500 mwait.1@0x52), C2(10@500 mwait.1@0x51),
> C1(1000@1 mwait.1), PSS
> acpicpu2 at acpi0: C3(10@1500 mwait.1@0x52), C2(10@500 mwait.1@0x51),
> C1(1000@1 mwai

Re: strange dmesg

2020-02-08 Thread Justin Noor
I have the same output on a Protecli firewall device (it’s not in
production yet) running 6.6 stable, and have yet to figure out what it is.
I’m planning to spend some time on it next week. It’s a brand new device
and there were no errors during installation.

Specs:

   - Intel Dual Core Celeron J1800, 64 bit, 2.4GHz, 2MB L2 Cache
   - 2 Intel Gigabit Ethernet NIC ports
   - 2GB DDR3 RAM, 250GB Samsung Evo 860 mSATA SSD


On Sat, Feb 8, 2020 at 4:39 AM Peter Nicolai Mathias Hansteen <
pe...@bsdly.net> wrote:

>
>
> > 8. feb. 2020 kl. 11:28 skrev whistlez...@riseup.net:
> >
> > Hi,
> > I have some strange output from dmesg, what could be ?
> > At the follwoing link I've posted some screenshots:
> > https://postimg.cc/gallery/1o4wsaw74/
>
>
> Is this running on bare metal, or under a hypervisor of some sort?
>
> I vaguely remember odd dimes output like that on IIRC an early VMWare
> installs, but it *has* been a while.
>
> Then of course the simplest explanation is, as already mentioned in this
> thread, file system corruption.
>
> All the best,
> Peter
>
> —
> Peter N. M. Hansteen, member of the first RFC 1149 implementation team
> http://bsdly.blogspot.com/ http://www.bsdly.net/ http://www.nuug.no/
> "Remember to set the evil bit on all malicious network traffic"
> delilah spamd[29949]: 85.152.224.147: disconnected after 42673 seconds.
>
>
>
>
>


Catastrophic

2020-01-27 Thread Justin Noor
Hello community,

I'm looking for any advice on how to troubleshoot some strange and
catastrophic behavior on my OpenBSD machine. Seemingly out of nowhere, it
started freezing to the extent that only a forced shutdown (holding down
the power button) gets me out of it. I suspect it's some kind of hardware
failure, but I'm not 100% sure. It crashes when xenodm is running.
Especially with firefox--it crashes instantly. If I disable xenodm it runs
fine. I am unable to send any log files or anything. I had to send this
email from a different machine. I can take pictures of log files and
transfer the information, but I'm not sure where to start. Any feedback
would be greatly appreciated.

Machine specs:

Version: 6.6 Current (always up-to-date)
Architecture: amd64
Kernel: '$ uname -a' OpenBSD myhost.myhost.com 6.6 GENERIC#601 amd64
Chipset: AMD Ryzen 5
GPU: Radeon RX 560 series, amdgpu0: msi

Thank you,

Justin Noor


Re: Tools for writers

2019-11-02 Thread Justin Noor
Mr. Hansteen what are your thoughts on Texlive?

On Sat, Nov 2, 2019 at 9:16 AM Peter Nicolai Mathias Hansteen <
pe...@bsdly.net> wrote:

>
>
> > 2. nov. 2019 kl. 16:00 skrev Oliver Leaver-Smith :
> >
> > What tools do people find useful for writing on OpenBSD? By writing I
> mean long form such as novels and technical books, including plot and
> character development, outlining, and formatting for publishing (not all
> the same application necessarily)
> >
> > I have found a number which boast Linux support, but not really anything
> that stands out which supports OpenBSD (aside from the obvious LaTeX et al.)
>
> I really can’t speak to plot and character development, but all three
> editions of The Book of PF were written using OpenOffice and later
> LibreOffice write on OpenBSD snapshots.
>
> Earlier versions of that manuscript were developed using DocBook SGML
> (editing with emacs), but the publisher (fortunately) did not want any
> truck with that.
>
> For any new projects I would likely look half-heartedly for something
> markdown based but would probably end up going the LibreOffice route again.
>
> —
> Peter N. M. Hansteen, member of the first RFC 1149 implementation team
> http://bsdly.blogspot.com/ http://www.bsdly.net/ http://www.nuug.no/
> "Remember to set the evil bit on all malicious network traffic"
> delilah spamd[29949]: 85.152.224.147: disconnected after 42673 seconds.
>
>
>
>
>


Re: Two part question on httpd

2019-10-21 Thread Justin Noor
Try these sites:

https://learnbchs.org
https://kristaps.bsd.lv/kcgi

On Mon, Oct 21, 2019 at 11:20 AM Jeremy  wrote:

> Hello,
>
> I am experimenting with httpd's cgi options.
>
> Why when I run binaries written in C from /var/www/cgi-bin, it's allowed
> but if I use other compiled languages (ex: Haskell) I need to adjust the
> wxallowed options for where /var/www/cgi-bin is mounted?
>
> Is this due to where it says: "...The base system has no W^X-violating
> programs, but the ports tree contains quite a few" in the following?
> https://www.openbsd.org/faq/upgrade60.html
>
> Additionally, if c/c++ are indeed the few compiled languages which do
> not violate this option, where might one find a library to write a
> C program which interacts with mysql/mariadb? So far, I have only found
> mysql++ and would prefer not to use c++ unless there are no other
> options. My goal is to write a simple REST api which interacts with
> mysql, and serves via httpd. I already have one written in PHP, but
> would like to port it to a compiled language.
>
> Regards,
>
> -J
>


Re: wrong pkg_add url after sysupgrade

2019-10-09 Thread Justin Noor
For future reference you could also:

export PKG_PATH=“
https://cdn.openbsd.org/pub/OpenBSD/snapshots/amd64”

Or whatever your preferred mirror is.

Then pkg_add -u should work

On Wed, Oct 9, 2019 at 6:42 AM shadrock uhuru  wrote:

> after trying sysupgrade for the first time on my laptop running snapshots
> running the following command returns no such dir.
>
> doas pkg_add -u
> https://ftp.OpenBSD.org/pub/OpenBSD/6.6/packages/amd64/: no such dir
> pkg_info p5-finance
> https://ftp.OpenBSD.org/pub/OpenBSD/6.6/packages/amd64/: no such dir
>
> my /etc/installurl has
> cat /etc/installurl
> https://ftp.OpenBSD.org/pub/OpenBSD
>
> does this need editing
> if so what url should i use ?
>
> shadrock
>