Re: Installing OpenBSD -current snapshots

2019-11-28 Thread Peter N. M. Hansteen
On Fri, Nov 29, 2019 at 01:45:37AM -0600, Clay Daniels wrote:
> Another question. I know I need to write the boot file to the usb drive
> thus:
> # dd if=install66.fs of=/dev/da0 bs=1M conv=sync
> But can I just use plain old "cp base66.tgz /mnt" etc for the other files?

the installnn.fs image will have the file sets in there already. No need to 
copy.

- 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.



Re: SIGBUS on octeon for my program

2019-11-28 Thread Peter J. Philipp
On Thu, Nov 28, 2019 at 11:44:07PM -0700, Theo de Raadt wrote:
> Half the cpu platforms fault on unaligned access.
> 
> There are strategies for handling this. Your code must use them.
> 
> It is kind of boring, actually.

I took a look at how libasr does it, and I have similar code ie. pack8(), 
pack16(), pack32(), I will just change all my functions, as unalignment 
flags passed per -m aren't standard on every arch.  I did use __packed on 
structs already but the way libasr does is a great example I think.

It's a bit of work but the fact that this could work on architectures like
octeon make it worth it for me.

Thanks a lot!
-peter



Re: Installing OpenBSD -current snapshots

2019-11-28 Thread Clay Daniels
Another question. I know I need to write the boot file to the usb drive
thus:
# dd if=install66.fs of=/dev/da0 bs=1M conv=sync
But can I just use plain old "cp base66.tgz /mnt" etc for the other files?

On Fri, Nov 29, 2019 at 1:26 AM Clay Daniels 
wrote:

> Nick, thanks for straightening me out about what is actually going on here
> with the install. I see that there is now a fresh snapshot with today's
> date, not the one I downloaded and ran yesterday. This might tend to keep
> one busy. I'm not sure I would not be better off doing what Bruno & Marc
> suggested and run sysupgrade. Thanks to them for the advice.
>
> If I do decide to put the filesets on the the install thumbdrive, I see a
> total of 26 files in the directory. Obviously some are not necessary like
> the floppy or both the .fs & .iso (just one needed), nor the test
> instructions, etc.
> So which files do I REALLY need on my usb thumbdrive to get a complete
> install, x included?
>
> Please excuse the "top-posting". That's the only way my darn google mail
> does reply's. Kind of irritating, to me and the reader too.
>
> Clay
>
>
>
>
> On Thu, Nov 28, 2019 at 12:34 PM Nick Holland 
> wrote:
>
>> On 2019-11-27 21:29, Edgar Pettijohn wrote:
>> > On Wed, Nov 27, 2019 at 08:05:30PM -0600, Clay Daniels wrote:
>> >> I have successfully installed OpenBSD 6.6 release and would like to
>> give
>> >> the Current Snapshots a try. I went to a mirror, and to:
>> >>
>> >> Index of /pub/OpenBSD/snapshots/amd64/
>> >>
>> >> I saw install66.fs (probably for usb memstick) and install66.iso
>> (surely
>> >> for a cd/dvd) at ~450Mb. I picked the install66.fs, wrote it to a usb
>> >> thumbdrive, and it starts the install. When i get into the install it
>> asks
>> >> where are the file sets? Humm, maybe it gets these online and it tries
>> to
>> >> do this but no luck. It was late last night, and I checked to see if
>> it had
>> >> written anything to my disk, which it had not, and went to bed. This
>> >> evening I'm looking a bit deeper at the snapshot directory and I
>> suspect I
>> >> need to provide the install with base66.tzg at ~239Mb.
>>
>> NO!
>>
>> [snip misleading stuff]
>> > I noticed this also, but hadn't had time to figure out if I had messed
>> up or
>> > the installer had. As a general rule I assume its me that messed up.
>> Its odd
>> > if you mount the install66.fs you can see the pub/amd64 directory, but
>> during
>> > installation it can't seem to find the directory regardless of what I
>> have
>> > tried.
>> >
>> > Edgar
>>
>> First of all...nothing at all to do about snapshots -- the OpenBSD
>> installation process has remained amazingly stable over the last 20
>> years.
>> New options here and there, but overall, very similar.  Unless something
>> changed in the last few days, installing a snapshot is identical to
>> installing 6.6.
>>
>> The installXX.iso and installXX.fs are complete, stand-alone installation
>> kits.  Everything you need is on them.  You can boot from them, and all
>> the installation files are right there.  Look Ma!  No network needed!
>> ...well...unfortunately there is the issue of firmware files, which are
>> legally not feasible to put on the install media, so you will need network
>> for most machines eventually.  But let's ignore that for now. :)
>>
>> Once the system has booted on the install kernel, you have three devices
>> you are working with:
>> 1) the install kernel's internal "RAM disk" that is part of bsd.rd which
>>   you booted from,
>> 2) your target disk
>> 3) the USB drive with the install files on it.
>>
>> The reason you can't see the install files on the USB stick from the
>> install kernel is they aren't mounted.  You didn't boot from the entire
>> USB stick, you booted from ONE TINY LITTLE bsd.rd file, that just happened
>> to be sitting on the big USB stick...but as far as bsd.rd is concerned,
>> the USB stick isn't part of the booted environment (yet).
>>
>> You aren't booting from a "Live Media".  You are booting from a tiny
>> kernel
>> with a built in file system that's sitting on the same inert file system
>> as
>> the install files.
>>
>> Read that over and over until you understand what I'm saying, not what you
>> are assuming is going on.  It's really important to understand.  It's very
>> different from many Linux installation processes -- you are running off a
>> file only 10MB in size which is now completely in RAM.  That file JUST
>> HAPPENED to come from a USB stick that's much bigger.
>>
>> So, when it comes to answering where your install files are, they are on
>> a disk, but it's NOT a mounted disk.  It's on your USB drive that's not
>> mounted now, and won't be after installation, but could be useful shortly.
>>
>> Your next problem is...WHICH disk?  On a minimal system, it would be the
>> next sd device after your install disk -- assuming you are installing to
>> sd0, your USB stick might be sd1.  HOWEVER, if you have a flash media
>> reader
>> on your system, who knows where 

Re: Installing OpenBSD -current snapshots

2019-11-28 Thread Clay Daniels
Nick, thanks for straightening me out about what is actually going on here
with the install. I see that there is now a fresh snapshot with today's
date, not the one I downloaded and ran yesterday. This might tend to keep
one busy. I'm not sure I would not be better off doing what Bruno & Marc
suggested and run sysupgrade. Thanks to them for the advice.

If I do decide to put the filesets on the the install thumbdrive, I see a
total of 26 files in the directory. Obviously some are not necessary like
the floppy or both the .fs & .iso (just one needed), nor the test
instructions, etc.
So which files do I REALLY need on my usb thumbdrive to get a complete
install, x included?

Please excuse the "top-posting". That's the only way my darn google mail
does reply's. Kind of irritating, to me and the reader too.

Clay




On Thu, Nov 28, 2019 at 12:34 PM Nick Holland 
wrote:

> On 2019-11-27 21:29, Edgar Pettijohn wrote:
> > On Wed, Nov 27, 2019 at 08:05:30PM -0600, Clay Daniels wrote:
> >> I have successfully installed OpenBSD 6.6 release and would like to give
> >> the Current Snapshots a try. I went to a mirror, and to:
> >>
> >> Index of /pub/OpenBSD/snapshots/amd64/
> >>
> >> I saw install66.fs (probably for usb memstick) and install66.iso (surely
> >> for a cd/dvd) at ~450Mb. I picked the install66.fs, wrote it to a usb
> >> thumbdrive, and it starts the install. When i get into the install it
> asks
> >> where are the file sets? Humm, maybe it gets these online and it tries
> to
> >> do this but no luck. It was late last night, and I checked to see if it
> had
> >> written anything to my disk, which it had not, and went to bed. This
> >> evening I'm looking a bit deeper at the snapshot directory and I
> suspect I
> >> need to provide the install with base66.tzg at ~239Mb.
>
> NO!
>
> [snip misleading stuff]
> > I noticed this also, but hadn't had time to figure out if I had messed
> up or
> > the installer had. As a general rule I assume its me that messed up. Its
> odd
> > if you mount the install66.fs you can see the pub/amd64 directory, but
> during
> > installation it can't seem to find the directory regardless of what I
> have
> > tried.
> >
> > Edgar
>
> First of all...nothing at all to do about snapshots -- the OpenBSD
> installation process has remained amazingly stable over the last 20
> years.
> New options here and there, but overall, very similar.  Unless something
> changed in the last few days, installing a snapshot is identical to
> installing 6.6.
>
> The installXX.iso and installXX.fs are complete, stand-alone installation
> kits.  Everything you need is on them.  You can boot from them, and all
> the installation files are right there.  Look Ma!  No network needed!
> ...well...unfortunately there is the issue of firmware files, which are
> legally not feasible to put on the install media, so you will need network
> for most machines eventually.  But let's ignore that for now. :)
>
> Once the system has booted on the install kernel, you have three devices
> you are working with:
> 1) the install kernel's internal "RAM disk" that is part of bsd.rd which
>   you booted from,
> 2) your target disk
> 3) the USB drive with the install files on it.
>
> The reason you can't see the install files on the USB stick from the
> install kernel is they aren't mounted.  You didn't boot from the entire
> USB stick, you booted from ONE TINY LITTLE bsd.rd file, that just happened
> to be sitting on the big USB stick...but as far as bsd.rd is concerned,
> the USB stick isn't part of the booted environment (yet).
>
> You aren't booting from a "Live Media".  You are booting from a tiny kernel
> with a built in file system that's sitting on the same inert file system as
> the install files.
>
> Read that over and over until you understand what I'm saying, not what you
> are assuming is going on.  It's really important to understand.  It's very
> different from many Linux installation processes -- you are running off a
> file only 10MB in size which is now completely in RAM.  That file JUST
> HAPPENED to come from a USB stick that's much bigger.
>
> So, when it comes to answering where your install files are, they are on
> a disk, but it's NOT a mounted disk.  It's on your USB drive that's not
> mounted now, and won't be after installation, but could be useful shortly.
>
> Your next problem is...WHICH disk?  On a minimal system, it would be the
> next sd device after your install disk -- assuming you are installing to
> sd0, your USB stick might be sd1.  HOWEVER, if you have a flash media
> reader
> on your system, who knows where it is.  One trick would be to unplug your
> USB drive and plug it back in and look at the white-on-blue console message
> that come up at you.  Yes, you are unpluging your boot device, sounds bad,
> but read what I wrote earlier, it's no longer using that -- the boot has
> completed, and it's running from RAM now, it's completely ignoring that
> USB drive.  So let's say you do this and 

Re: SIGBUS on octeon for my program

2019-11-28 Thread Theo de Raadt
Half the cpu platforms fault on unaligned access.

There are strategies for handling this. Your code must use them.

It is kind of boring, actually.


Peter J. Philipp  wrote:

> On Wed, Nov 27, 2019 at 03:30:23PM +0100, Peter J. Philipp wrote:
> > Hi David,
> > 
> > I'm going to upgrade to -current and then report back.. it'll take me a few
> > days to do that (I'm super slow).
> > 
> > ...
> > I'll see if this sort of issue repeats after I upgrade the octeon router
> > to -current.
> > 
> > Thanks!
> > -peter
> 
> Hi David and Misc@,
> 
> OK this is weird.  For people who are just reading this thread it's about
> OpenBSD/octeon SIGBUS'ing my program with an unalignment error.
> 
> I upgraded to -current (very pleased that pppoe0 works now, as an aside),
> and got the debug right after the fork.  Here is the output of gdb 
> 
> debug.1--->
> Continuing.
> 
> Program received signal SIGBUS, Bus error.
> lookup_axfr (f=0x2c6274db78, so=6, zonename=0x2c6b3d2130 "words.", 
> mysoa=0xfe7920, format=20, tsigkey=0x2c37b083d0 "pass", 
> tsigpass=0xfe7b60 "*censored*=", 
> segment=0xfe7b40, answers=0xfe7b3c, additionalcount=0xfe7b38)
> at util.c:1842
> 1842*type = htons(DNS_TYPE_AXFR);
> (gdb) list
> 1837
> 1838memcpy(p, name, len);
> 1839totallen += len;
> 1840
> 1841type = (u_int16_t *)[totallen];
> 1842*type = htons(DNS_TYPE_AXFR);
> 1843totallen += sizeof(u_int16_t);
> 1844
> 1845class = (u_int16_t *)[totallen];
> 1846*class = htons(DNS_CLASS_IN);
> (gdb) print type
> $1 = (u_int16_t *) 0xfe763d
> <-
> 
> So I point a pointer of type u_int16_t to a memory address (which may be
> unaligned) and then load it with a value.  I've always done it this way
> throughout my program, but just to be sure that it isn't caused by the stack
> somehow I moved query variable to the heap (or it's equivalent) and tried
> again.
> 
> debug.2--->
> Loaded symbols for /usr/libexec/ld.so
> pull_remote_zone (lrz=0x216549d000) at parse.y:3605
> 3605while (debugger == 1)
> (gdb) set debugger=0
> Current language:  auto; currently minimal
> (gdb) cont
> Continuing.
> 
> Program received signal SIGBUS, Bus error.
> lookup_axfr (f=0x21b8dfdb78, so=6, zonename=0x22041a4a10 "words.", 
> mysoa=0xff9050, format=20, tsigkey=0x22052c35b0 "pass", 
> tsigpass=0xff9290 "*censored*=", 
> segment=0xff9270, answers=0xff926c, additionalcount=0xff9268)
> at util.c:1849
> 1849*type = htons(DNS_TYPE_AXFR);
> (gdb) print type
> $1 = (u_int16_t *) 0x21d57f1015
> (gdb) print query
> $2 = 0x21d57f1000 ""
> (gdb) print (char*)type - query
> $3 = 21
> <---
> 
> So now I have a true offset of variable type it's not aligned.  What can I
> do here?  Does this need fixing in OpenBSD/octeon or do I have to fix my
> code for this?  I don't really know what to use instead of this other than
> memcpy'ing this value instead of (overloading?) the 16 bit integer.
> 
> Any help is welcomed!
> 
> Best regards,
> -peter
> 



Re: SIGBUS on octeon for my program

2019-11-28 Thread Peter J. Philipp
On Wed, Nov 27, 2019 at 03:30:23PM +0100, Peter J. Philipp wrote:
> Hi David,
> 
> I'm going to upgrade to -current and then report back.. it'll take me a few
> days to do that (I'm super slow).
> 
> ...
> I'll see if this sort of issue repeats after I upgrade the octeon router
> to -current.
> 
> Thanks!
> -peter

Hi David and Misc@,

OK this is weird.  For people who are just reading this thread it's about
OpenBSD/octeon SIGBUS'ing my program with an unalignment error.

I upgraded to -current (very pleased that pppoe0 works now, as an aside),
and got the debug right after the fork.  Here is the output of gdb 

debug.1--->
Continuing.

Program received signal SIGBUS, Bus error.
lookup_axfr (f=0x2c6274db78, so=6, zonename=0x2c6b3d2130 "words.", 
mysoa=0xfe7920, format=20, tsigkey=0x2c37b083d0 "pass", 
tsigpass=0xfe7b60 "*censored*=", 
segment=0xfe7b40, answers=0xfe7b3c, additionalcount=0xfe7b38)
at util.c:1842
1842*type = htons(DNS_TYPE_AXFR);
(gdb) list
1837
1838memcpy(p, name, len);
1839totallen += len;
1840
1841type = (u_int16_t *)[totallen];
1842*type = htons(DNS_TYPE_AXFR);
1843totallen += sizeof(u_int16_t);
1844
1845class = (u_int16_t *)[totallen];
1846*class = htons(DNS_CLASS_IN);
(gdb) print type
$1 = (u_int16_t *) 0xfe763d
<-

So I point a pointer of type u_int16_t to a memory address (which may be
unaligned) and then load it with a value.  I've always done it this way
throughout my program, but just to be sure that it isn't caused by the stack
somehow I moved query variable to the heap (or it's equivalent) and tried
again.

debug.2--->
Loaded symbols for /usr/libexec/ld.so
pull_remote_zone (lrz=0x216549d000) at parse.y:3605
3605while (debugger == 1)
(gdb) set debugger=0
Current language:  auto; currently minimal
(gdb) cont
Continuing.

Program received signal SIGBUS, Bus error.
lookup_axfr (f=0x21b8dfdb78, so=6, zonename=0x22041a4a10 "words.", 
mysoa=0xff9050, format=20, tsigkey=0x22052c35b0 "pass", 
tsigpass=0xff9290 "*censored*=", 
segment=0xff9270, answers=0xff926c, additionalcount=0xff9268)
at util.c:1849
1849*type = htons(DNS_TYPE_AXFR);
(gdb) print type
$1 = (u_int16_t *) 0x21d57f1015
(gdb) print query
$2 = 0x21d57f1000 ""
(gdb) print (char*)type - query
$3 = 21
<---

So now I have a true offset of variable type it's not aligned.  What can I
do here?  Does this need fixing in OpenBSD/octeon or do I have to fix my
code for this?  I don't really know what to use instead of this other than
memcpy'ing this value instead of (overloading?) the 16 bit integer.

Any help is welcomed!

Best regards,
-peter



Re: Deleting softraid Devices Fujitsu Sparc

2019-11-28 Thread Kihaguru Gathura
On Thursday, November 28, 2019, Kihaguru Gathura  wrote:
>
>
>
> www# bioctl sd2 displays the raid but www# bioctl -d sd2 does not delete
the raid.
>
>
>
> On Thursday, November 28, 2019, Kihaguru Gathura 
wrote:
>>
>>
>> On Thursday, November 28, 2019, Nick Holland 
wrote:
>>> On 2019-11-27 11:23, Kihaguru Gathura wrote:
 Hi,

 An error while deleting softraid device follows


--
 Available disks are: sd0 sd1 sd2.
 Which disk is the root disk? ('?' for details) [sd0] ?
 sd0: FUJITSU, MAT3073N SUN72G, 0602
 serial.FUJITSU_MAT3073N_SUN72G_000506B00RAR_AAN0P5200RAR (68.4G)
 sd1: FUJITSU, MAT3073N SUN72G, 0602
 serial.FUJITSU_MAT3073N_SUN72G_000506B00SSL_AAN0P5200SSL (68.4G)
 sd2: OPENBSD, SR RAID 1, 006  (68.4G)
 Available disks are: sd0 sd1 sd2.
 Which disk is the root disk? ('?' for details) [sd0] !
 Type 'exit' to return to install.
 www# bioctl -d sd2
 bioctl: Can't locate sd2 device via /dev/bio



 The aim is to remove the device from the system and then:

 # dd if=/dev/zero of=/dev/rsd0c bs=1m count=1
 # dd if=/dev/zero of=/dev/rsd1c bs=1m count=1

 to reuse the disks.

 Thanks,

 Kihaguru

>>>
>>> The install kernels have very minimal disk support.  In the case of
>>> amd64/i386, it's one wd device -- wd0, not sure about sparc64, but
>>> I'd bet a cheap lunch that sd2 is not there. :)
>>>
>>
>> sd2 exists and www# bioctl sd2 displays the mirror.
>>
>>
> www# bioctl sd2 displays the raid but www# bioctl -d sd2 does not delete
the raid.
>
Meanwhile done # dd if=/dev/zero of=/dev/rsd2c bs=1m count=1 and reused the
raid device.

Kihaguru.


Re: Deleting softraid Devices Fujitsu Sparc

2019-11-28 Thread Kihaguru Gathura
www# bioctl sd2 displays the raid but www# bioctl -d sd2 does not delete
the raid.



On Thursday, November 28, 2019, Kihaguru Gathura  wrote:
>
>
> On Thursday, November 28, 2019, Nick Holland 
wrote:
>> On 2019-11-27 11:23, Kihaguru Gathura wrote:
>>> Hi,
>>>
>>> An error while deleting softraid device follows
>>>
>>>
--
>>> Available disks are: sd0 sd1 sd2.
>>> Which disk is the root disk? ('?' for details) [sd0] ?
>>> sd0: FUJITSU, MAT3073N SUN72G, 0602
>>> serial.FUJITSU_MAT3073N_SUN72G_000506B00RAR_AAN0P5200RAR (68.4G)
>>> sd1: FUJITSU, MAT3073N SUN72G, 0602
>>> serial.FUJITSU_MAT3073N_SUN72G_000506B00SSL_AAN0P5200SSL (68.4G)
>>> sd2: OPENBSD, SR RAID 1, 006  (68.4G)
>>> Available disks are: sd0 sd1 sd2.
>>> Which disk is the root disk? ('?' for details) [sd0] !
>>> Type 'exit' to return to install.
>>> www# bioctl -d sd2
>>> bioctl: Can't locate sd2 device via /dev/bio
>>>

>>>
>>> The aim is to remove the device from the system and then:
>>>
>>> # dd if=/dev/zero of=/dev/rsd0c bs=1m count=1
>>> # dd if=/dev/zero of=/dev/rsd1c bs=1m count=1
>>>
>>> to reuse the disks.
>>>
>>> Thanks,
>>>
>>> Kihaguru
>>>
>>
>> The install kernels have very minimal disk support.  In the case of
>> amd64/i386, it's one wd device -- wd0, not sure about sparc64, but
>> I'd bet a cheap lunch that sd2 is not there. :)
>>
>
> sd2 exists and www# bioctl sd2 displays the mirror.
>
>
www# bioctl sd2 displays the raid but www# bioctl -d sd2 does not delete
the raid.


Re: Deleting softraid Devices Fujitsu Sparc

2019-11-28 Thread Kihaguru Gathura
On Thursday, November 28, 2019, Nick Holland 
wrote:
> On 2019-11-27 11:23, Kihaguru Gathura wrote:
>> Hi,
>>
>> An error while deleting softraid device follows
>>
>>
--
>> Available disks are: sd0 sd1 sd2.
>> Which disk is the root disk? ('?' for details) [sd0] ?
>> sd0: FUJITSU, MAT3073N SUN72G, 0602
>> serial.FUJITSU_MAT3073N_SUN72G_000506B00RAR_AAN0P5200RAR (68.4G)
>> sd1: FUJITSU, MAT3073N SUN72G, 0602
>> serial.FUJITSU_MAT3073N_SUN72G_000506B00SSL_AAN0P5200SSL (68.4G)
>> sd2: OPENBSD, SR RAID 1, 006  (68.4G)
>> Available disks are: sd0 sd1 sd2.
>> Which disk is the root disk? ('?' for details) [sd0] !
>> Type 'exit' to return to install.
>> www# bioctl -d sd2
>> bioctl: Can't locate sd2 device via /dev/bio
>>

>>
>> The aim is to remove the device from the system and then:
>>
>> # dd if=/dev/zero of=/dev/rsd0c bs=1m count=1
>> # dd if=/dev/zero of=/dev/rsd1c bs=1m count=1
>>
>> to reuse the disks.
>>
>> Thanks,
>>
>> Kihaguru
>>
>
> The install kernels have very minimal disk support.  In the case of
> amd64/i386, it's one wd device -- wd0, not sure about sparc64, but
> I'd bet a cheap lunch that sd2 is not there. :)
>

sd2 exists and www# bioctl sd2 displays the mirror.

Thanks,

Kihaguru


Re: Installing OpenBSD -current snapshots

2019-11-28 Thread Nick Holland
On 2019-11-27 21:29, Edgar Pettijohn wrote:
> On Wed, Nov 27, 2019 at 08:05:30PM -0600, Clay Daniels wrote:
>> I have successfully installed OpenBSD 6.6 release and would like to give
>> the Current Snapshots a try. I went to a mirror, and to:
>> 
>> Index of /pub/OpenBSD/snapshots/amd64/
>> 
>> I saw install66.fs (probably for usb memstick) and install66.iso (surely
>> for a cd/dvd) at ~450Mb. I picked the install66.fs, wrote it to a usb
>> thumbdrive, and it starts the install. When i get into the install it asks
>> where are the file sets? Humm, maybe it gets these online and it tries to
>> do this but no luck. It was late last night, and I checked to see if it had
>> written anything to my disk, which it had not, and went to bed. This
>> evening I'm looking a bit deeper at the snapshot directory and I suspect I
>> need to provide the install with base66.tzg at ~239Mb.

NO!

[snip misleading stuff]
> I noticed this also, but hadn't had time to figure out if I had messed up or
> the installer had. As a general rule I assume its me that messed up. Its odd
> if you mount the install66.fs you can see the pub/amd64 directory, but during
> installation it can't seem to find the directory regardless of what I have 
> tried.
> 
> Edgar

First of all...nothing at all to do about snapshots -- the OpenBSD
installation process has remained amazingly stable over the last 20 years.  
New options here and there, but overall, very similar.  Unless something
changed in the last few days, installing a snapshot is identical to
installing 6.6.

The installXX.iso and installXX.fs are complete, stand-alone installation
kits.  Everything you need is on them.  You can boot from them, and all
the installation files are right there.  Look Ma!  No network needed!
...well...unfortunately there is the issue of firmware files, which are
legally not feasible to put on the install media, so you will need network
for most machines eventually.  But let's ignore that for now. :)

Once the system has booted on the install kernel, you have three devices
you are working with:
1) the install kernel's internal "RAM disk" that is part of bsd.rd which
  you booted from,
2) your target disk 
3) the USB drive with the install files on it.

The reason you can't see the install files on the USB stick from the
install kernel is they aren't mounted.  You didn't boot from the entire
USB stick, you booted from ONE TINY LITTLE bsd.rd file, that just happened
to be sitting on the big USB stick...but as far as bsd.rd is concerned,
the USB stick isn't part of the booted environment (yet).

You aren't booting from a "Live Media".  You are booting from a tiny kernel
with a built in file system that's sitting on the same inert file system as
the install files.

Read that over and over until you understand what I'm saying, not what you
are assuming is going on.  It's really important to understand.  It's very
different from many Linux installation processes -- you are running off a
file only 10MB in size which is now completely in RAM.  That file JUST
HAPPENED to come from a USB stick that's much bigger.

So, when it comes to answering where your install files are, they are on
a disk, but it's NOT a mounted disk.  It's on your USB drive that's not
mounted now, and won't be after installation, but could be useful shortly.

Your next problem is...WHICH disk?  On a minimal system, it would be the
next sd device after your install disk -- assuming you are installing to
sd0, your USB stick might be sd1.  HOWEVER, if you have a flash media reader
on your system, who knows where it is.  One trick would be to unplug your
USB drive and plug it back in and look at the white-on-blue console message
that come up at you.  Yes, you are unpluging your boot device, sounds bad,
but read what I wrote earlier, it's no longer using that -- the boot has
completed, and it's running from RAM now, it's completely ignoring that
USB drive.  So let's say you do this and you see it's sd4.  Tell the
installer the files are coming from a file system not currently mounted
and when it asks, tell it "sd4"

Nick.



Re: Deleting softraid Devices Fujitsu Sparc

2019-11-28 Thread Nick Holland
On 2019-11-27 11:23, Kihaguru Gathura wrote:
> Hi,
> 
> An error while deleting softraid device follows
> 
> --
> Available disks are: sd0 sd1 sd2.
> Which disk is the root disk? ('?' for details) [sd0] ?
> sd0: FUJITSU, MAT3073N SUN72G, 0602
> serial.FUJITSU_MAT3073N_SUN72G_000506B00RAR_AAN0P5200RAR (68.4G)
> sd1: FUJITSU, MAT3073N SUN72G, 0602
> serial.FUJITSU_MAT3073N_SUN72G_000506B00SSL_AAN0P5200SSL (68.4G)
> sd2: OPENBSD, SR RAID 1, 006  (68.4G)
> Available disks are: sd0 sd1 sd2.
> Which disk is the root disk? ('?' for details) [sd0] !
> Type 'exit' to return to install.
> www# bioctl -d sd2
> bioctl: Can't locate sd2 device via /dev/bio
> 
> 
> The aim is to remove the device from the system and then:
> 
> # dd if=/dev/zero of=/dev/rsd0c bs=1m count=1
> # dd if=/dev/zero of=/dev/rsd1c bs=1m count=1
> 
> to reuse the disks.
> 
> Thanks,
> 
> Kihaguru
> 

The install kernels have very minimal disk support.  In the case of
amd64/i386, it's one wd device -- wd0, not sure about sparc64, but
I'd bet a cheap lunch that sd2 is not there. :)

After booting your install kernel, do this:
   # cd /dev
   # sh MAKEDEV sd0 sd1 sd2
or whatever you need to accomplish your task at hand.

NOW you will be able to do what you wish.  Yes, the installer script 
does this for you.  And yes, this is a common issue regardless of
platform.

Nick.



Re: Installing OpenBSD -current snapshots

2019-11-28 Thread Marc Espie
On Wed, Nov 27, 2019 at 08:05:30PM -0600, Clay Daniels wrote:
> I have successfully installed OpenBSD 6.6 release and would like to give
> the Current Snapshots a try. I went to a mirror, and to:

Just run sysupgrade -s

Done.



Re: snmpd(8) custom OID names

2019-11-28 Thread Martijn van Duren
On 11/27/19 4:27 PM, Joel Carnat wrote:
> Hello,
> 
> I have set custom OIDs in my snmpd.conf(5).
> When I walk or get those values, using snmp(1) or snmpget(1), the
> "name" parameters is not listed. I only get values described as
> OPENBSD-BASE-MIB::localTest.*
> 
> Is there a straight way to get the configured names from snmp clients?
> Or do I have to write a MIB file for this particular localTest sub-MIB?
> 
> TIA,
> Jo
> 
The snmp protocol has no notion of symbolic names, it's just the oid
and the value.

If you want to show your custom name with snmp(1) you can add it to
mib.h and recompile. This is of course not supported. There currently
is no support for MIB-files for snmp(1), and there might never be.

For net-snmp you can write a custom MIB-file to get the symbolic name.

martijn@



Re: Installing OpenBSD -current snapshots

2019-11-28 Thread Edgar Pettijohn


On Nov 28, 2019 2:15 AM, Bruno Flueckiger  wrote:
>
> On 27.11., Clay Daniels wrote:
> > I have successfully installed OpenBSD 6.6 release and would like to give
> > the Current Snapshots a try. I went to a mirror, and to:
> >
> > Index of /pub/OpenBSD/snapshots/amd64/
> >
> > I saw install66.fs (probably for usb memstick) and install66.iso (surely
> > for a cd/dvd) at ~450Mb. I picked the install66.fs, wrote it to a usb
> > thumbdrive, and it starts the install. When i get into the install it asks
> > where are the file sets? Humm, maybe it gets these online and it tries to
> > do this but no luck. It was late last night, and I checked to see if it had
> > written anything to my disk, which it had not, and went to bed. This
> > evening I'm looking a bit deeper at the snapshot directory and I suspect I
> > need to provide the install with base66.tzg at ~239Mb.
> >
> > My question now is after downloading the base, do I need to un-tar it, and
> > how to I provide it to the install? I wrote the install66.fs to the usb
> > with the dd command. Not clear to me how to either manually copy the base
> > file set to the usb, or maybe leave it on an accessible directory on my
> > machine. Any help would be appreciated.
> >
> > Clay Daniels
>
> I would recommend using sysupgrade(8) with the parameter -s to you.
>
> Cheers,
> Bruno
>

It's a fresh install unfortunately.



Re: Installing OpenBSD -current snapshots

2019-11-28 Thread Bruno Flueckiger
On 27.11., Clay Daniels wrote:
> I have successfully installed OpenBSD 6.6 release and would like to give
> the Current Snapshots a try. I went to a mirror, and to:
>
> Index of /pub/OpenBSD/snapshots/amd64/
>
> I saw install66.fs (probably for usb memstick) and install66.iso (surely
> for a cd/dvd) at ~450Mb. I picked the install66.fs, wrote it to a usb
> thumbdrive, and it starts the install. When i get into the install it asks
> where are the file sets? Humm, maybe it gets these online and it tries to
> do this but no luck. It was late last night, and I checked to see if it had
> written anything to my disk, which it had not, and went to bed. This
> evening I'm looking a bit deeper at the snapshot directory and I suspect I
> need to provide the install with base66.tzg at ~239Mb.
>
> My question now is after downloading the base, do I need to un-tar it, and
> how to I provide it to the install? I wrote the install66.fs to the usb
> with the dd command. Not clear to me how to either manually copy the base
> file set to the usb, or maybe leave it on an accessible directory on my
> machine. Any help would be appreciated.
>
> Clay Daniels

I would recommend using sysupgrade(8) with the parameter -s to you.

Cheers,
Bruno