Re: cryptic pkgin SSL cert error

2024-04-23 Thread David Brownlee
On Tue, 23 Apr 2024 at 15:24, Martin Husemann  wrote:
>
> On Tue, Apr 23, 2024 at 03:17:14PM +0100, David Brownlee wrote:
> > However, while better checking of trust anchors is a better end state
> > - assuming I am understanding the situation correctly: in an
> > effectively unannounced change, pkgin on a -9 system without either
> > security/mozilla-rootcerts-openssl installed or /etc/openssl will now
> > just fail, including any attempt to install mozilla-rootcerts-openssl
> > to resolve.
>
> Only if the binary pkgs repository URL was using https.
> Default setup used to be http:

Aha, thanks! - that would be the item of information I lacked :)

> > This requires manual intervention to set an environment variable to
> > allow mozilla-rootcerts-openssl to be installed, or otherwise setup
> > /etc/openssl. That would appear to be an unhelpful change, to the
> > extent that I would propose pkgin on netbsd < 10 might be better to
> > default to disabling checking trust anchors (with a warning).
>
> Edit the URL, install mozilla-rootcerts-openssl, change the URL back.

I would still classify it as unhelpful, but if it is only affecting
users who have changed their setup from the recommended, then it is
more of a "it would be good to see if there is a was to help them"
rather than an "oops!!" :-p

I also appreciate the amount of bikeshedding and general pulling at
different angles it took to get to where we are with it working well
on -10... so as long as the default & recommended pkgin install on <
netbsd-10 is for http rather than https, I'm inclined to leave well
enough alone

Thanks

David


Re: cryptic pkgin SSL cert error

2024-04-23 Thread David Brownlee
On Tue, 23 Apr 2024 at 12:45, Greg Troxel  wrote:
>
> David Brownlee  writes:
>
> > Do you have security/mozilla-rootcerts-openssl installed? (which
> > should provide a full set of certs in /etc/openssl). Alternatively
> > what do you have in /etc/openssl
> >
> > For netbsd-10 /etc/openssl is populated by the OS, but doing that
> > would be a breaking change on netbsd-9, however it may be that the
> > latest pkgin is enforcing SSL certificates by default on netbsd-9
> > which would be... unhelpful in this case
>
> I don't see it as uhelpful -- doctrine has always been that the sysadmin
> should choose which CAs to configure as trust anchors.  In 10, that's
> still more or less doctrine, except the default set is mozilla (or ish)
> rather than the empty set.  If you haven't set up trust anchors, lots of
> things are troubled.

For -10, or systems which ship with trust anchors in /etc/openssl or
equivalent I would agree the changed behaviour is an absolute
improvement.

However, while better checking of trust anchors is a better end state
- assuming I am understanding the situation correctly: in an
effectively unannounced change, pkgin on a -9 system without either
security/mozilla-rootcerts-openssl installed or /etc/openssl will now
just fail, including any attempt to install mozilla-rootcerts-openssl
to resolve.
This requires manual intervention to set an environment variable to
allow mozilla-rootcerts-openssl to be installed, or otherwise setup
/etc/openssl. That would appear to be an unhelpful change, to the
extent that I would propose pkgin on netbsd < 10 might be better to
default to disabling checking trust anchors (with a warning).

If I have misunderstood the situation - my apologies.

David


Re: cryptic pkgin SSL cert error

2024-04-23 Thread David Brownlee
On Tue, 23 Apr 2024 at 02:27, beaker  wrote:
>
> Hello,
>
> I have a 9.3/i386 VM on which I recently ran
>   $ sudo pkgin update ; sudo pkgin upgrade ;sudo pkgin autoremove
>
> which worked but subsequent attempts to use pkgin report the following error:
>
> --
> $ sudo pkgin update
> cleaning database from 
> http://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/i386/9.3/All entries...
> reading local summary...
> processing local summary...
> processing remote summary 
> (https://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/i386/9.3/All)...
> 3061459968:error:1416F086:SSL 
> routines:tls_process_server_certificate:certificate verify 
> failed:/usr/src/crypto/external/bsd/openssl/dist/ssl/statem/statem_clnt.c:1921:
> 3061459968:error:1416F086:SSL 
> routines:tls_process_server_certificate:certificate verify 
> failed:/usr/src/crypto/external/bsd/openssl/dist/ssl/statem/statem_clnt.c:1921:
> 3061459968:error:1416F086:SSL 
> routines:tls_process_server_certificate:certificate verify 
> failed:/usr/src/crypto/external/bsd/openssl/dist/ssl/statem/statem_clnt.c:1921:
> pkgin: Could not fetch 
> https://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/i386/9.3/All/pkg_summary.xz:
>  Authentication error
> --
>
> A work-around is to edit /usr/pkg/etc/pkgin/repositories.conf so
> it only uses http not https but I'd really rather not do that going
> forward so I'm looking for some guidance on how to fix wahatever
> is causing this SSL certificate verification error.
>
> System info:
> $ pkgin -v
> pkgin 23.8.1 (using SQLite 3.26.0)
> $ uname -a |cut -d' ' -f4-12
> NetBSD 9.3_STABLE (GENERIC) #0: Mon Mar 25 15:54:20 UTC
> $ uname -m
> i386

Do you have security/mozilla-rootcerts-openssl installed? (which
should provide a full set of certs in /etc/openssl). Alternatively
what do you have in /etc/openssl

For netbsd-10 /etc/openssl is populated by the OS, but doing that
would be a breaking change on netbsd-9, however it may be that the
latest pkgin is enforcing SSL certificates by default on netbsd-9
which would be... unhelpful in this case

David


Re: Windows and a mouse

2024-02-13 Thread David Brownlee
On Mon, 12 Feb 2024 at 13:52, Todd Gruhn  wrote:
>
> Can a mouse be tested?
>
> How do I know the problem is caused by the mouse , or X11 ?

Ideally by swapping something - test the mouse on another system, or
another mouse on the problem system, or test boot a different OS.

David


Re: -10, spurious reboots and instability

2023-12-31 Thread David Brownlee
On Fri, 29 Dec 2023 at 16:29, BERTRAND Joël  wrote:
>
> David Brownlee wrote:
> > On Wed, 27 Dec 2023 at 08:25, BERTRAND Joël  
> > wrote:
> >>
> >>  Hello,
> >>
> >>  Yesterday, I have changed my system disk (raid0). Thus, system has
> >> rebuilt a 1 To raid1 volume and system has crashed three or four times.
> >>
> >>  First time :
> >>
> >> [  5235.028358] uvm_fault(0x8190fbc0, 0xf6fc5a75b000, 2) -> e
> >> [  5235.028358] fatal page fault in supervisor mode
> >> [  5235.028358] trap type 6 code 0x2 rip 0x80ea1063 cs 0x8
> >> rflags 0x10246 cr2 0xf6fc5a75bb98 ilevel 0 rsp 0xac04372f5e98
> >> [  5235.028358] curlwp 0xf8b686f8a180 pid 0.17 lowest kstack
> >> 0xac04372f12c0
> >> [  5235.028358] panic: trap
> >> [  5235.028358] cpu2: Begin traceback...
> >> [  5235.028358] vpanic() at netbsd:vpanic+0x183
> >> [  5235.028358] panic() at netbsd:panic+0x3c
> >> [  5235.028358] trap() at netbsd:trap+0xbaf
> >> [  5235.028358] --- trap (number 6) ---
> >> [  5235.028358] _atomic_swap_64() at netbsd:_atomic_swap_64+0x3
> >> [  5235.028358] uvm_km_pgremove_intrsafe() at
> >> netbsd:uvm_km_pgremove_intrsafe+0x6d
> >> [  5235.028358] uvm_km_kmem_free() at netbsd:uvm_km_kmem_free+0x3b
> >> [  5235.028358] gc_thread() at netbsd:gc_thread+0x7c
> >> [  5235.028358] cpu2: End traceback...
> >>
> >> [  5235.038351] dumping to dev 18,1 (offset=251919, size=4162814):
> >> [  5235.038351] dump
> >>
> >>  Of course, no crash dump was written. I have tried to remove swap 
> >> in a
> >> first time, and system randomly enters in a lock and reboots (maybe with
> >> help of watchdog). After rebuild was completed, system seems to be stable.
> >>
> >>  Sorry, I'm unable to obtain more information.
> >
> > Could I ask what controller this was using, and what vintage NetBSD-10
> > (BETA or RC_1)? There was an issue with the mfi controller which
> > showed up on earlier netbsd-10 BETA versions
>
> You can ;-)
>
> It's a RC_1:

OK, so pretty damn recent :-p

> legendre# uname -a
> NetBSD legendre.systella.fr 10.0_RC1 NetBSD 10.0_RC1 (CUSTOM) #10: Thu
> Dec 21 09:51:28 CET 2023
> r...@legendre.systella.fr:/usr/src/netbsd-10/obj/sys/arch/amd64/compile/CUSTOM
> amd64
> and tree was updated juste before building system.
>
> I have to add that after raid is successfully rebuilt, system is
> stable. I don't remember last time I have rebuilt this volume.

So depending on when it was originally installed (netbsd-8?) it could
be possible that whatever issue was present in netbsd-9 also?

> I only use raidframe on regular sata interface. Motherboard is an Asus
> Z97Q (if I remember):
>
> legendre# lspci | grep SATA
> 00:1f.2 SATA controller: Intel Corporation 9 Series Chipset Family SATA
> Controller [AHCI Mode]
> 08:00.0 SATA controller: Marvell Technology Group Ltd. 88SE9120 SATA
> 6Gb/s Controller (rev 12)
>
> Raid0 and raid1 are connected to 00:1f.2 (wd2 to wd6).

OK, so definitely not mfi related...

I don't have any directly useful suggestions.

Depending on hardware availability and risk of downtime tolerance I'd
be tempted to try to reproduce on different hardware - cloning data to
another box, or temporarily moving disks across and then triggering a
raid rebuild to eliminate any overall issues with the base hardware.

Could the power supply be marginal - could rebuilding all disks and
some other activity be pushing it a little too hard? Running a few
copies of sysutils/cpuburn might flush out some issues if that was the
case

David


Re: -10, spurious reboots and instability

2023-12-28 Thread David Brownlee
On Wed, 27 Dec 2023 at 08:25, BERTRAND Joël  wrote:
>
> Hello,
>
> Yesterday, I have changed my system disk (raid0). Thus, system has
> rebuilt a 1 To raid1 volume and system has crashed three or four times.
>
> First time :
>
> [  5235.028358] uvm_fault(0x8190fbc0, 0xf6fc5a75b000, 2) -> e
> [  5235.028358] fatal page fault in supervisor mode
> [  5235.028358] trap type 6 code 0x2 rip 0x80ea1063 cs 0x8
> rflags 0x10246 cr2 0xf6fc5a75bb98 ilevel 0 rsp 0xac04372f5e98
> [  5235.028358] curlwp 0xf8b686f8a180 pid 0.17 lowest kstack
> 0xac04372f12c0
> [  5235.028358] panic: trap
> [  5235.028358] cpu2: Begin traceback...
> [  5235.028358] vpanic() at netbsd:vpanic+0x183
> [  5235.028358] panic() at netbsd:panic+0x3c
> [  5235.028358] trap() at netbsd:trap+0xbaf
> [  5235.028358] --- trap (number 6) ---
> [  5235.028358] _atomic_swap_64() at netbsd:_atomic_swap_64+0x3
> [  5235.028358] uvm_km_pgremove_intrsafe() at
> netbsd:uvm_km_pgremove_intrsafe+0x6d
> [  5235.028358] uvm_km_kmem_free() at netbsd:uvm_km_kmem_free+0x3b
> [  5235.028358] gc_thread() at netbsd:gc_thread+0x7c
> [  5235.028358] cpu2: End traceback...
>
> [  5235.038351] dumping to dev 18,1 (offset=251919, size=4162814):
> [  5235.038351] dump
>
> Of course, no crash dump was written. I have tried to remove swap in a
> first time, and system randomly enters in a lock and reboots (maybe with
> help of watchdog). After rebuild was completed, system seems to be stable.
>
> Sorry, I'm unable to obtain more information.

Could I ask what controller this was using, and what vintage NetBSD-10
(BETA or RC_1)? There was an issue with the mfi controller which
showed up on earlier netbsd-10 BETA versions

David


Re: Is use of 'binary' mode necessary to open files on NetBSD?

2023-12-02 Thread David Brownlee
On Sat, 2 Dec 2023 at 03:49, Mayuresh  wrote:
>
> I am using gcc 12.1 on NetBSD 9.3 amd64 in a c++ application that complies
> using standard std20.
>
> There is this c++ standard library class ifstream. Using method
> ifstream::open files are opened.
>
> So far I was under an impression that on BSDs / Linux / Unix like systems
> there is no need to explicitly pass the "b" option ( ifstream::binary in
> case of above API ) and that such option is required only on DOS / Windows
> systems.
>
> But I found that without this option, on above setup, the things were not
> working (weird results you'd expect with implicit character conversions).
> Using above option solves the problem.
>
> On NetBSD, the fopen man page clearly says 'b' is ignored. So wonder if
> gcc layer introduces the need to use it in above usage pattern.
>
> A bit surprised by this behavior. Comments please.

Could something in the c++ library be assuming UTF-8 for non binary files?

David


Re: 10.0 ipv6 "autohost" behavior

2023-11-14 Thread David Brownlee
On Tue, 14 Nov 2023 at 01:19, vom513  wrote:
>
> Hello all,
>
> So back a while I had tried out a 10.0 snapshot (before the recent RC1).  I 
> noticed that IPv6 didn’t work as it had been for me on 9.3 for example.  I 
> was going to post a message/question but never got around it.
>
> After installing 10.0 RC1 on a system yesterday, I now see a warning at boot 
> time if you try to use ip6mode=autohost.  I.e. no more rtsol and no more 
> kernel handling of RAs.  It’s mentioned there to use dhcpcd to handle this 
> now.
>
> In my home network, I have a mix of DHCP and static for IPv4.  For IPv6, I do 
> SLAAC only (no DHCPv6).  Both M and O flags set to 0 in RAs.
>
> So because of this I only want dhcpcd to do the “bare minimum” and behave 
> like autohost used to.  I.e. send an RS, take the RA, configure an address 
> and set the default route.
>
> In rc.conf I put:
>
> dhcpcd=YES
> dhcpcd_flags=“-6 hme0” # Not that it matters but this is a sparc machine…
>
> On a reboot, I see the prefixes picked up, but then a pause, and eventually 
> dhcpcd exit’s 1.  The end of the boot messages tell me that a job failed.  
> I’m assuming it was sending DHCPv6 requests and getting nothing and bailed.
>
> So after this, I have addresses and a route, but dhcpcd is not running.  So 
> beside the ugly boot error message, these addresses and this state won’t 
> persist indefinitely (i.e. if my prefix changes etc.) as dhcpcd is NOT 
> running in the background at this point.
>
> So after reading and poking around, I added “nodhcp6” to /etc/dhcpcd.conf.  
> This seemed to get the behavior I was after.
>
> So this message is to possibly help others in a similar/same situation - but 
> also to ask - is there a more elegant way to do this ?  I scoured the 
> dhcpcd(.conf) man pages and couldn’t really come up with any other way (i.e. 
> pure command line arguments).
>
> Thanks for any info or other experiences.

Hi

To have dhcpcd to remain running in manager mode to avoid that exit
you'll want -M in dhcpcd_flags

/etc/defaults/rc.conf has

dhcpcd=NO   dhcpcd_flags="-qM"  # For ifconfig_XXX=dhcp.

and setting dhcpcd_flags in rc.conf will overwrite that, so
dhcpcd_flags="-qM -6 hme0" should work for you (you might want to drop
-q if you prefer more chatty boot output :)

Thanks

David


mariadb not starting from rc.d - changed behaviour in netbsd-10?

2023-10-21 Thread David Brownlee
Anyone have any thoughts why rc.d/mariadb now fails to start when
called at boot, but runs fine if run after?

This looks to be a change in netbsd-10 behaviour as it used to work on
this system.

Adding " > /dev/null" to command_args avoids the issue, so I'm
assuming something-something-SIGPIPE on writing to stdout?

Thanks

David


Re: How to get some needed binaries for vintage NetBSD 1.5.3 installation (to prepare a system update to NetBSD 9.3)

2023-10-10 Thread David Brownlee
On Tue, 10 Oct 2023 at 05:58, Dennis  wrote:
>
> I am trying to update a MicroVAX 3100, running an old NetBSD 1.5.3. Idea was 
> to add NetBSD 9.3 on another disk.
>
> So I attached an additional hard drive to the machine and wanted to partition 
> that disk and create filesystems on  it. On one partition I wanted to put the 
> NetBSD installation and boot from that drive then.
>
> My problem now is, on that 1.5.3 installation, there is no fdisk, no mkfs, no 
> bsdlabel. I checked the installations tgz files located here 
> https://archive.netbsd.org/pub/NetBSD-archive/NetBSD-1.5.3/vax/binary/sets/, 
> but these also do not contain these tools. But they are required to create 
> the partitions and file systems I want to use for installation.
>
> From where can I get these files to continue my installation of NetBSD 9.3 ?
>
> I am  restricted in my options for the installation, I have harddisk, cdrom 
> and maybe floppy(not tested). With cdrom I've already failed, because 
> MicroVAX console boot loader seems to have problems with either the drive or 
> the ISO image containing NetBSD 9.3 I've used (ISO was downloaded from 
> https://ftp.fau.de/netbsd/NetBSD-9.3/iso/NetBSD-9.3-vax.iso )
>
> So my question is, from where can I get or compile 1.5.3 versions of fdisk 
> and mkfs. I saw there is newfs, which may replace mkfs. But fdisk still seems 
> missing. I saw also in doc a tool required named bsdlabel, but there is a 
> tools called disklabel, which may be an older version of bsdlabel...
>
> Or is there an easier way to do it? Any help welcome
>
> gcc is present on the 1.5.3 installation, so I may be able to compile from 
> sources, but I am NetBSD starter and do not even know where the source would 
> come from. The tool pkgsrc is also not present on the 1.5.3 installation.
>
> (I am a NetBSD beginner. But using Linux for +30 years, so both newbie and 
> old rabbit).

(I believe other replies may have already directed you towards
disklabel and newfs)

Another option could be to download the miniroot, then use swapctl to
disable the existing swap partition (or just reboot into single user),
dd the miniroot to the swap partition and boot from it.

Also, NetBSD is just in the process of updating gcc for the upcoming
netbsd-10 release with a bunch of very useful fixes (many thanks to
Kalvis), and the images at
https://nyftp.netbsd.org/pub/NetBSD-daily/netbsd-10/latest/
should be showing up shortly (likely tomorrow) with the fixed gcc version

Finally, have cc'ed in port-vax@ as there are likely to be any number
of people more interested in any VAXness relating to the questions :-p

David


Re: syncthing: too many open files?

2023-08-26 Thread David Brownlee
On Sat, 26 Aug 2023 at 09:37, nia  wrote:
>
> Has anyone ran into syncthing spamming the following in its log
> when faced with a large directory (1402 files, 173 subdirectories,
> ~22.8 GiB)?
>
>  Listen (BEP/tcp): Accepting connection: accept tcp [::]:22000: accept4: too 
> many open files
>
> It's unable to sync anything.
>
> kern.maxfiles is 32000, ulimit -n is 3000 (the max it'll let
> my user account set).

For anything more than moderate numbers of files you need to disable
"Watch for Changes" under the advanced tab for the folder on NetBSD.
(I'm using syncthing with > 350,000 files so hit this quite early on :)

I'm sure there used to be a MESSAGE.NetBSD for this a while back :-p

David


Re: ZFS Bogosity

2023-08-13 Thread David Brownlee
On Thu, 10 Aug 2023 at 22:16, Jay F. Shachter  wrote:
>
> Esteemed Colleagues:
>
> I have a multiboot computer on which Solaris, Linux, and NetBSD 10
> BETA have all been successfully installed (I couldn't install NetBSD
> 9.3) and they are all sharing storage on a ZFS pool, because all three
> of those operating systems support, or can be make to support, ZFS.
>
> I created a ZFS pool in /dev/wd0m (more precisely, I created a ZFS
> pool on Linux, in /dev/sda16, in an area on the disk that I
> subsequently defined on NetBSD to be /dev/wd0m).  When I typed
>
>   zpool import m5
>
> on NetBSD, the zpool command did not find it.  When I typed
>
>   zpool import -d /dev m5
>
> the zpool command still did not find it.  However, when I typed
>
>   mkdir /dev/z
>   ln /dev/wd0m /dev/z/wd0m
>   zpool import -d /dev/z m5
>
> then the zpool command found it.
>
> This is, of course, utterly bogus.  Or, to say the same thing in more
> formal language, I consider this to be a bug, unless it is documented,
> in which case, it is not a bug, it is a feature.
>
> Now, I truly understand that no one on this mailing list is a paying
> customer, and that the correct answer to someone who complains "NetBSD
> isn't implementing this right" is "then you go and implement it
> right."  So I am not complaining.  I am just -- without complaining --
> pointing out an existing bogosity, in case it catches the interest of
> some reader of this mailing list who has the desire and the
> wherewithal to fix it.

This reminded me of something I saw a little while back, but neglected
to report - now filed as
https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=57583 - I
think this matches the symptoms you saw?

Thanks

David


Re: would anybody use binary packages for NetBSD/i386 10?

2023-08-13 Thread David Brownlee
On Sun, 13 Aug 2023 at 13:32, Greg Troxel  wrote:
>
> In contemplating bulk builds and resources, I wonder if there are still
> people who:
>
>   are running NetBSD/i386 (as opposed to amd64)
>
>   are using the binary packges from quarterly branches on ftp.netbsd.org
>
>   are running NetBSD 10 already, or who intend to move to it soon or
>   after release
>
> If you have a system that meets the above, please either reply here (the
> first few people :-) or just answer me privately.  (I'd also be
> interested in which category below your use is.)
>
> Basically, I would think about not doing bulk builds if very few want
> them, relative to the effort/resources required to create them.
>
> My guess is that at this point, i386 use is limited to
>
>   a) old embedded-type systems (soekris)
>   b) systems that are running i386 because they were first installed many
>  years ago and haven't been converted to amd64 for no good reason or
>  for some odd special case odd reason
>   c) build systems to support category a/b systems, for testing or
>  building private binary package sets
>   d) retrocomputing

I have a mixed set of pc-engine alix (32 bit) & apu2 (64 bit) devices
in service, for which we use a common 32 bit image, based on a
customised netbsd-9.3 install with packages via pkgin. I'm definitely
planning on moving these to netbsd-10 to open up the option of
switching from openvpn to wireguard, and now the openssl pullup is
complete I might well start testing on that before the netbsd-10
release.

I also think there are a potentially interesting (if small) set of
people who would like a desktop with minimal web browser on an older
32bit x86 system, and NetBSD + ArcticFox pretty much delivers on that

David


Re: seeking desktop hardware recommendation

2023-08-08 Thread David Brownlee
On Tue, 8 Aug 2023 at 14:42, Robert Swindells  wrote:
>
> Greg Troxel  wrote:
> > My system has a 2010 4-core CPU, 24G RAM and aside from being worried
> > about thermal issues, my only real complaint is that I'd like more CPU.
> > Once upgrading of course I want more RAM, but I'm not really bothered by
> > 24G right now.  So:
>
> I upgraded a similar vintage desktop to your one a couple of months ago,
> a capacitor looked to have blown on the motherboard and it wouldn't
> power up. I could have just tried buying a used motherboard but took the
> opportunity to upgrade.

Looks like another note in favour of AMD boxes. I have a (2020?) box
used for gaming and I just test booted a netbsd-10 USB key on it, it
came up with display, disks & network working.
- MSI B550M-A Pro
- AMD Ryzen 5 5500
- Radeon RX 5700 XT
- M2 & SATA SSD

Would recommend a board with 4 DIMM slots, so you can put in 2*32GB
now and another pair later. Also there are boards with 2 or even 3 M2
slots, which opens up more options

I was in the area as I needed to test if
https://www.amazon.co.uk/dp/B08DFK4LZ7 would attach six SATA disks to
a single pci-e card with netbsd (related news, it seems to work fine
for initial testing, will leave it being busy overnight), as I'm about
to replace my rather aged Dell T320 with its current 9x8TB spinning
rust.

In that area I'm tending towards an Intel build with:
- Antec P101 Silent Tower (quiet and 8x3.5 + 1x5.25 + 2x2.5" bays)
- PCIE 4X 6 port SATA card (ASM1166 chipset)
- "be quiet!" Dark Power 13, plus 80 titanium 750 W PSU (this is going
to run 24/7 so high efficiency)
- Intel Core i5-13500 (seems the right price/performance point)
- Something like the ASUS PRIME B660-PLUS D4 Intel B660 LGA 1700 AT -
I know the ethernet is unlikely to work, but 4 * DIMM slots, 3 * M2
slots, 4 * SATA, 2 * PCIe x16 and 2 * PCIe x1 is tempting...

I'll also make a note in favour of refurb Dell OptiPlex and similar.
They are absolutely dull enough to send you to sleep just looking at
them, but I've bought a few over the years for "Just need a box to sit
there and be a PC" and they really do that well. The SFF models tend
to be quite tight inside, but the optical drive can be swapped out for
another disk. I'd recommend looking up the CPU and in particular
generation (an older i7 can be much slower than a more recent i3 :)
https://www.cpubenchmark.net/compare is a simple enough way to get a
reasonable idea for comparing (helpfully provides single core vs
overall numbers)

David


Re: zfs pool behavior - is it ever freed?

2023-07-27 Thread David Brownlee
On Thu, 27 Jul 2023 at 13:24, Greg Troxel  wrote:
>
> Tobias Nygren  writes:
>
> > I use this patch on my RPi4, which I feel improves things.
> > People might find it helpful.
>
> That looks very helpful; I'll try it.
>
> > There ought to be writable sysctl knobs for some of the ZFS
> > tuneables, but looks like it isn't implemented in NetBSD yet.
>
> That seems not that hard -- it would be great if someone(tm) did that
> and mailed a patch.
>
> > --- external/cddl/osnet/dist/uts/common/fs/zfs/arc.c  3 Aug 2022 01:53:06 
> > -   1.22
> > +++ external/cddl/osnet/dist/uts/common/fs/zfs/arc.c  27 Jul 2023 11:10:40 
> > -
> > @@ -6100,6 +6100,10 @@ arc_init(void)
> >   else
> >   arc_c_max = arc_c_min;
> >   arc_c_max = MAX(arc_c * 5, arc_c_max);
> > +#if defined(__NetBSD__) && defined(_KERNEL)
> > +/* XXX prevent ARC from eating more than 12% of kmem */
> > + arc_c_max = MIN(arc_c, vmem_size(heap_arena, VMEM_ALLOC | VMEM_FREE) 
> > / 8);
> > +#endif
> >
> >   /*
> >* In userland, there's only the memory pressure that we artificially
>
> That seems eminently sensible and is sort of what I was thinking of
> heading to.  Interesting q about /8 vs /16, but it's a reasonable enough
> value to avoid lockups and that's 90% of the benefit.
>
> I wonder if we should commit that as obviously better than where we are
> now, where machines of <= 4G fail badly.
>
> It would be interesting for people with 8G and 16G machines to try this
> patch.  That will be somewhat less and maybe not less respectively.
>
> Also perhaps a dmesg printout of what arc_c_max is set to, to help in
> figuring things out.
>
> (I suppose one can gdb it, too, for testing.)

I would definitely like to see something like this in-tree soonest for
low memory (<6GB?) machines, but I'd prefer not to affect machines
with large amounts of memory used as dedicated ZFS fileservers (at
least not until its easily tunable)

Thanks

David


Re: zfs pool behavior - is it ever freed?

2023-07-27 Thread David Brownlee
Potentially supporting datapoint:

I've found issues with netbsd-9 with ZFS on 4GB. Memory pressure was
incredibly high and the system went away every few months.

Currently running fine on -9 & -10 machines with between 8GB and 192GB

The three 8GB ZFS machines (netbsd-9+raidz1, netbsd-10+raidz0,
netbsd-10+raidz1 Frankenstein with a 8TB and two pairs of 6TB & 2TB)
all seem to run fine, but they only have around 24TB of ZFS storage

David


Re: uhive0,wms0, wmouse0 constantly detach and rettach

2023-06-21 Thread David Brownlee
On Tue, 20 Jun 2023 at 08:06, cyrus torros  wrote:
>
> I have this problem with netbsd  my mouse device will constantly
> detach and re-attach, causing disruptions and console spam. Displacing
> the entire installer quickly and making it difficult to interact with.
>
> as well as making working in a tty impossible, the problem does NOT go
> away when in an x session.
>
> I experience this issue on a modern-ish amd machine (b450 tomahawk,
> ryzen 5 2600)
> as well as a old core2duo dell lattitude which is no longer functional.
>
> changing usb ports, the mouse, or using a front panel port changes
> nothing. Over time, even more devices will start to disconnect (if ran
> for several hours)

Hi - is there any item of hardware common between all of your tests
(USB hub, mouse etc)?

How quickly does it occur?

The screengrab you attached looks to be from a netbsd-9.0 install
image - are you able to test a netbsd-10 install image to see if it
shows the same behaviour?

https:// nyftp.netbsd.org/pub/NetBSD-daily/netbsd-10/latest/images/

Thanks

David


Re: ctwm focus on new window?

2023-06-06 Thread David Brownlee
On Mon, 5 Jun 2023 at 19:36, adr  wrote:
>
> On Mon, 5 Jun 2023, David Brownlee wrote:
> > Try:
> >
> > cd external/mit/ctwm
> > make USETOOLS=no
> >
> > On Mon, 5 Jun 2023 at 18:36, adr  wrote:
> >>
> >> Any advice to build _only_ /usr/xsrc/external/mit/ctwm?
> >>
> >> adr
>
> There is no makefile there, but I tried in case bsdmake
> imports the necessary files:
>
>
> $ cd /usr/xsrc/external/mit/ctwm
> $ make USETOOLS=no
> make: no target to make.

Apologies - I should have clarified - its src/external/mit/ctwm, not
xsrc/external/mit/ctwm

builds for me, with a clean tree :)

David


Re: ctwm focus on new window?

2023-06-05 Thread David Brownlee
Try:

cd external/mit/ctwm
make USETOOLS=no

On Mon, 5 Jun 2023 at 18:36, adr  wrote:
>
> Any advice to build _only_ /usr/xsrc/external/mit/ctwm?
>
> adr


Re: Experience with NetBSD on 13-gen Framework 13 laptop

2023-06-05 Thread David Brownlee
On Mon, 5 Jun 2023 at 16:37, Sijmen J. Mulder  wrote:
>
> > >  - X and console use 1024x768 or something rather than the native
> > >resolution or whatever the UEFI firmware sets up/suggests.
> >
> > If you drop into the bootloader does "gop" report any other useful
> > resolutions? - I hit the same issue on a ThinkPad T495, but now happy
> > in 1920x1080 with genfb0
>
> gop lists:
>
>  0: 2256x1504 BGRR pitch 2256 bpp 32
>  1: 640x480 BGRR pitch 640 bpp 32
> *2: 800x600 BGRR pitch 800 bpp 32
>  3: 1024x768 BGRR pitch 1024 bpp 32
> ...
>
> During kernel boot modesetting appears to happen (or just fonts?) and
> once in X, xrandr reports:
>
>  Screen 0: minimum 1024 x 768, current 1024 x 768, maximum 1024 x 768
>
> If on the boot prompt I enter 'gop 0' it switches to the native
> resolution with tiny font (as expected). When booting, the font changes
> something reasonable and in X I get native resolution and
> appropriately-sized, high-resolution fonts. Nice!
>
> The console appears to use either a lower resolution mode or a low
> resolution bitmap font. I'm not sure how to verify.

You can adjust /boot.cfg to automatically run the gop command - add or
update an entry as:

menu=Boot with gop 0:rndseed /var/db/entropy-file;gop 0;boot

> > >  - Touchpad doesn't work.
> >
> > So pms0 at pckbc1 is detected, but no additional information (such as:
> >
> > pms0 at pckbc1 (aux slot)
> > pms0: Synaptics touchpad version 10.32
> > pms0: Extended W mode, Passthrough, Palm detect, One button click pad,
> > Multi-finger Report, Multi-finger, Reports max, Reports min
> > pms0: Probed max coordinates right: 5678, top: 4694
> > pms0: Probed min coordinates left: 1266, bottom: 1162
> > wsmouse0 at pms0 mux 0
> >
> > Do you know offhand how Linux reports the touchpad?
>
> Don't know what happened but when testing now, still on the same
> original install, my touchpad does work although seemingly without
> right-click or scrolling support. Hand-copying dmesg output:
>
>  pms0 at pckbc1 (aux slot)
>  pckbc1: using irq 12 for aux slot
>  wsmouse0 at pms0 mux 0
>
> For Linux, these seem to be the relevant bits from the Fedora 38
> installation:
>
> [3.776427] input: ImExPS/2 Generic Explorer Mouse as 
> /devices/platform/i8042/serio1/input/input4
> [3.828419] memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL, pid=1 
> 'systemd'
> [3.850162] usb 3-9: new full-speed USB device number 4 using xhci_hcd
> [3.932086] input: FRMW0001:00 32AC:0006 Wireless Radio Control as 
> /devices/pci:00/:00:15.1/i2c_designware.1/i2c-1/i2c-FRMW0001:00/0018:32AC:0006.0002/input/input5
> [3.932217] input: FRMW0001:00 32AC:0006 Consumer Control as 
> /devices/pci:00/:00:15.1/i2c_designware.1/i2c-1/i2c-FRMW0001:00/0018:32AC:0006.0002/input/input6
> [3.932252] input: FRMW0001:00 32AC:0006 as 
> /devices/pci:00/:00:15.1/i2c_designware.1/i2c-1/i2c-FRMW0001:00/0018:32AC:0006.0002/input/input7
> [3.932291] hid-generic 0018:32AC:0006.0002: input,hidraw1: I2C HID v1.00 
> Device [FRMW0001:00 32AC:0006] on i2c-FRMW0001:00
> [3.939039] input: PIXA3854:00 093A:0274 Mouse as 
> /devices/pci:00/:00:15.3/i2c_designware.2/i2c-2/i2c-PIXA3854:00/0018:093A:0274.0003/input/input8
> [3.951140] input: PIXA3854:00 093A:0274 Touchpad as 
> /devices/pci:00/:00:15.3/i2c_designware.2/i2c-2/i2c-PIXA3854:00/0018:093A:0274.0003/input/input9
> [3.963142] hid-generic 0018:093A:0274.0003: input,hidraw2: I2C HID v1.00 
> Mouse [PIXA3854:00 093A:0274] on i2c-PIXA3854:00
> ...
> [4.031656] input: PIXA3854:00 093A:0274 Mouse as 
> /devices/pci:00/:00:15.3/i2c_designware.2/i2c-2/i2c-PIXA3854:00/0018:093A:0274.0003/input/input10
> [4.031750] input: PIXA3854:00 093A:0274 Touchpad as 
> /devices/pci:00/:00:15.3/i2c_designware.2/i2c-2/i2c-PIXA3854:00/0018:093A:0274.0003/input/input11
> [4.031800] hid-multitouch 0018:093A:0274.0003: input,hidraw1: I2C HID 
> v1.00 Mouse [PIXA3854:00 093A:0274] on i2c-PIXA3854:00
>
> Full pre-login dmesg attached.

OK - so it's working as a basic mouse on NetBSD, but not as a two
finger capable device. I'm... going to have to drop out and hope
someone else knowing more can chime in :)

David


Re: Experience with NetBSD on 13-gen Framework 13 laptop

2023-06-05 Thread David Brownlee
On Mon, 5 Jun 2023 at 13:11, Sijmen J. Mulder  wrote:
>
> Hi all,
>
> Here's my experience with NetBSD on the recently released 13-gen Intel
> Framework 13 laptop. I have the base i5 model.
>
>  - 9.3 doesn't boot from USB, it fails to find the USB storage device.
>  - 10-current boots and installs without problem.

I wonder if netbsd-10 also boots? (might be nice to check if
everything is on track to be supported for the next release). Rather
than install over your existing setup I'd suggest installing to a
spare USB key or similar)

>  - I found the partitioning confusing. The manual does have a section on
>GPT but only covers the full-disk experience. The MBR section does
>explain that a disklabel is written inside the first NetBSD
>partition, so I naively tried to set up disklabel after creating a
>GPT partition (all in sysinst) and ended up destroying my existing
>Linux filesystems.
>
>It all became clear after reading this thread that for NetBSD (unlike
>e.g. OpenBSD) disklabel simply isn't relevant any longer on GPT
>systems:
>
>https://mail-index.netbsd.org/netbsd-users/2020/10/16/msg025868.html
>
>The documentation should probably be updated with a focus on the now-
>standard GPT situation. I can make a start but will need someone
>familiar with the material to review.

Definitely. I'm happy to help with a first pass review (though I'm in
the "have installed many times by hand" rather than "have written EFI
boot code" camp)

>  - No EFI boot entry is created by systinst and the BOOTIA32.EFI and
>BOOTX64.EFI files are placed in \EFI\BOOT, which can conflict with
>other OSes. I think they would be better placed in \EFI\NetBSD or
>such.

I suspect they should go into EFI/NetBSD by default, with a copy into EFI/BOOT

Just as a side note for anyone who just needs to dual boot NetBSD &
Windows - Some firmware (Lenovo) supports booting from EFI or "Windows
Boot Manager", which means the EFI partition can just contain the
NetBSD /efi/boot/bootx64.efi and then the firmware set to boot the
device by default, and just hit F12 on power on & select "Windows Boot
Manager" for Windows (or vice versa to default to Windows).

I've also used rEFInd a few times, but my various dual boot needs are
currently handled courtesy of Lenovo, so I've simplified down to that

>I ended up using efibootmgr on Linux to create entries after renaming
>the files to NBIA32.EFI and NBX64.EFI, which turns out to have been a
>prudent choice because OpenBSD (which I installed next) used the same
>generic filenames and would've overwritten NetBSD's.
>
>I'm aware that we don't have efivars support currently to be able to
>add boot entries pointing at specific .EFI files so using the generic
>names is a logical fallback. Perhaps I can have a look at porting an
>efivars driver from another BSD.

beer++

>  - Not specific to Framework, but having guided crypto setup with cgd
>in the installer would be nice. I didn't attempt it on my own.

The general advice (for cgd /home or similar) is to set up with a
partition ready, then once installed make sure its empty and convert
the config for that partition to cgd

>  - X works.
>  - X and console use 1024x768 or something rather than the native
>resolution or whatever the UEFI firmware sets up/suggests.

If you drop into the bootloader does "gop" report any other useful
resolutions? - I hit the same issue on a ThinkPad T495, but now happy
in 1920x1080 with genfb0

>  - WLAN doesn't work (no device). Haven't tried USB ethernet adapter.

The TP-Link TL-WN725N is an unremarkable nano USB wi-fi dongle
currently ~£5, and the Edimax ew-7811un v2 is another easily available
option (for anyone else reading who may find that useful :)

>  - Touchpad doesn't work.

So pms0 at pckbc1 is detected, but no additional information (such as:

pms0 at pckbc1 (aux slot)
pms0: Synaptics touchpad version 10.32
pms0: Extended W mode, Passthrough, Palm detect, One button click pad,
Multi-finger Report, Multi-finger, Reports max, Reports min
pms0: Probed max coordinates right: 5678, top: 4694
pms0: Probed min coordinates left: 1266, bottom: 1162
wsmouse0 at pms0 mux 0

Do you know offhand how Linux reports the touchpad?

David


Re: TOTP apps, and WebAuthn recommended devices?

2023-03-23 Thread David Brownlee
On Thu, 23 Mar 2023 at 13:51, Greg Troxel  wrote:
>
> 2FA is increasingly required, which is fine, but I wonder about
> strategies for coping as a NetBSD user.
>
> One thing is TOTP.  There are Android apps from f-droid (which suits me
> but not everyone), and there is vaultwarden which should allow bitwarden
> to do TOTP.  I wonder if there are good TOTP programs in pkgsrc and what
> people recommend.

I have to just chime in from the "moderate security level" as a happy
Bitwarden TOTP user. I switched everything from the dumpster fire
which is Google Authenticator to just plain Bitwarden a while back and
being able to paste into a TOTP form directly in Firefox on NetBSD
without having to switch to a phone was a real pleasure. (I'm forking
out a whole $10/year to use TOTP on Bitwarden servers - though I keep
planning to setup vaultwarden :)

> The other thing is WebAuthn which is apparently the new U2F.

Also very curious about this - I bought a YubiKey 5C back... before
Boris Johnson had the opportunity to break any self-isolation laws,
but never ended up setting it up.

David


Re: "GENERIC.local" useless for items following its inclusion

2023-02-09 Thread David Brownlee
On Wed, 1 Feb 2023 at 03:13, John D. Baker  wrote:
>
> Being very annoyed by wscons on amd64-10.0_BETA (and -current) choosing
> the "Boldface 16x32" font even on low-resolution displays, I figured I'd
> simply disable it using the "GENERIC.local" config file that is conditionally
> included by GENERIC.
>
> Unfortunately, the position at which:
>
>   cinclude "arch/amd64/conf/GENERIC.local"
>
> appears in GENERIC means my:
>
>   no options FONT_BOLD16x32
>
> has no effect, as the font options don't appear in GENERIC until
> much later.
>
> It would seem that if the "GENERIC.local" mechanism is to be of any
> value,
>
>   cinclude "arch/amd64/conf/GENERIC.local"
>
> should be the very last line in the GENERIC config file.
>
> (This would be the case for any platform implementing this feature,
> not just amd64.)

Hi John,

That is definitely... suboptimal.

I've fixed up amd64 and other GENERIC kernel config which already had
an include of GENERIC.local. I'm also going to add it to those missing
it, and look to get a pullup to at least netbsd-10

Thanks

David


Re: npf NAT stops working on external interface IP changed

2023-01-16 Thread David Brownlee
I have this as /etc/dhcpcd.exit-hook

#!/bin/sh
case "$interface" in
lo[0-9]* | tun[0-9]*) exit;;
esac
/etc/rc.d/npf reload

On Mon, 16 Jan 2023, 19:01 Jeremy C. Reed,  wrote:

> Last week, my NetBSD NPF router got a new IP address via DHCP.
>
> npfctl list showed many entries with the nat-addr:port with the old
> address.
>
> I did a npfctl reload and my NAT started working again.
>
> Today it happened again.
>
> "npfctl show" shows the current IP address in the map.
>
> Part of my /etc/npf.conf follows:
>
> $ext_if = "re1"
> $int_if = "re0"
> $ext_addrs = { ifaddrs($ext_if) }
> $localnet = { 172.16.1.0/24 }
>
> # Allow pings
> alg "icmp"
>
> # Perform IPv4 NAT
> map inet4($ext_if) dynamic $localnet -> inet4($ext_if)
>
> group "external" on $ext_if {
> # Allow all outbound traffic
> pass stateful out all
>
> # Block all incoming traffic
> block in all
> }
>
> group "internal" on $int_if {
> # Pass everything to internal networks,
> # should be ok, because we are nat'ed.
> pass final all
> }
>
> # default group is mandatory
> group default {
> # Loopback interface should allows packets to traverse it.
> pass final on lo0 all
> # Block everything by default.
> block all
> }
>
>
> When the problem began my logs had:
>
> Jan 16 18:28:24 t1 unbound: [210:0] error: event_add failed. in cpsl.
> Jan 16 18:28:25 t1 syslogd[189]: last message repeated 2 times
> Jan 16 18:28:25 t1 unbound: [210:0] error: could not event_del on close
> Jan 16 18:28:25 t1 unbound: [210:0] error: event_add failed. in cpsl.
> ...
> Jan 16 18:28:49 t1 unbound: [210:0] error: could not event_del on close
> Jan 16 18:28:49 t1 unbound: [210:0] error: event_add failed. in cpsl.
>
> Jan 16 18:28:50 t1 dhcpcd[152]: re1: probing for an IPv4LL address
> Jan 16 18:28:50 t1 dhcpcd[152]: re1: using IPv4LL address 169.254.77.128
> Jan 16 18:28:50 t1 dhcpcd[152]: re1: DHCP lease expired
>
> Then it was offered a new IP, added route, changed default route.
>
> I did a "sudo npfctl reload" to get NAT to work again.
>
> How can I get it to automatically reload on external interface changes?
>


Re: ratfor and f2C

2022-11-22 Thread David Brownlee
On Sun, 20 Nov 2022 at 12:36, nierveze  wrote:
>
> hello everyone,I'd like to install ratfor (I am now reading 'software
> tools') and f2c on my very very old
>
> (by today's standards) toshiba satellite 220 with netbsd 1.3.2,I did not
> find them on the accompanying cd.
>
>   (the pc and that version of netbsd both date 1998) .Where can I find
> compatible sources?

You should most likely be able to compile one of the versions in
https://github.com/arnoldrobbins/ratfor - it has both the original
version and a branch updated for modern systems. NetBSD 1.3.2 likely
coming somewhere in the middle :)

There is also ratfor77 which is included in pkgsrc
https://pkgsrc.se/devel/ratfor but you would need a newer version of
NetBSD for that :-P

David


Re: unable to set time very far in the future

2022-10-16 Thread David Brownlee
On Sun, 16 Oct 2022 at 15:34, Jan Schaumann  wrote:
>
> RVP  wrote:
> > On Sat, 15 Oct 2022, Jan Schaumann wrote:
> >
> > > - I just can't _set_ the clock to any value above
> > > 68719476736.  Anybody know why?
> > >
> >
> > There is a check in the kernel. In sys/kern/kern_time.c:
> >
> > 190 /*
> > 191  * The time being set to an unreasonable value will cause
> > 192  * unreasonable system behaviour.
> > 193  */
> > 194 if (ts->tv_sec < 0 || ts->tv_sec > (1LL << 36))
> > 195 return EINVAL;
> >
> > And, `date 414708200732.17' == (1<<36) + 1 secs.
>
> Cool, thanks!
>
> Do we have examples of what this "unreasonable system
> behaviour" might be, and how we ended up picking this
> particular value?

Absent any functional change, could we factor this out to a #define
for future code spelunkers?

Possibly switching to a more human friendly number such as 4000AD (or
4004AD if we port NetBSD to the spindizzy)

David


Re: Does any common mortals here (not programmers or sysads) use NetBSD as their daily productivity driver?

2022-09-30 Thread David Brownlee
On Tue, 27 Sept 2022 at 12:35, Ottavio Caruso
 wrote:
>
> If so, what can you not do on NetBSD that you can do on any other OS?

I suspect this might be the least generally relevant list in the
thread :), but just because,

Tasks for which I use a Windows/MacOS box (controlled from my NetBSD
box via net/synergy):
- Run Signal Desktop
- Run dl4j java deep learning algorithms (calls native binaries)
- Run Garmin's ConnectIQ build environment
- Compile flutter apps
- Zoom etc (though usually just use phone)
- Run the latest calibre ebook manager (uses qt6), tho' previous calibre fine
- Run TeamViewer to help support remote Windows machines
- Play X4 or Horizon Zero Dawn :-p (that one controlled directly)

I use NetBSD as a laptop daily driver for java dev, with some zfs
servers - openvpn, nginx, unifi for Ubiquiti kit, ansible config,
syncthing, some samba, cups etc.


David


Re: ucom, umodem and conbee II

2022-09-04 Thread David Brownlee
On Sat, 3 Sept 2022 at 12:14, Staffan Thomén  wrote:
>
> Nevermind, I rewrote my program in C and umodem works perfectly fine,
> although I do note that I had to use O_NONBLOCK, something the
> GFCFlasher program explicitly omits.

Glad to hear you found a solution. Could it be down to default port
settings across different systems?

Would you be using https://phoscon.de/en/conbee2/ ? Looks interesting
- I have a bunch of hue lights/sensors/plugs and use
https://github.com/bahamas10/hueadm to poke at them from my NetBSD box
as needed (such as a script to ensure the printer plug is on before
printing, or to gradually turn down some lights at night :) but I've
always wondered what other options might be provided by poking at the
individual devices more directly...

David


Re: xterm and desktop-file-utils dependency

2022-08-19 Thread David Brownlee
On Sun, 7 Aug 2022 at 01:54, Greg Troxel  wrote
>
> David Brownlee  writes:
>
> > In short - the change is small, relatively safe, should not result in
> > any difference in final state for the general case where someone
> > installs a package which uses share/applications/mimeinfo.cache, and
> > could significantly benefit some people building a small set of
> > packages on smaller & less mainstream boxes, and _very_ slightly
> > benefit a small number using binary packages.
> >
> > Against which, it is a tiny bit of complexity, and does not benefit or
> > affect the majority of users.
> >
> > I think that's a fair summary from my perspective :)
> >
> > I'm obviously in favour, though I agree there are valid arguments to
> > decide either way, I just wanted to opportunity to summarise what I
> > believed them to be :-p
>
> Thanks for the detailed explanation.  I have adjusted my view to "I
> don't mind at all if you do this" given the mechanics of how
> update-desktop-database works, and that it's easy to revert if it turns
> out to be more troublesome than we think.
>
> The only other comment was an objection from nia@, and I'd like to hear
> an updated comment now, as I think that was based on the idea of
> functionality loss, and of course what other people think.

Now committed. (poked nia offline and had a reasonable "as long as it
doesn't break anything" response :)

Thanks

David


Re: xterm and desktop-file-utils dependency

2022-08-06 Thread David Brownlee
On Sat, 6 Aug 2022 at 16:06, Greg Troxel  wrote:
> [pmc hat firmly off]
>
> David Brownlee  writes:
>
> > On Mon, 18 Jul 2022 at 18:38, Vitaly Shevtsov  wrote:
> >> Can desktop-file-utils be optional for xterm? Because this dependence
> >> requires heavy glib2 and it seems removing it from x11/xterm/Makefile
> >> has no side effects.
>
> One question is how populated your corner of the pkgsrc-using space is.
> While we tree to accomodate most people in many ways, there is often a
> cost to others in complexity.  So I'd like to ask about that.
>
> On my desktop system, glib2 is required by 97 packages.
> On two servers, one has it because of ffmpeg4, and one does not.
>
> So, I wonder if you are using it on a server machine with no local
> display, and you are doing nothing else "desktoppy" (to misuse a
> non-word) on that machine?
>
> Are you building yourself, or using binary packages?  What is the total
> size of all of your packages and how does 16 MB compare?
>
> Or do you have a problem with the presence of glib2, vs "heavy"?
>
> I have problems with a bunch of things from time to time, being bloated
> or nonportable, but by list is more things like rust, nodejs, haskell,
> qt5 and cmake.  glib2 just does not show up in my world as a problem.
> Even on the server that has it, it's tiny compared to the stuff that
> requires it.

Granted, but a change to those would affect the final end state for
users who do need them, the goal for this change was to just defer the
build cost of desktop-file-utils until needed - so it would not affect
the end state for anyone who used it, just those who did not.

> I acknowledge that xterm is small.
>
> > There are probably two obvious approaches to this.
>
> The third is to not do anything :-) I think that always has to be on the
> table.  Of course Vitaly can always just comment out that line.  But
> it's more or less your first option, less easy for users, and less
> cognitive load for everybody.
>
> > The simpler would be to add a desktopdb option to xterm/options.mk
> > (defaulting to on), though all other packages including
> > sysutils/desktop-file-utils/desktopdb.mk should really be updated to
> > match
>
> Agreed, and this is a bunch of code.
>
> > A better approach would probably be to adjust
> > desktop-file-utils/desktop.db.mk to not depend on the
> > desktop-file-utils package, and desktop-file-utils/files/install.tmpl
> > to check for the presence of UPDATE_DESKTOPDB before calling it.
> > desktop-file-utils already calls UPDATE_DESKTOPDB on install, so it
> > should Just Work... I might have a poke at this later :)
>
> It sounds like you think that we can have
>
>   a full dependency on desktop-file-utils for things that use the files
>
>   this limited dependency for things that provide files
>
>   and critically, the property that the system state does not depend on
>   the order of package installation and deinstallation, for any legal
>   ordering
>
>   perhaps, no additional script files installed and having to run as
>   part of package installation and deinstallation compared to where we
>   are now
>

Exactly, currently
- update-desktop-database is run after desktop-file-utils is
installed, and after any desktop.db.mk using package is installed
the proposed change would switch (would have switched) this to
- update-desktop-database is run after desktop-file-utils is
installed, and after any desktop.db.mk using package is installed if
desktop-file-utils is already installed

The effective difference in behaviour is when someone installs one or
more package using desktop.db.mk, and no package which depending on
desktop-file-utils - all the individual files would still be in
share/applications/, but mimeinfo.cache would not be (which in this
context would be the desired behaviour).

The final state where a desktop-file-utils depending package is
installed should be the same as per now (potentially with a few less
update-desktop-database incremental update calls).

update-desktop-database(1) notes:
   The order of the desktop files found for a MIME type is not
   significant.  Therefore, an external mechanism must be used to
   determine what is the preferred desktop file for a MIME type.
so it really shouldn't matter if its run after a bunch of files are
added to share/applications, or after each one, as long as its run at
the end of a set of packages being installed.

I'm a nominally disinterested party here - this was prompted by a
comment on pkgsrc-users@, and it seemed like a reasonable question.

> Overall I don't think glib2 is big, and that the case of
>
>   a system with no glib2
>   a system with no desktop-file-utils
>   wanting xterm

Re: xterm and desktop-file-utils dependency

2022-08-05 Thread David Brownlee
On Mon, 18 Jul 2022 at 18:38, Vitaly Shevtsov  wrote:
> Can desktop-file-utils be optional for xterm? Because this dependence
> requires heavy glib2 and it seems removing it from x11/xterm/Makefile
> has no side effects.

There are probably two obvious approaches to this.

The simpler would be to add a desktopdb option to xterm/options.mk
(defaulting to on), though all other packages including
sysutils/desktop-file-utils/desktopdb.mk should really be updated to
match

A better approach would probably be to adjust
desktop-file-utils/desktop.db.mk to not depend on the
desktop-file-utils package, and desktop-file-utils/files/install.tmpl
to check for the presence of UPDATE_DESKTOPDB before calling it.
desktop-file-utils already calls UPDATE_DESKTOPDB on install, so it
should Just Work... I might have a poke at this later :)

David


Re: how to limit /etc/daily to local only, and cleasring bad nfs mounts

2022-06-17 Thread David Brownlee
On Wed, 15 Jun 2022 at 12:21, Steve Blinkhorn  wrote:
>
> More by chance than from a deep understanding of the issue, I found a
> way of restoring sanity when this happens. As superuser:
>
> 1. pkill -9 sendmail tee /bin/sh
> 2. on each server providing nfs service: nfsd -r
>
> Step 1 just speeds everything up - Step 2 might resolve the issue on
> its own, but could take quite some time if there is a backlog of
> stalled processes.  I went from around 660 processes per affected
> server to around 66.  I wish I were clearer about the relationship
> between nfsd, mount_nfs and rpcbind, because of the implications of a
> server auto-rebooting after, say, a power cut, when there is
> significant nfs service between sites.

Nice find (no pun intended :)

Would you be able to put together a PR describing this and the
workaround - both in case someone is looking at the nfs code, and for
anyone else hitting a similar situation to use the workaround?

David


Re: how to limit /etc/daily to local only, and cleasring bad nfs mounts

2022-05-27 Thread David Brownlee
On Fri, 27 May 2022 at 17:18, Steve Blinkhorn  wrote:
>
> 1. How to limit /etc/daily,weekly,monthly so they do not cross nfs mount
> points?  One of my development systems crashes occasionally when left
> running a long job after hours.  It reboots itself, but nfs
> connections to it are not restored.  What I don't notice is that
> /etc/daily now hangs on a public-facing machine.  Gradually the humber
> of processes increases day by day until I have numerous find, tee,
> sendmail and sh proceses all stuck.
>
> I can kill some of the /etc/daily related processes, but
> not the instances of find.  In the past I have been able to resolve
> the problem by remounting the remote filesystems using mount_nfs, or
> restarting a crashed rpcbind, but not this time.  BTW, these
> processes all have a PPID of 1.

Well one option would be to disable all the finds by setting the
various find_*=NO in /etc/{daily,weekly,monthly,security}.conf :-p
Some options have a little more granularity such as find_core_ignore_paths

It's a pity that the stat() from "find -x" would trigger the nfs mount hang...

> 2. Attempts to do anything involving mountd, mount or df results in a
> hung process that kill -9 will not remove.  I need to find a way of
> restoring normality that is sure-fire, and based on an understanding
> of nfs clien-side behaviour.  I can, of course, reboot, but this is a
> customer-facing server in a remote data centre, which otherwise is
> functioning properly.
>
> This is 9.2 on amd64, but I don't belkieve for a moment that this is
> version-related.

Does switching between tcp and udp mounts make any difference?
Would using mount_psshfs possibly be an option?

David


Re: Re: Re: hpcarm & HP Jornada 720: packages?

2022-04-18 Thread David Brownlee
On Sun, 17 Apr 2022 at 08:13, Nino on NetBSD 5.0.1  wrote:
>
> Can I safely assume that these should be OK if I downgrade to NetBSD 8?
>
> http://iso.ee.netbsd.org/pub/pkgsrc/packages/NetBSD/earmv4/8.0/All/

You should be able to run NetBSD-8 packages on a NetBSD-9 system -
though not mix NetBSD-9 and NetBSD-9 packages in the same /usr/pkg


Re: "Check mark" symbol missing using 'evince'?

2022-04-05 Thread David Brownlee
On Mon, 4 Apr 2022 at 16:01, John D. Baker  wrote:
>
> I routinely use 'evince' when I need to manipulate PDFs with fillable
> fields.  When I first started using it, it seemed the "check-mark"
> glyph was missing and the result was a thin-outline box inside the
> area the check-mark should appear.  Thus, when I printed the document,
> I would have to find all the check-boxes with the broken symbol and
> manually draw/write in a check mark.
>
> Then, when 'evince' was updated again, the "check-mark" was found and
> worked.  After another update it was broken again.  Lather, rinse, repeat.
>
> Lately, however, the last several revisions of 'evince' (at least those
> found in pkgsrc-202[0-2]Q1) have all had the "check-mark" glyph broken
> or missing again.
>
> There don't appear to be any messages about missing fonts either on
> evince's STDOUT/STDERR or in ".xsession-errors".
>
> Suggestions for how to restore/provide the "check-mark" glyph for
> evince?
>
> Looking at a sample PDF shows data like:
>
>   ... /Resources<> ...
>
> which I would presume to refer to Zapf Dingbats and some character
> code within that.
>
> (For a sample document, get the PDF of Form 1040 "f1040.pdf"
> [U.S. income tax return], load with 'evince' and click any of
> the check-box items.)

Could there be any possibility that the set of fonts installed changes
between the different updates - either a font missing, or even a font
present triggering the issue, or installing a different package
updating some state?

David


David


Re: groff issue after upgrade to NetBSD-9.2

2022-03-08 Thread David Brownlee
On Mon, 7 Mar 2022 at 12:10, Steve Blinkhorn  wrote:
>
> Thanks, helpful and enlightening, and I am pursuing the
> Heirloom distribution.  Shame about the name, though, sounds like
> 'legacy' which has come to mean out-of-date.  Troff is one of those
> software designs that far exceeded in its capabilities the purposes
> for which it was originally designed.
>
> But I have to dispute the matter of ordinary users not needing to
> modify files.  The DESC file as distributed supposes a North American
> user base, with the papersize variable set to letter.   This has a
> number of minor implications for layout specification, but also
> results in printers either demanding that letter-size paper be loaded,
> which means at the least fiddling with printer settings to pretend
> that A4 paper is really letter size paper, or in some cases the
> document just not printing in my experience.

I think the general expectation might be users that need to modify
settings take a copy of the relevant groff_font dir and set
GROFF_FONT_PATH

(That doesn't change the fact that NetBSD would benefit from a better
way of managing locally modified files on upgrades :)

David


Re: Playing DOOM/NEODOOM

2022-01-27 Thread David Brownlee
On Wed, 26 Jan 2022 at 14:43, Todd Gruhn  wrote:
>
> I found a came called NEODOOM that works with doomlegacy.
> After a certain amount of time it likes to slow to a crawl, and
> I need to stop to let things catch up. If I make the window smaller
> (640 x 480) it still does the same thing. NEODOOM alss has a lot
> of Hi Def weapons and explosions, etc. How do I know if the problem
> is the graphocs card, nouveau, or the game?
>
> Has anyone else played NEODOOM?

Random thoughts - could try running it in different ways to see what
triggers the slowdown:
- with the software legacy renderer vs the opengl one
- with/without sound disabled (if possible)
- with a standard doom wad vs neodoom
- with a VESA Xorg config vs nouveau (will be slow anyway, and may be
hard to tell if it gets slower)

David


Re: Question about /home

2022-01-22 Thread David Brownlee
On Sat, 22 Jan 2022 at 17:20, Todd Gruhn  wrote:
>
> is /home in the  /  directory?   What happens if  /  is too small?
> Can it be moved to /usr?
>
> I recall that /home had its own filesystem/sector once upon a time...

There is a lot of flexibility in filesystem layout - you can make most
any directly a new filesystem (*) - I normally have /home as a
separate filesystem on machines with real users. In that case it's
more useful to have /home as a separate filesystem than /usr...

(*: _almost any_. Not for example /etc... Do not mount anything on
/etc, especially accidentally on a running system, unless you enjoy
rebooting)

David


Re: Raspberry Pi as wireless AP, with pluggable usb modem

2022-01-03 Thread David Brownlee
On Mon, 3 Jan 2022 at 06:59, Jason Mitchell  wrote:
>
> Hello,
>
> You need to run hostapd (included in NetBSD) to do WPA-PSK and dhcpcd to 
> assign ip addresses. Also, there's a flag in ifconfig to put the wlan in AP 
> mode. This link is old but seems to cover what you need to do to set up an AP 
> under NetBSD:
>
> https://mrrooster.tumblr.com/post/62694672/netbsd-wpa-wireless-ap
>
> I think I'd set up the phone tether first because that might be problematic 
> as you're dealing with external hardware. The wireless AP stuff looks 
> straightforward (unless the WLAN Pi 3b driver doesn't support AP mode). You 
> can test that by running the ifconfig command (from the link) and try to get 
> the AP working with no encryption first. If those two things work check out 
> then this can definitely be done.
>
> But I don't know how to get NetBSD to use any phone that's plugged in to 
> tether automatically. Some phones might still appear as a serial connection 
> whereas others could use RNDIS (I don't know about getting that to work on 
> NetBSD).

Any Android phone from the last decade _should_ show up as urndis and
Just Work with dhcpcd :)

David


Re: Raspberry Pi as wireless AP, with pluggable usb modem

2022-01-02 Thread David Brownlee
On Sun, 2 Jan 2022 at 16:25, Mayuresh  wrote:
>
> Is it possible to set up RPI (3B) as a WiFi AP and use a USB device (a
> modem or USB tethered phone) to connect to the internet?
>
> A different USB device may be used at different times, so the interface
> may vary (or may sometimes be absent). Ideally it should not require
> manually running a command depending on the device plugged.
>
> If feasible, please help with more pointers or information.

The multiple outbound interfaces would be the simpler part (I have set
up something similar with a PC Engines APU
https://www.pcengines.ch/apu.htm running openvpn and using outbound
ethernet or USB attached phone tether, but with dedicated AP hardware)

For the outbound part just run dhcpcd and exclude any internal
interfaces, it will switch between USB or ethernet based on which is
up and has an IP. I actually do the same with my laptop but with
ethernet, wifi & USB tethered phone and it pretty much Just Works.

David


Re: Timer for X-windows?

2021-10-24 Thread David Brownlee
On Sun, 24 Oct 2021 at 21:15, Edgar Pettijohn  wrote:
>
> On 10/24/21 11:06 AM, Ignatios Souvatzis (GSG) wrote:
> >
> > Am 23. Oktober 2021 04:55:21 MESZ schrieb Simon Burge :
> >
> > #!/bin/sh
> >>   $*
> >>
> >>
> >> osd_cat is in pkgsrc/x11/xosd
> >>
> >   I've used xmessage for similar tasks (in xbase)
> >
>
> Same here. Its easy enough to script a timer and pop up an xmessage.
>

... xcowsay


Re: Some bug in libc/gen/fstab.c

2021-10-14 Thread David Brownlee
On Wed, 13 Oct 2021 at 20:55, Rhialto  wrote:
>
> On Wed 13 Oct 2021 at 21:44:37 +0200, Rhialto wrote:
> > soffice.bin: /etc/fstab, 9: Missing fields
>
> Strangely enough, the following simple test program has no complaints
> about my fstab file and prints a long list of integers...
>
> #include 
> #include 
>
> int main(int argc, char **argv)
> {
> struct fstab *f;
>
> while (f = getfsent()) {
> printf("%d\n", f->fs_passno);
> }
>
> return 0;
> }
>
> -Olaf.
> --
> ___ "Buying carbon credits is a bit like a serial killer paying someone else 
> to
> \X/  have kids to make his activity cost neutral." -The BOFH
> falu.nl@rhialto

Could this be some common gtk filepicker with its own fstab parsing code?

As a quick test, what happens if you (briefly) comment out all entries in fstab?

David


Re: NetBSD on a NUC

2021-09-28 Thread David Brownlee
On Mon, 27 Sept 2021 at 20:59, Bob Bernstein  wrote:
>
> A few years ago I was given an Intel NUC
> running Windows 10, and I used it for quite
> awhile since it allowed me to enjoy Adobe
> Acrobat and Epson's Scan Utility. I was very
> familiar with both of those products.
>
> Earlier this year the NUC went belly up
> complaining that it could not find bootable
> media. I believed the unit's bios had been
> rendered unusable by many (years of 'em)
> instances of Windows Update, and the thing
> collected dust until I decided it would be
> marvelous to run NetBSD on it.
>
> Delightfully enough, a CD created from
> NetBSD-9.99.88-amd64.iso booted the NUC, but
> when sysinst began to run I was informed that
> no hard disks could be found on which to do the
> install.
>
> After awhile dawn broke over the erroneous (as
> I now believe) thinking that led me initially
> to suspect the Win10 bios, and it now seems a
> more likely scenario that the NUC's SSHD had,
> as we say, expired.
>
> An online search for the NUC's symptoms
> suggested I try to set the boot order in it to
> its boot drive, to see if it might be detected,
> but I was unable to wrestle the Intel Setup
> screen(s) into such an attempt.
>
> My question: other than replacing the NUC's
> drive, are there useful directions in which I
> might point my efforts?

If the NetBSD iso boots but cannot locate the onboard disk then either
the disk/controller is dead, or there is an issue with the NetBSD
driver code.

Some possible things to check
- Does dmesg from the NetBSD iso show up an atabus0 or nvme0 ? (To see
if the controller is recognised)
- Does the system boot a NetBSD bootable USB image? if so, can you
boot the NetBSD ISO and install onto a USB key & then boot a full
system from the USB
- Does the system boot a Windows10 bootable USB image? if so does it
see any disks

David


Re: disk scrubbing

2021-08-26 Thread David Brownlee
On Thu, 26 Aug 2021 at 13:32, Patrick Welche  wrote:
>
> Any thoughts on the pros and cons of
>
># cgdconfig -s cgd0 /dev/sd0e adiantum 256 < /dev/urandom
># dd if=/dev/zero of=/dev/rcgd0d bs=64k progress=512
># cgdconfig -u cgd0
>
> vs
>
># dd if=/dev/urandom of=/dev/rsd0e bs=64k progress=512

One is more typing and takes much longer to run? (and affects a
different partition :-p )

If its a flash device (or in fact any device which remaps blocks)
neither may overwrite all data, though both should frustrate recovery
short of flashing new device firmware or taking apart

The ATA "Secure Erase" or "Secure Erase+" commands _should_... though
we're trusting firmware here...

There may be something to be said for an ATA Secure Erase plus a dd of
urandom (or neb-wipe -r1)

David


Re: LTO support

2021-08-12 Thread David Brownlee
On Thu, 12 Aug 2021 at 08:11, Pouya Tafti  wrote:
>
> I'm looking for a low cost offsite backup solution for my teeny local NAS 
> (couple of TiB of redundant ZFS RAIDZ2 on /amd64 9.2_STABLE) for disaster 
> recovery.  Seemingly affordable LTO-5 drives (~EUR 250; sans libraries) pop 
> up on eBay from time to time, and I thought I might start mailing tape 
> backups to friends and family.  Being rather clueless about tape, I was 
> wondering:
>
> - is using an LTO drive for manual backups (or backups at this tiny scale) a 
> fundamentally dumb idea?
>
> - how well-supported and widely-used are they on NetBSD (wrt both kernel 
> devices and userland tools)?
>
> - are there reliable strategies to split a larger ZFS volume across several 
> smaller cartridges (LTFS seems not to support splits)?
>
> - are there specific caveats to watch out for (e.g. if used drives are to be 
> avoided, or would end up being cost blackholes necessitating further 
> equipment, obsolete media, etc.)?

Another couple of possible options (Not saying "don't use tapes", but
for reference)
1) Backup to external disks (either in USB case or just bare disks
hooked up to adaptor) - depending on how they are formatted they can
be "drop in" replacements for your active data, so no waiting for
tapes to restore
2) Offsite NAS with a copy of the data

With the caveat that a remote online copy of the data is _not_ a full
backup (any nefarious individual who gains online access to both, a
software bug, or operator can wipe everything), the offsite copy does
have a number of convenience & feature advantages:
- Data can be complete & "ready to go", including for catastrophic
failure which takes out all original hardware
- Choice of levels of redundancy on remote copies, from RAIDZ2 to none
- Freshness can be from close to realtime (active sync) to well
defined period (nightly backup)
- Can run full backup software, including incrementals,  ~live sync
(which can also include options to keep deleted/previous revisions),
or zfs snaphots & cloning

An example would be a main RAIDZ2 system backed up to two smaller
remote systems with non redundant ZFS filesystems using syncthing with
staggered file versioning
https://docs.syncthing.net/users/versioning.html to keep previous
versions (Note: there is an issue with syncthing on NetBSD where
"Watch for changes" has to be disabled for reasonable size
collections, relying on periodic rescans). The main system is set to
send only, the two remote to send/receive so they can sync changes
from each other. OpenVPN is also thrown into the mix to allow easy
remote access to a system behind an "external traffic only" firewall.

All data is still at risk from any of:
- Security vulnerability affecting all systems (and exploited on all systems)
- Misconfiguration/operator error (would be an impressive one to hit
all three, but possible)
- Catastrophic syncthing bug

But I'm happy with the risk/benefit tradeoff in this case

Occasional read-only access to the data at the two remote locations
was required, and the original setup was pre migration to ZFS, which
constrained the original choices. When NetBSD gains native ZFS
encryption I may look again at ZFS snapshots and possibly
https://zfs.rent/ or https://www.rsync.net/products/zfsintro.html :)

David


Re: cgd + zfs

2021-07-19 Thread David Brownlee
On Sun, 18 Jul 2021 at 09:29, Pouya Tafti  wrote:
>
> On Thu, Jul 15, 2021 at 11:43:55AM +0100, David Brownlee wrote:
> > Depending on your upgrade plans you may want to consider one 6x1TB
> > RAIDZ2 rather than 2 4x1TB RAIDZ2 - you end up with the same amount of
> > usable space and you have two spare bays for when the time comes to
> > upgrade. (This suggestion is much relevant if you have other systems
> > where you can easily hook up a 4 drive RAIDZ2, but not a 6 drive
> > RAIDZ2 :-p)
> >
> > I have a somewhat similar setup on a Dell T320 - SAS9217-8i with 8
> > drives (plus one on onboard ahcisata), 6 in a RAIDZ2, two in a zfs
> > mirror and one for boot
>
> Thanks!  This is an interesting suggestion.  I'm wondering though, wouldn't 
> having a two-drive mirror create an assymmetry in how many failed drives you 
> could tolerate? If you lost both mirrors the whole pool would be gone (I 
> assume disks of the same origin may have correlated failures).
>
> But as you say, the 6x RAIDZ2 is worth considering and it may be smarter not 
> to use all the disks. ;)

Well the 6x RAIDZ2 gives the same usable space, leaving the simple
mirror for some additional scratch space for less critical data :)

David


Re: cgd + zfs

2021-07-15 Thread David Brownlee
On Wed, 14 Jul 2021 at 06:13, Pouya Tafti  wrote:
>
> (Apologies in case this is not the right mailing list.)
>
> *tl;dr* Is it sensible to use zfs on top of cgd or are there drawbacks w.r.t. 
> zfs expecting raw I/O?
>
> (Too many) details follow.
>
> I plan to re-purpose a circa 2012 Supermicro server for a cheap home NAS.  It 
> comes with an LSI MegaRAID 9261-8i controller and 8x 1TB SAS HDDs.  I'm 
> wondering--without any experience with zfs--whether it may be more 
> flexible/future-proof than RAID, and am considering using it instead 
> (undecided yet as to the optimal configuration but I'm thinking a pool of 2x 
> sets in RAIDZ2 may be sensible, so I can replace a single set with bigger 
> HDDs later on if I need to).

Depending on your upgrade plans you may want to consider one 6x1TB
RAIDZ2 rather than 2 4x1TB RAIDZ2 - you end up with the same amount of
usable space and you have two spare bays for when the time comes to
upgrade. (This suggestion is much relevant if you have other systems
where you can easily hook up a 4 drive RAIDZ2, but not a 6 drive
RAIDZ2 :-p)

I have a somewhat similar setup on a Dell T320 - SAS9217-8i with 8
drives (plus one on onboard ahcisata), 6 in a RAIDZ2, two in a zfs
mirror and one for boot

zfs is setup to use wedges via /dev/wedges and then adjusted
rc.d/devpubd to run _before_ zfs, so I have stable zfs devices if
anything renumbers on reboot

ls -l /dev/wedges
total 0
lrwxr-xr-x  1 root  wheel  8 Jun 12 05:40 backup0 -> /dev/dk0
lrwxr-xr-x  1 root  wheel  9 Jun 12 05:40 backup1 -> /dev/dk11
lrwxr-xr-x  1 root  wheel  8 Jun 12 05:40 efi1 -> /dev/dk7
lrwxr-xr-x  1 root  wheel  9 Jun 12 05:40 home1 -> /dev/dk10
lrwxr-xr-x  1 root  wheel  8 Jun 12 05:40 media0 -> /dev/dk1
lrwxr-xr-x  1 root  wheel  8 Jun 12 05:40 media1 -> /dev/dk2
lrwxr-xr-x  1 root  wheel  8 Jun 12 05:40 media2 -> /dev/dk3
lrwxr-xr-x  1 root  wheel  8 Jun 12 05:40 media3 -> /dev/dk4
lrwxr-xr-x  1 root  wheel  8 Jun 12 05:40 media4 -> /dev/dk5
lrwxr-xr-x  1 root  wheel  8 Jun 12 05:40 media5 -> /dev/dk6
lrwxr-xr-x  1 root  wheel  8 Jun 12 05:40 root1 -> /dev/dk8
lrwxr-xr-x  1 root  wheel  8 Jun 12 05:40 swap1 -> /dev/dk9


David


Re: procfs difference between NetBSD and Linux

2021-06-20 Thread David Brownlee
On Wed, 2 Jun 2021 at 23:05, Mark Davies  wrote:
>
>
> On 2/06/21 8:32 am, Chavdar Ivanov wrote:
> > I force-downgraded samba 4.14.4 to 4.13.9 (itself released recently,
> > 11th of May). It works as expected.
> > The cvs diff with respect to the current pkgsrc version is attached,
> > in case someone else hits the same problem. Surely the other packages
> > using samba should be also rebuilt - and database/ldb uninstalled, as
> > it conflicts with samba 4.13.9.
> >
> > I basically just changed the package version in the Makefile, removing
> > references to database/ldb; edited the distinfo file and ran 'make
> > distinfo'. The PLIST was also manually adjusted.
>
> Yeah, locally I reverted to 4.13.7 which was the last 4.13 version in
> pkgsrc.  Just added an additional patch to make it happy to use the
> latest ldb, but if we are actually reverting samba in pkgsrc we should
> probably revert ldb as well.

Maybe add 4.13.7 plus your patch to pkgsrc-wip, so anyone using samba4
from pkgsrc current on netbsd-9 has an easy way to get a working
system pending the kernel pullup?

David


Re: What is a good pkgsrc package to use for file encryption and decryption?

2021-03-10 Thread David Brownlee
On Wed, 10 Mar 2021 at 08:43, Brian Buhrow  wrote:
>
> hello.  I'm considering a project that might involve storing 
> encrypted blobs on cloud
> servers such as Google Drive or Amazon Glacier.  I'd like a package that I 
> can use to encrypt
> the blobs before they're transmitted to their storage site.  I've been 
> looking at the mcrypt
> (security/mcrypt) package, but it looks pretty old.  Are there packages in 
> the pkgsrc tree that
> have similar functionality but which use newer encryption algorithms?

You might want to look at rclone - https://rclone.org/crypt/

David


Re: ZFS native block size changed in recent netbsd-9?

2021-02-13 Thread David Brownlee
On Tue, 9 Feb 2021 at 19:13, David Brownlee  wrote:
>
> Has the native disk block size reported via sata devices changed
> recently in netbsd-9?

It has! Test booted a netbsd-9.0_RELEASE and netbsd-9.1_RELEASE
kernels on a sample server (otherwise running netbsd-9.1_STABLE).
To confirm - this is entirely a kernel difference, no change in
userland in the below tests.

netbsd-9.0:

  pool: onyx0
 state: ONLINE
  scan: scrub repaired 0 in 4h45m with 0 errors on Tue Jan 21 00:50:23 2020
config:

NAMESTATE READ WRITE CKSUM
onyx0   ONLINE   0 0 0
  wd1   ONLINE   0 0 0

netbsd-9.1:

  pool: onyx0
 state: ONLINE
status: One or more devices are configured to use a non-native block size.
Expect reduced performance.
action: Replace affected devices with devices that support the
configured block size, or migrate data to a properly configured
pool.
  scan: scrub repaired 0 in 4h45m with 0 errors on Tue Jan 21 00:50:23 2020
config:

NAMESTATE READ WRITE CKSUM
onyx0   ONLINE   0 0 0
  wd1   ONLINE   0 0 0  block size: 512B
configured, 4096B native

Of course, now that I _have_ this information, I'm somewhat
nonplussed. If I'm ever in a position to conventinely rebuild the ZFS
pools on the two affected servers I will, but otherwise I suspect I
park this (reminder - I have another server originally built with a
later kernel version which does not show this issue, as the pool on wd
disks uses 4096 byte block size)

David


Re: Cannot export/import ZFS pool

2021-02-12 Thread David Brownlee
On Fri, 12 Feb 2021 at 12:39, Stephen Borrill  wrote:
>
> On Fri, 12 Feb 2021, David Brownlee wrote:
> > On Fri, 12 Feb 2021 at 11:56, Stephen Borrill  
> > wrote:
> >>
> >> NetBSD  9.1_STABLE NetBSD 9.1_STABLE (XEN3_DOMU) #0: Sat Jan  9 19:31:08
> >> UTC 2021 
> >> mkre...@mkrepro.netbsd.org:/usr/src/sys/arch/xen/compile/XEN3_DOMU amd64
> >>
> >> zfs.kmod has been built with MAXPHYS=32768 as it's a -9 DomU
> >>
> >> # /etc/rc.d/zfs rcvar
> >> # zfs
> >> $zfs=YES
> >> # zpool create tank /dev/xbd1d
> >> # zpool list
> >> NAME   SIZE  ALLOC   FREE  EXPANDSZ   FRAGCAP  DEDUP  HEALTH  ALTROOT
> >> tank  99.5G95K  99.5G - 0% 0%  1.00x  ONLINE  -
> >> # zpool export tank
> >> # zpool import tank
> >> cannot import 'tank': no such pool available
> >>
> >> This does not seem right.
> >
> > Does using rxbd1 rather than rxbd1d work? I've found real issues
> > trying to use individual partition devices
>
> The only one that works for me is xbd1d:
>
> # zpool create tank /dev/rxbd1
> cannot open '/dev/rxbd1': No such file or directory
> # zpool create tank rxbd1
> cannot open 'rxbd1': no such GEOM provider
> must be a full path or shorthand device name
> # zpool create tank rxbd1d
> cannot create 'tank': invalid argument for this pool operation
> # zpool create tank xbd1
> cannot open 'xbd1': no such GEOM provider
> must be a full path or shorthand device name
> # zpool create tank /dev/xbd1
> cannot open '/dev/xbd1': No such file or directory
> # zpool create tank xbd1d
> # zpool export tank
> # zpool import tank
> cannot import 'tank': no such pool available

 Could it be some xen magic difference?

That GEOM error is quite specific:

https://nxr.netbsd.org/xref/external/cddl/osnet/dist/cmd/zpool/zpool_vdev.c#474
has a check to is_whole_disk which runs  ioctl(fd, DIOCGDINFO, ) on
the provided path

Does {r}xbd0 behave differently to {r}xbd0d? - worth a quick test?

cat test.c
#include 
#include 
#include 
#include 
#include 
#include 
int main(int argc, char** argv) {
struct disklabel dl;
int fd;
for (char **pargv = argv+1; *pargv != argv[argc]; pargv++) {
char *path = *pargv;
if ((fd = open(path, O_RDWR | O_NONBLOCK)) < 0) {
perror(path);
} else {
printf("%s: ioctl=%d\n", path, ioctl(fd, DIOCGDINFO, ));
close(fd);
}
}
}
cc -Wall -o test test.c && doas ./test /dev/{r,}wd0{d,}
/dev/rwd0d: ioctl=0
/dev/rwd0: ioctl=0
/dev/wd0d: Device busy
/dev/wd0: Device busy

(I an active zpool on wd0, so the Device Busy is reasonable :-p

David


Re: Cannot export/import ZFS pool

2021-02-12 Thread David Brownlee
On Fri, 12 Feb 2021 at 11:56, Stephen Borrill  wrote:
>
> NetBSD  9.1_STABLE NetBSD 9.1_STABLE (XEN3_DOMU) #0: Sat Jan  9 19:31:08
> UTC 2021 mkre...@mkrepro.netbsd.org:/usr/src/sys/arch/xen/compile/XEN3_DOMU 
> amd64
>
> zfs.kmod has been built with MAXPHYS=32768 as it's a -9 DomU
>
> # /etc/rc.d/zfs rcvar
> # zfs
> $zfs=YES
> # zpool create tank /dev/xbd1d
> # zpool list
> NAME   SIZE  ALLOC   FREE  EXPANDSZ   FRAGCAP  DEDUP  HEALTH  ALTROOT
> tank  99.5G95K  99.5G - 0% 0%  1.00x  ONLINE  -
> # zpool export tank
> # zpool import tank
> cannot import 'tank': no such pool available
>
> This does not seem right.

Does using rxbd1 rather than rxbd1d work? I've found real issues
trying to use individual partition devices

David


ZFS native block size changed in recent netbsd-9?

2021-02-09 Thread David Brownlee
Has the native disk block size reported via sata devices changed
recently in netbsd-9?

ZFS was set up on two netbsd-9 servers a while back. They have been
tracking the netbsd-9 branch and recently started to report a block
size mismatch. zdb shows all pools on both systems have  "ashift: 9".
Both systems have disks on standard onboard SATA controllers.

A third server was set up substantially more recently, and it does not
show the issue - it has two disks on onboard SATA with "ashift: 12",
and a six disk raidz2 on an mpii (devices show up as sdX rather than
wdX)

Puzzled

David

.

Sample from "problem" output below.

status: One or more devices are configured to use a non-native block size.
Expect reduced performance.
action: Replace affected devices with devices that support the
configured block size, or migrate data to a properly configured
pool.

NAMESTATE READ WRITE CKSUM
onyx1   ONLINE   0 0 0
  wd2   ONLINE   0 0 0  block size: 512B
configured, 4096B native
  wd3   ONLINE   0 0 0  block size: 512B
configured, 4096B native


Re: Bump [q] gradle on NetBSD 9.1 (amd64) with OpenJDK 11 -- does not work

2021-01-21 Thread David Brownlee
Just a "me too" comment.

I'm using openjdk8 on NetBSD/amd64 for a wildfly gradle project in
IntelliJ. Any attempt to use openjdk11 fails
- wildfly starts but cannot accept any http connections
- gradle build hangs
- intellij randomly hangs/cannot connect debugger to running java


Re: Any package to populate image from raw data?

2020-12-31 Thread David Brownlee
On Thu, 31 Dec 2020 at 16:54, Mayuresh  wrote:
>
> I recently wrote a pyusb based driver to interact with an X ray camera.
> The driver gives me a byte array of a 16 bit grayscale image. I want to
> put this byte array into an image format. No specific format required as I
> can always convert it using ImageMagick.
>
> [The python pillow package almost did the job except for one glitch. This
> data is 16 bit grayscale data and pillow is able to handle only 8 bit data
> i.e. the image gets formed fine, but gets saved only with 8 bit depth. Saw
> posts somewhere saying that this is a limitation with pillow.]
>
> Looking for alternative to pillow to create image from byte array,
> preferably pkgsrc based, but otherwise is also fine. Python based
> preferably as the driver is in python, but otherwise is also fine.

Maybe https://pypi.org/project/tifffile/ - TIFF has supported 16bpp
for the last few decades :-p

David


Re: zfs/zpool and local disk vs netboot?

2020-12-27 Thread David Brownlee
On Sun, 27 Dec 2020 at 13:36, John D. Baker  wrote:
>
> On Sun, 27 Dec 2020, David Brownlee wrote:
>
> > Does the pool show up under different devices - does a simple 'zpool
> > import foo' work?
>
> What do you mean by "under different devices"?
>
>   # zpool import foo
>   cannot import 'foo': a pool with that name is already created/imported,
>   and no additional pools with that name were found
>
> so, no, 'zpool import foo' does not work.  That's the same output as it
> gave before I re-created the zpool and simply copied the "zpool.cache"
> file from 9.1 (local disk) to -current (NFS) but at that time showed
> the pool as "UNAVAIL".
>
> Whenever I boot 9.1 from local disk, it's mounted and available but
> whenever I boot -current, 'zpool' and 'zfs' say it exists, but it's
> not mounted.
>
> Hmmm.  While composing this message, I ran 'zfs mount foo' manually
> and it is now mounted.  I'm sure I tried that before and it did nothing
> then.
>
> It's automagically mounted when I boot 9.1 without needing an entry in
> "/etc/fstab".  Why not when booting -current?

Do you have zfs=yes in rc.conf?


Re: zfs/zpool and local disk vs netboot?

2020-12-27 Thread David Brownlee
On Sun, 27 Dec 2020 at 07:39, John D. Baker  wrote:
>
> Since the zfs/zpool is as yet unused, I forcibly re-created it under
> -current and copied the resulting "zpool.cache" file to the 9.1 system.
>
> Rebooting 9.1, the zpool shows up and is mounted just as before.
>
> Rebooting -current, 'zpool list' shows the zpool as being online, and
> 'zfs list' shows there being a dataset, but it is not mounted--at least
> it doesn't show up in the output of 'df -l'.

(Only very obvious questions - which you've probably already confirmed)

Does the pool show up under different devices - does a simple 'zpool
import foo' work?

David


Re: NetBSD 8 VPS server refusing to reboot: please help

2020-11-30 Thread David Brownlee
While they may not be the cheapest (starting at $10/month) I've used
Panix for reliable NetBSD xen hosting for the last... decade or so

https://www.panix.com/v-colo/plans.html

They have NetBSD amd64 & i386 images listed from 5.0.2 through to 9.1

David

On Mon, 30 Nov 2020 at 10:34, Matthias Petermann  wrote:
>
> Hello Mayuresh,
>
>
> Translated with www.DeepL.com/Translator (free version)
>
> Am 28.11.2020 um 16:05 schrieb Mayuresh:
> > On Sat, Nov 28, 2020 at 06:51:04PM +0530, Mayuresh wrote:
> >> I accidentally powered off a Hetzner VPS server running NetBSD 8 and it
> >> is refusing to reboot.
> >
> > Ok, all solved - panic withdrawn! It just required rebooting it a number
> > of times and arbitrarily once it started. Probably something to do with
> > arbitrariness of sequence of detecting disks or something else?
> >
>
> thank you very much for your contribution here. I happen to have a
> similar topic on the screen and have also read in one of the forums (I
> think even in connection with your name but I can't find the URL
> anymore...) which VPS providers have NetBSD on offer (even if they don't
> officially support it). The name Hetzner was mentioned there, and
> someone also wrote that they have provided the NetBSD-ISO for
> installation there on request. Since I already had a Hetzner account, I
> tried that right away. However, I can only find various Linuxes, FreeBSD
> and OpenBSD as well as the Microsoft collection in the rich offer of
> ISOs. How did you get NetBSD installed there?
>
> Independently of that I once opened a ticket at Hetzner with the request
> to make a NetBSD 9.1 ISO generally available and permanently available.
> If I have an answer to this request, I will gladly give you an update
> here again.
>
> Best regards
> Matthias


Re: .cshrc elm and PIDs

2020-11-23 Thread David Brownlee
On Mon, 23 Nov 2020 at 13:10, Steve Blinkhorn  wrote:
>
> I monitor incoming emails on several user accounts in xterms stacked
> in one icewm workspace.  Being long in the tooth I use elm for email
> and csh as my shell, and have done since the Dawn of Time.
>
> If a system reboot is needed, setting these (and various other
> workspaces) up by hand can be laborious.  So my X startup files are
> configured to start a whole bunch of xterms in a handful of
> workspaces, and elm is started for the first xterm for each user
> account from .cshrc thus:
>
> pgrep -u `id -u` elm
> if ($status == 1) then
> elm
> if ($status == 1) then
> CM
> elm
> endif
> endif
>
> So we:
> - check for the existence of an elm PID, failing which run elm
> - if elm fails (always because a temporary file alread exists), use CM
>   (a local alias that removes the temporary file)
> - run elm
>
> This makes a restart to the point where I can work very much faster.
> BUT the PID for the successful elm process keeps showing up in the
> text when I'm writing emails, and ~ substitution doesn't work within
> elm, e.g. fro reading in the content of signature files (I use vi as
> my editor, but I suppose you guessed that).
>
> There is only one further line in the .cshrc files, which is
>
> umask 022
>
> I'm guessing that umask is internal to csh, so elm is the last process
> to be started from .cshrc.  But I'd like to understand what's going on
> as well as fix it.

To avoid the symptom of the PID showing up you should be able to add
>/dev/null to the pgrep line.

To track down the cause...
Are you running this script in the background, or re-running it
periodically (at a time which would account for the PID showing up in
the text)?
Maybe add a "date >> $HOME/log" to the script to record when it gets run

On the ~ - is that form within elm or within vi-in-elm? (Sorry, its
been too long since I switched to pine for my elm neurons :-p

David
Do you have any of your setup conditionalised on being in an interactive shell?


Re: Pb with added disk (pciide) becoming wd0

2020-11-12 Thread David Brownlee
On Thu, 12 Nov 2020 at 15:12,  wrote:
>
> On Thu, Nov 12, 2020 at 02:26:47PM +, David Brownlee wrote:
> > On Thu, 12 Nov 2020 at 13:42,  wrote:
> > >
> > > Hello,
> > >
> > > I have some IDE disks that I'd like to read in order to know what is
> > > left on them before deciding what to do with them.
> > >
> > > I bought a PCI-E IDE adapter to be able to connect them, since my AMD64
> > > is SATA.
> > >
> > > The problem is that the pciide connected disks appear first hence, after
> > > successful boot by the bios with loading of the correct kernel from the
> > > correct disk, the supplementary disk becomes wd0 and conflicts with my
> > > fstab.
> > >
> > > My two "permanent" disks are still disklabel'ed (no GPT).
> > >
> > > Is there a way to give identifiers to the "permanent" disks, in fstab,
> > > so that whatever I add, the system can identify unambiguously the disks
> > > in fstab?
> > >
> > > Or do I have to resort to recompiling the kernel with explicitely
> > > setting the devices in the conf?
> >
> > For disklabel, ROOT is your friend (see fstab(5)).
> >
> > If the first field starts with the prefix ?ROOT.? the prefix is replaced
> > with ?/dev/[root_device]?, where [root_device] is the value of the
> > ?kern.root_device? sysctl.
> >
> > So update fstab to start ROOTa instead of /dev/wd0a (similarly for any
> > other filesystems on that same disk).
>
> Precision: I'm still on 8.0 and I think ROOT is available with 9.0...
>
> I will go for now with a recompilation of the kernel and locators.

Ah - or "boot -s" then manually "mount /dev/wd2a /" & exit?


Re: Pb with added disk (pciide) becoming wd0

2020-11-12 Thread David Brownlee
On Thu, 12 Nov 2020 at 13:42,  wrote:
>
> Hello,
>
> I have some IDE disks that I'd like to read in order to know what is
> left on them before deciding what to do with them.
>
> I bought a PCI-E IDE adapter to be able to connect them, since my AMD64
> is SATA.
>
> The problem is that the pciide connected disks appear first hence, after
> successful boot by the bios with loading of the correct kernel from the
> correct disk, the supplementary disk becomes wd0 and conflicts with my
> fstab.
>
> My two "permanent" disks are still disklabel'ed (no GPT).
>
> Is there a way to give identifiers to the "permanent" disks, in fstab,
> so that whatever I add, the system can identify unambiguously the disks
> in fstab?
>
> Or do I have to resort to recompiling the kernel with explicitely
> setting the devices in the conf?

For disklabel, ROOT is your friend (see fstab(5)).

If the first field starts with the prefix “ROOT.” the prefix is replaced
with “/dev/[root_device]”, where [root_device] is the value of the
“kern.root_device” sysctl.

So update fstab to start ROOTa instead of /dev/wd0a (similarly for any
other filesystems on that same disk).

David


Re: sponsor NetBSD for 2020 https://github.com/sponsors/NetBSD

2020-11-10 Thread David Brownlee
On Tue, 10 Nov 2020 at 18:25,  wrote:

> The usual way that TNF funding of projects work is that a developer will
> come to TNF with a proposal for the project to fund their work.
> Actively seeking out developers when nobody has come forward is a
> challenge, because the sums of money are usually too little to have
> consulting firms interested.
>
> In the absence of any framework, I've shamelessly posted that I am
> offering a bounty for some netbsd/pkgsrc related work on
> tech-pkg/tech-kern and it was successful (IMO). We can write down all
> the names & offers if there are too many, but this is not the case now.
>
> As for sun4v, I believe Palle is doing work on this sometimes.

I'm also quite taken by the idea of being able to donate towards
specific goals (providing there is existing infrastructure which can
be used without requiring significant setup or ongoing effort, and
doesn't take too large a chunk as fees).

The sums may only appeal to people casually hacking on code, but it
may also provide a useful barometer for "Ah, quite a few people are
interested enough in X to put up some $", and occasionally inform TNF
decisions on where to apply funding.

There is bountysource (which has an active campaign at $2,100 for the
admittedly large task of updating the gcc VAX backend to the current
gcc interfaces so it can be kept
https://www.bountysource.com/issues/91495157-vax-convert-the-backend-to-mode_cc-so-it-can-be-kept-in-future-releases
), but the site did have availability issues and the search page takes
in the order of minutes to show any results)

David


Re: too many inodes error from fsck

2020-10-08 Thread David Brownlee
On Thu, 8 Oct 2020 at 20:13, Greg Troxel  wrote:
>
> David Brownlee  writes:
>
> > I have a filesystem failing fsck with "bad inode number 34610688 to
> > nextinode" and its not in a convenient place to copy all data off to
> > rebuild, so I'd like to investigate options to clear the affected
> > inode.
> >
> > The message is triggered from pass1.c
> >
> > for (ii = 0; ii < inosused; ii++, inumber++) {
> > if (inumber < UFS_ROOTINO) {
> > (void)getnextinode(inumber); /* <-- 
> > here */
> > continue;
> > }
> >
> > Adding a quick printf before that loop of
> > printf("inumber %llu, inosused %lld\n", (unsigned long long)inumber,
> > (unsigned long long)inosused);
> > and tweaking the bad inode number message to include lastvalidnum
> >
> > gives a fair amount of output, ending with:
> >
> > inumber 34091008, inosused 11264
> > inumber 34194944, inosused 11264
> > inumber 34298880, inosused 11264
> > inumber 34402816, inosused 11264
> > inumber 34506752, inosused 839647232
> > bad inode number 34610688 (max 34610687) to nextinode
> >
> > "one of those things is not like the others".
> > It looks like we have a bad inosused, which runs off the end of the
> > available space (>.lastvalidinum) This feels like something from which
> > fsck could recover?
>
> Yes, I suppose it could write something, but it's hard to know how.
>
> I am guessing that in this case you have a sector with junk in it, when
> it should be inodes.   I wonder about using fsdb to look at it, or
> writing something to get a sector and just print the inodes by field
> value.
>
> This may be as simple as zeroing the bad sector.

So far in this case I think fsck has "fixed" the inodes up to
lastvalidnum, I wonder if a relatively conservative approach could be
to truncate inosused to lastvalidnum?

David


Re: too many inodes error from fsck

2020-10-08 Thread David Brownlee
On Thu, 3 Oct 2013 at 20:42, Christos Zoulas  wrote:
>
> On Oct 3,  5:08pm, net...@precedence.co.uk (Stephen Borrill) wrote:
> -- Subject: Re: too many inodes error from fsck
>
> | I tried it, but I read that message as saying that an unknown inode has a
> | link to an invalid inode in a linked list and the inode I need to clear is
> | the one that references the invalid inode.
>
> I guess make it print the inode you want it to remove.
>
> | It has WAPBL enabled on it, so I would have hoped the metadata would be OK
> | even if the actual file contents were not :-/
>
> I wonder what heppened then. It got pretty mangled!

Following up on this (ancient :) thread, as I'm hitting a related issue.

I have a filesystem failing fsck with "bad inode number 34610688 to
nextinode" and its not in a convenient place to copy all data off to
rebuild, so I'd like to investigate options to clear the affected
inode.

The message is triggered from pass1.c

for (ii = 0; ii < inosused; ii++, inumber++) {
if (inumber < UFS_ROOTINO) {
(void)getnextinode(inumber); /* <-- here */
continue;
}

Adding a quick printf before that loop of
printf("inumber %llu, inosused %lld\n", (unsigned long long)inumber,
(unsigned long long)inosused);
and tweaking the bad inode number message to include lastvalidnum

gives a fair amount of output, ending with:

inumber 34091008, inosused 11264
inumber 34194944, inosused 11264
inumber 34298880, inosused 11264
inumber 34402816, inosused 11264
inumber 34506752, inosused 839647232
bad inode number 34610688 (max 34610687) to nextinode

"one of those things is not like the others".
It looks like we have a bad inosused, which runs off the end of the
available space (>.lastvalidinum) This feels like something from which
fsck could recover?

David


Re: Drive ID changed

2020-09-28 Thread David Brownlee
On Mon, 28 Sep 2020 at 18:57, Todd Gruhn  wrote:
>
> David:
>
> I finally got it. The following line became a problem:
>
> ROOT.b  swapswapsw 0 0
>
> I got the message:
>
> ... reported failures
> /etc/rc.d/swap1
> SEE /var/run/rc.log

Could you confirm what NetBSD version you're running? This works on a
recent netbsd-9 stable:

(onyx ~)14# head -2 /etc/fstab
ROOT.a  /   ffs rw,log 1 1
ROOT.b  swapswapsw 0 0
(onyx ~)15# swapctl -U
swapctl: removing /dev/wd0b as swap device
(onyx ~)16# /etc/rc.d/swap1 start
swapctl: adding /dev/wd0b as swap device at priority 0


Re: Drive ID changed

2020-09-28 Thread David Brownlee
On Mon, 28 Sep 2020 at 12:04, Todd Gruhn  wrote:
>
> WOW! Martin. Thanks.
>
> This is nothing like NetBSD 5.0 .
> Its like learning a new system...

You can also use the special "ROOT" token in /etc/fstab - eg:

ROOT.a  /   ffs rw,log 1 1
ROOT.b  swapswapsw 0 0

David


Re: dhcpd on 9.0_STABLE amd64

2020-06-29 Thread David Brownlee
On Mon, 29 Jun 2020 at 13:04, Uwe Klaus  wrote:
>
> On Mon, 29 Jun 2020, Jaromír Dole?ek wrote:
>
> > I'd recommend switching over to (also built-in) dhcpcd.
> This is a DHCP client, isn't it.
> I need a reliable DHCP server.

I've had very good experiences with dnsmasq from pkgsrc - which can
also run as a simple dns server

David


Re: Providing temporary storage space to a VM: qcow, nfs etc

2020-06-25 Thread David Brownlee
On Thu, 25 Jun 2020 at 04:32, Mayuresh  wrote:
>
> I am using a Linux guest as a pkgsrc build server and the host isn't
> particularly rich in disk space. So can't completely reserve all the space
> required, but spikes in usage during compilation are accommodatable.
>
> I was using qcow2 disk image, but as someone already pointed out it fills
> up rapidly and I searched further on that - it doesn't actually delete
> anything. I don't find an easy way to compress it other than using a qemu
> tool to create a duplicate image and delete the old one.
>
> Looking for something more conservative on space. So turned to network
> file systems with the host. But they aren't particularly speedy. Here are
> speeds shown by dd for write operations:
>
> qcow2: 64MB/s - good but disk fills up rapidly, no easy way to shrink
> nfs: 9.8MB/s - about 6 to 7 times slower than virtual qcow2 disk
> sshfs: 1.8MB/s - no need as nfs does better
>
> If I could reduce the gap between nfs and qcow2 even to some extent I'd
> probably settle for that, as it gives me a lot of flexibility in storage.

A quick if not necessarily elegant option would be to have multiple
qcow2 files - one for the system and one for space to build. You can
release the build space by stopping the vm, just recreating the second
qcow2 file and restarting the VM

David


Re: Optional crunchgen base (Was: Postfix and local mail delivery - still relevant in 2020?)

2020-06-08 Thread David Brownlee
On Sun, 7 Jun 2020 at 18:35, Greg A. Woods  wrote:
> [...]
> Now I don't know what your storage situation is on your VAXen, but if
> you can possibly afford to static-link your build you'll find things
> start so much faster you'll be VERY surprised.

I built a static linked NetBSD vax a while back and iirc it was
significant faster (but too big to fit on any disk I had so I did most
of the tests under simh, so ymmv)

> Static linked those two programs are just:
>
> # size /usr/libexec/postfix/master /usr/libexec/postfix/qmgr
>textdata bss dec hex filename
>  6743314428   42840  721599   b02bf /usr/libexec/postfix/master
> 4219996   26140   53016 4299152  419990 /usr/libexec/postfix/qmgr
>
> So, one is indeed quite large, but not huge by today's standards.
>
> A complete static-build for i386 is 1.8G (that's everything but tests,
> debug, and x11).
>
> Now ideally what I want to do for embedded systems is static-link every
> binary into one crunchgen binary.  I've done this for 5.2 on i386, and
> the whole base system (or most of it, no compiler, tests, or x11; and no
> ntpd or named or postfix) is just 7.4MB compressed.  Yes, just 7.4
> megabytes:
> [...]
> To really make this useful for general NetBSD builds will take some more
> hacking on the build system (basically it might go something like always
> building a ".cro" file for every program possible, then generating a
> crunchgen config to link them all together and generate an mtree file to
> generate all the (sym)links; and possibly doing it on a per-set basis
> (e.g. one binary for base, one for the toolchain, one for x11, or
> something like that).

Would it be possible to persuade you to take a look at this for
current NetBSD? If it was possible to build base like this it would
give an opportunity for people to test on a variety of older and
memory constrained boxes...

Maybe I could buy you a few dozen cups of coffee or beverage of choice
as a start? :-p

Thanks

David


Re: HP ProLiant server running NetBSD 9 setup suggestions?

2020-05-26 Thread David Brownlee
On Tue, 26 May 2020 at 11:55, Sad Clouds  wrote:
>
> On Tue, 26 May 2020 11:03:41 +0100
> David Brownlee  wrote:
>
> > If you do find fans spinning more than you like it may be worth
> > replacing it/them with quieter/more efficient models - I did this for
> > the main case fan on a Dell T320 and now have it running with a 16
> > core E5-2450L and 8 SATA drives without any noticeable noise under
> > normal conditions
> >
> > David
>
> I'm not sure it's as simple as that. With 1U and 2U server cases there
> isn't much room for larger fans, so to keep the system cool those tiny
> fans have to spin much much faster, creating a lot of noise.

Oh, undoubtedly - 1U cases are horribly constrained when it comes to
fan sizes, but even for 1U there will be options which could
significantly reduce fan noise, if just not down to the levels of
larger cases - eg https://www.quietpc.com/40mmfans

David


Re: HP ProLiant server running NetBSD 9 setup suggestions?

2020-05-26 Thread David Brownlee
On Mon, 25 May 2020 at 22:07, Chris Hanson  wrote:
>
> One of the drives failed and I’d set the drives up as a single volume, oops.
>
> I brought up Windows temporarily to do the one firmware update I didn’t seem 
> to be able to do any other way (the storage controller) and then reinstalled 
> NetBSD.
>
> Now that I’ve reinstalled, have a dmesg: 
> https://dmesgd.nycbug.org/index.cgi?do=view=5512
>
> There’s going to be one more reinstall in my future, once my LFF drive cage 
> arrives and I set up large 3.5in SATA disks.
>
> My experience so far is that putting in a random disk that I had laying 
> around causes the fans to spin up to 70some percent for a period of time, and 
> then the system appears to adapt to the drive and get quiet again--right now 
> it’s barely noticeable. We’ll see what happens when I build LLVM...

If you do find fans spinning more than you like it may be worth
replacing it/them with quieter/more efficient models - I did this for
the main case fan on a Dell T320 and now have it running with a 16
core E5-2450L and 8 SATA drives without any noticeable noise under
normal conditions

David


Re: NetBSD-9 GPT on disks smaller than 2TB

2020-04-21 Thread David Brownlee
On Tue, 21 Apr 2020 at 10:58, Michael van Elst  wrote:
>
> cryintotheblue...@gmail.com (Sad Clouds) writes:
>
> >Hi, assuming I'm using a system that doesn't require UEFI and disks are
> >smaller than 2TB in size. Is there any advantage of using GPT vs the
> >old disklabel scheme? Also if I want to use a partition (not whole
> >disk) for ZFS, are there any weird interaction/restrictions with GPT?
>
> Advantage might be portability and the availability of partition names.
>
> For ZFS it's best to use whole disks (and multiple of these). If you
> want to use a partition, it doesn't really matter if it is a slice
> (with disklabel) or wedge (with GPT).

One issue - importing zpools from disklabel partitions does not Just
Work (wedges are OK). You have to create a new dev directory with just
the relevant device nodes). Only an issue if you need to import (eg
disks renumbered)

David


Re: IntelliJ won't run under NetBSD 9.0

2020-04-08 Thread David Brownlee
On Tue, 7 Apr 2020 at 15:07, John m0t  wrote:
>
> I investigated long and hard.
> here is the report:
> https://gist.github.com/j-fuller/d49abdf8b0cd90f9645cbf73d7023b9a#file-gistfile1-txt
> any ideas? (  :-)  )

As a data point I'm running IntelliJ 2019.3 under pkgsrc/openjdk8

I have a tiny wrapper that runs

ulimit -d $(ulimit -H -d)
export JAVA_HOME=/usr/pkg/java/openjdk8

before execing idea.sh

(In case that helps)

I did not have much luck with openjk11 last I tried - will try again to test

David


Re: Looking for java an android devs on netbsd environment

2020-04-06 Thread David Brownlee
On Fri, 3 Apr 2020 at 15:27, John m0t  wrote:
>
>  Hello;
>
> I am trying to set a full production system to do android and java 
> development in NetBSD.
>
> Is anyone doing it right now or ever done it before?
>
> I need to know if these things work on netbsd:
>
> a. android studio
>
> b. adb bridge
>
> c. eclipse
>
> d.intellij idea
>
> e. qt creator
>
> f. java (oracle java vs OpenJDK)(which version/versions? 1.8? 11?)
>
> any experience that you have is most most welcome and appreciated.

I've been developing in Java under NetBSD for a while now. I use
IntelliJ IDEA under pkgsrc/openjdk8. Building for various versions of
wildfly. Previously also built for ancient Jboss versions and PhoneMe
j2me under Windows CE (still have nightmares about that last one).

Eclipse uses native bindings, so IIRC it needs the Linux jdk, which
has issues due to some missing emulated syscalls (futex and one
other).

Native openjdk8 works pretty well but very occasionally seems to
randomly fail - symptoms would be a request to fetch a page in browser
fails, refreshing might fail another couple of times then work again.

I've switched from a Thinkpad T430 to T480 and now seem to have some
bizarre display interaction with IDEA where everything will just slow
down massively until the process is restarted.

Last I tried native openjdk11 did not seem to reliably run wildfly
(all services start and backend processes fine, but no requests
accepted).

David


Re: ZFS status

2020-02-25 Thread David Brownlee
On Tue, 25 Feb 2020 at 11:36, Rocky Hotas  wrote:
>
> On feb 24 23:39, David Brownlee wrote:
>
> [...]
>
> > Or if another disk is plugged in that appears as a lower numbered
> > device, for example making the disk switch from wd1 to wd2.
>
> Ok!
>
> > Apologies, poor phrasing on my part - I meant whole devices rather
> > than partition within a device - so wd4, ld0, sd3, as opposed to wd1e
> > or raid2f. I suspect wedges such as dk3 should be fine, but again,
> > better to give zfs the whole device. (on a note of light amusement I
> > have used all of the mentioned devices in zfs pools at least once :)
>
> No problem. Yes, according to the previous message from Chavdar Ivanov,
> wedges can be used as well.
> If you tested any sort of device, it's definitely good :)! ZFS seems
> very flexible about that.

Yup - To clarify, I've used zfs without issue on wedges, while I
believe I have restarted with the wedge appearing as a different
device id I cannot confirm it.
While I have restarted with different device ids for the other
devices, and the only one to have an issue was on disklabelled
partitions. I should file a PR :)

Thanks

David


Re: ZFS status

2020-02-24 Thread David Brownlee
On Mon, 24 Feb 2020 at 18:58, Rocky Hotas  wrote:
> > - If you make a zfs filesystem on a disklabel partition (eg wd0f) and
> > the disk moves zfs does not seem to be able to find it again.
>
> Do you mean if the disk is removed from the system and then plugged
> there again?

Or if another disk is plugged in that appears as a lower numbered
device, for example making the disk switch from wd1 to wd2.

> > zfs best practice is to use raw devices, so this shouldn't be an issue
> > for most people
>
> For example, assume that you would like to create a new pool called
> `newpool' using disk /dev/wd0.
> By `using the raw device', are you meaning `zpool create newpool rwd0'?

Apologies, poor phrasing on my part - I meant whole devices rather
than partition within a device - so wd4, ld0, sd3, as opposed to wd1e
or raid2f. I suspect wedges such as dk3 should be fine, but again,
better to give zfs the whole device. (on a note of light amusement I
have used all of the mentioned devices in zfs pools at least once :)

David


Re: ZFS status

2020-02-21 Thread David Brownlee
On Fri, 21 Feb 2020 at 10:45, Sad Clouds  wrote:
>
> Hi, anyone knows the current status of ZFS for recently released
> NetBSD-9? There is a message on the console - "WARNING: ZFS on NetBSD
> is under development". OK, but what does this mean? There is a good
> chance it may lose/corrupt data, or it's pretty stable but watch out
> for minor issues?

I would say the latter - I'm using it on a couple of boxes and they
have had the usual selection of test cases - apps filling up file
systems, switching between zfs and legacy mount and back, the box
being rebooted with the disks on different ports, disks moved between
boxes, and at least one case with a disk from a set missing then added
back on next reboot. Not lost any data yet (though see note below on
disklabel partitions)

I've encountered two issues
- I have one box where zfs does not work - trying to mount a new
filesystem or existing one copied from another machine just panics
- If you make a zfs filesystem on a disklabel partition (eg wd0f) and
the disk moves zfs does not seem to be able to find it again. If you
run MAKEDEV for the affected device into a new directory and point zfs
at that then it picks up the disk. This gave me something of a scare.
zfs best practice is to use raw devices, so this shouldn't be an issue
for most people

David


Re: EST available frequencies drops during operation

2020-01-26 Thread David Brownlee
On Sun, 26 Jan 2020 at 06:14, Matthias Petermann  wrote:
>
> Hello everybody,
>
> on my Lenovo X230 (Intel Core i5-3320M CPU @ 2.60GHz) with NetBSD
> 9.0_RC1 (amd64) I have made a strange observation several times.
> Especially under high load (the CPU temperature was well over 90 degrees
> Celsius), the computer seemed to be very slow, even after the load
> decreased.
>
> The reason seems to be as follows. Under normal conditions I get:
>
>  x230Mk4$ sysctl machdep.est.frequency.available
>  machdep.est.frequency.available = 2601 2600 2500 2400 2300 2200
> 2100 2000 1900 1800 1700 1600 1500 1400 1300 1200
>
> In the situation described above, I get:
>
>  x230Mk4$ sysctl machdep.est.frequency.available
>  machdep.est.frequency.available = 1200
>
> It seems as if the available clock frequencies are dropped during
> operation, so that the computer / OS can no longer clock itself to a
> higher step. After a reboot, everything has become normal again.
>
> Another note: I have the feeling that the problem occurs frequently when
> I use Qemu VMs (with nvmm) - in my case especially Windows 10 32 bit. It
> could of course be the nature that Qemu generates a lot of load and that
> this is a thermal problem. In the meantime, I have set estd so that
> frequencies above 2200 MHz are avoided, hoping to get overheating under
> control and not get the problem. So far, that hasn't really helped.
>
> Has anyone ever observed something like this and knows advice?

I saw something similar on a T430 under NetBSD-8, I *think* most often
after suspect/resume, possibly when the battery was towards the lower
end.

Not more than another data point unfortunately

David


Re: sync netbsd drive with Windows 10

2019-10-15 Thread David Brownlee
https://docs.syncthing.net/users/versioning.htmlOn Tue, 15 Oct 2019 at
14:49, Greg Troxel  wrote:
>
> Bob Bernstein  writes:
>
> > On Mon, 14 Oct 2019, David Brownlee wrote:
> >
> >> I've had good experiences running syncthing to sync data between a
> >> set of NetBSD boxes (some directories being master on one machine
> >> only and pushing out, others allowing changes from multiple
> >> ends). Its cross platform. It might be overkill for just two boxes,
> >
> > What's "overkill" is me taking the time and trouble to put together in
> > one place all this files! 
> >
> > I will consider my inquiry asked-and-answered, and give syncthing a
> > test spin around the block.
>
> Another thing to look at is unison.  It runs when you ask it to, shows
> you what it wants to sync, and then you say ok.  unison is in ocaml, but
> we have a very good history of that working, even on old platforms
> (c.f. haskell and rust!),  I have no idea how that works on windows.
>
> I don't mean to criticize or contradict syncthing at all.  I use that
> too, and it has worked very well.
>
> Just keep in mind that if you do multilateral sync among N machines and
> any one of them is flaky about their fileysstem that may propagate.  So
> do not view an N-way syncthing replica as a backup, even though it
> functions as a backup against total loss of a disk.

+1 on unison working well, and very much +1 on multilateral sync
synching removals you may not want - I had a syncthing directory setup
with one node as Send only and the others as default. When I lost a
disk on one of the other nodes and brought it up without that disk it
happily propagated the removal of all those files to the other backup
nodes (not to the Send only master obviously). I wouldn't have minded
but it was filesystem with around 5TB of data so repropagating it took
a while :). Lesson learned - keep the other nodes as Receive only in
that setup (they still sync changes from the master among them), and
enabling file versioning :)

Both Unison and Syncthing have good support for keeping older versions
when changes occur
- https://docs.syncthing.net/users/versioning.html
- 
https://www.cis.upenn.edu/~bcpierce/unison/download/releases/stable/unison-manual.html#prefs
If you have the space, spend some of it to enable these features on
filesystems where you might care :)

David


Re: sync netbsd drive with Windows 10

2019-10-14 Thread David Brownlee
On Mon, 14 Oct 2019 at 18:07, Bob Bernstein  wrote:
>
> Request for Suggestions:
>
> I am gathering what will ultimately be about 100G of files on my
> amd64 Netbsd (an old eMachine windows box itself) system's
> original HD.
>
> That system as well as my Windows 10 (running off a NUC) are
> cat-5 wired into the LAN upstairs here in the house.
>
> The NUC now has a WD 1TB "Passport" external USB drive attached
> to it.
>
> What tools are suggested for keeping that external drive synched
> with the dir in play on the Netbsd machine?

So, 1TB drive ~permanently attached to Windows10 box, synced with 100G
on a NetBSD box.

If either machine is ~always on, old school options would include
- SMB share to the NetBSD box and run rsync on it
- Periodic rsync to rsyncd
- Periodic cron run of unison (Useful if changes happen both ends)

If both come and go intermittently its becomes more entertaining, or
if you want closer to 'real time' updates'

I've had good experiences running syncthing to sync data between a set
of NetBSD boxes (some directories being master on one machine only and
pushing out, others allowing changes from multiple ends). Its cross
platform. It might be overkill for just two boxes, but it copes with
machines and networks coming and going well, has good include/include
rules and if you find yourself with an offsite box to which you want
to sync part of the data it drops in nicely. On NetBSD last I checked
you needed to disable automatic change watches on at least larger data
sets (I'm running with ~10TB).

David


Re: portable USB disk installation

2019-10-07 Thread David Brownlee
On Mon, 7 Oct 2019 at 05:41, orr721  wrote:
>
> Unfortunately I can confirm the ROOT. alias in fstab does not work in
> 8.1 and there is no mention of it in the getfsspecname man page.
>
> I will try to move to -current.

Would recommend trying the latest netbsd-9 beta from http://nyftp.netbsd.org/

David


Issues with booting from named wedges, raidframe & NetBSD-9 (Regression from NetBSD-8)

2019-10-06 Thread David Brownlee
I have a 'root on RAID1' setup NetBSD-8 box upgraded to NetBSD-9 which
no longer auto boots.

There are six disks in the machine, but the relevant dmesg entries are:

wd0: 5589 GB, 11628021 cyl, 16 head, 63 sec, 512 bytes/sect x
11721045168 sectors
dk0 at wd0: "raid0part0", 134217728 blocks at 2048, type: raidframe
wd2: 1863 GB, 3876021 cyl, 16 head, 63 sec, 512 bytes/sect x 3907029168 sectors
raid0: Components: /dev/wd2a /dev/dk0

So, this is a RAID1 with one partition on a gpt partition and another
on a disklabel (for historical incrementally upgrading reasons). In
both cases the partition is 1M from the start of the disk.

# disklabel wd2| ag ' a:'
 a: 134217728  2048   RAID # (Cyl.  2*- 133154*)

# gpt show -i 1 wd0
Details for index 1:
Start: 2048 (1M)
Size: 134217728 (64G)
Type: raid (49f48daa-b10e-11dc-b99b-0019d1879648)
GUID: 1680cacb-62e6-4f81-a31a-7211bb8e0a08
Label: raid0part0
Attributes: biosboot

Boots a NetBSD-9 kernel fine from NetBSD-8 boot blocks. Upgrading the
bootblocks to NetBSD-9 gives. (Mk.1 eyeball cut)

NetBSD/x86 ffsv2 Primary Bootstrap

NAME=raid0part0 not found

>> NetBSD/x86 BIOS Boot, Revision 5.1.1 (Fri Oct  4 08:09:49 UTC 2019) (from 
>> NetBSD 9.0_BETA)
>> Memory: 635/3406336 k
Press return to boot now, any other key for boot menu
booting NAME=raid0part0:netbsd - starting in 0 seconds.
NAME=raid0part0 not found
open netbsd: Device not configured
boot: NAME=raid0part0:netbsd: Input/output error
booting NAME=raid0part0:netbsd.gz (howto 0x2)
NAME=raid0part0 not found
open netbsd.gz: Device not configured
boot: NAME=raid0part0:netbsd.gz: Input/output error

If I then enter:
> boot hd0:
[booting occurs]

I'm not sure if this is related to the mix of wedge and disklabel
partitions in the raidframe, or something else. A workaround in this
case might be to fallback to traditional hdX: booting if the
bootblocks are unable to locate the named wedge - the "NAME=raid0part0
not found" error

David


Re: Rust with 9 Beta

2019-08-02 Thread David Brownlee
On Thu, 1 Aug 2019 at 18:43, Tobias Nygren  wrote:
>
> On Thu, 01 Aug 2019 17:27:15 +0200 (CEST)
> Havard Eidnes  wrote:
>
> > Now, with that said, the rust bootstrap kits currently don't name the
> > NetBSD OS-version they were built against, and possibly they should.
> > However, I suspect that doing so is not going to be entirely trivial.
> >
> > The route via either a compat80 package or for the time being simply
> > manually extracting the required 8.0 libraries from the old
> > distribution sets is probably easier.
>
> Another way would be to link the bootstrap binaries statically. I'd
> much prefer if we can avoid the overhead of installing compat packages.

On the other hand a netbsd-8 compat package would allow someone to
download current and use release packages, making it substantially
easier for people to play with current (*). The same applies with
testing beta-9.

* it would need to be updated to add more libraries as current develops

David


Re: current transaction too big to flush

2019-06-24 Thread David Brownlee
On Mon, 24 Jun 2019 at 14:38, Dima Veselov  wrote:
>
> this maybe caused by nature of the file. All these files were
> created with torrents, which may made them very
> defragmented.

Might help to set the torrent app to preallocate space? (not a fix,
but possibly a workaround and an interesting data point)

David


Re: current transaction too big to flush

2019-06-24 Thread David Brownlee
On Sun, 23 Jun 2019 at 13:52, Dima Veselov  wrote:
>
> Greetings,
>
> the problem is still there and I even have a single file
> which can not be deleted via standard rm command
> causing kernel panic. What can be done there? Current
> situation make WAPBL filesystem unusable. I also can not
> increase log space.
>
> Is that real that 3Gb file deletion take 64Mb of log space?

Hi - I have a few largish filesystems mounted with log and have
deleted multi GB files without problems. I did make them with 64K
bsize, which may have mitigated matters?

#dumpfs /dev/rdk5|head
file system: /dev/rdk5
format  FFSv2
endian  little-endian
location 65536  (-b 128)
magic   19540119timeMon Jun 24 09:46:53 2019
superblock location 65536   id  [ 5aff4cab 591e6965 ]
cylgrp  dynamic inodes  FFSv2   sblock  FFSv2   fslevel 5
nbfree  6262856 ndir1816222 nifree  175315127   nffree  928895
ncg 1749size732495616   blocks  726786860
bsize   65536   shift   16  mask0x

David


Re: Laptop Recommendations for NetBSD?

2019-06-24 Thread David Brownlee
On Sat, 22 Jun 2019 at 23:33, Chris Humphries  wrote:
>
> Suggestions weren't mind-blowing or anything, but the usual suspects:
> Thinkpads and people saying some random laptop mostly works for them.
>
> Mostly, it seems folks don't really run NetBSD on laptops, and if they
> do they're silent about it.
> I personally suspect most people run NetBSD as on servers,
> virtualization (virtualbox or qemu), or toys like old machines/ports
> and arm boards. I'd guess a very small percentage of NetBSD users use
> it as a daily driver.

I would agree that its likely NetBSD gets much more use on servers &
embedded machines.
I'm another NetBSD ThinkPad user - T530 which is supported quite well.
My main use is IntelliJ IDEA java development.
My main gripe would be Firefox crashing on trying to load some sites
(eg maps.google.com) :/

David


Re: amd64 SBCs on which NetBSD would run ?

2019-05-07 Thread David Brownlee
On Tue, 7 May 2019 at 13:44, Andrew Luke Nesbit
 wrote:
>
> On 07/05/2019 13:23, David Brownlee wrote:
> > On Sat, 4 May 2019 at 18:16, Mike Pumford  
> > wrote:
> >>
> >> On 04/05/2019 15:30, Mayuresh wrote:
> >>> On Sat, May 04, 2019 at 05:49:58PM +0800, Travis Paul wrote:
> >>>> You mentioned that you were looking for an amd64 board.  Have you looked
> >>>> at the PCEngines APU2 boards[1]? I have not personally tried them but
> >>>> perhaps they fit your needs.
>
> I hope you don't mind me jumping in on the conversation at this late
> stage.  I've always had a bit of an allergic reaction to "high end"
> SBC's like the APU2.  I feel they are overpriced, sometimes very much so.
>
> For the same money as the APU2 you can get a real mainboard, one with a
> much more solid construction and better performance.  Similarly with
> many other SBC's in that price level.  If you look hard enough you can
> get an entry-level serverboard with IPMI for not much more money.
>
> I do like SBC's very much.  My favorite SBC is the OPi+2E, and I hope to
> get NetBSD running on it in the near future.  But the advantage of SBC's
> (for me) is when they are very cheap and/or promote creative things.

The APU2 is definitely overpriced for general purpose computing. We
started with the alix2d3 which suited our requirements of: small,
robust, three network ports, easily available and (optional but
desired) POE compatible. The APU2 was an obvious drop in replacement
with better capabilities all round and we could keep using a single
x86 image which would work on all units.

At the time I looked for but couldn't find an arm/mips option - if I
were starting again that could well be different :)

David


Re: amd64 SBCs on which NetBSD would run ?

2019-05-07 Thread David Brownlee
On Sat, 4 May 2019 at 18:16, Mike Pumford  wrote:
>
> On 04/05/2019 15:30, Mayuresh wrote:
> > On Sat, May 04, 2019 at 05:49:58PM +0800, Travis Paul wrote:
> >> You mentioned that you were looking for an amd64 board.  Have you looked
> >> at the PCEngines APU2 boards[1]? I have not personally tried them but
> >> perhaps they fit your needs.
> >
> >
> > Thanks. Looks interesting though I could not find A. international
> > availability / shipping B. Whether NetBSD would run on it.
> >
> NetBSD 8 runs nicely on them and as far as I can tell everything is
> supported. No reason why current wouldn't work either although I've not
> actually booted it.

Last I checked I don't think the front LEDs were supported, and I
can't confirm the onboard mSSD (as I have a few running on SD cards as
drop in replacements for the older PCEngines boards).

:)

David


Re: Video Driver for Intel - resolution stuck at 800x600

2019-02-20 Thread David Brownlee
... and a final update which checks and reports the kernel build
versions, and adds a few command line options, and posted to github in
case anyone finds anything horrifically wrong and wants to push a fix
:)

https://github.com/abs0/update-netbsd-kernel

David

On Wed, 6 Feb 2019 at 22:50, atomicules  wrote:
>
> Nice! Thanks for this.
>
> On 03-Feb-2019 16:45:38, David Brownlee wrote:
> >The script I sent assumes /current already exists and that you're running
> >amd64. I've attached an updated version which should handle that, plus will
> >run as root without sudo (if you do not have sudo setup). It also notes the
> >lines you should add to /boot.cfg
> >
> >I've taken the liberty of cc'ing in the list on this reply (hope you do not
> >mind), because
> >a) If anyone else was reading the original reply they may as well have the
> >slightly improved hacky script


Re: Video Driver for Intel - resolution stuck at 800x600

2019-02-03 Thread David Brownlee
The NetBSD kernel includes ~all the hardware drivers, network stack, drm
(Direct Rendering Manager) display code, virtual memory management and
related facilities. By dropping a current kernel onto a NetBSD-8 install
you can take advantage of any changes in the above, while still keeping all
of the libraries, programs, and installed apps from a standard NetBSD-8
install.

You don't get the advantage of any userland library and program
improvements since NetBSD-8, but its makes a good compromise.

Critically this allows you to switch back and forth between running with a
current kernel and a NetBSD-8 kernel by just rebooting - so if there is a
problem with a current kernel you can easily go back to a stock install.

You just need to add entries to /boot.cfg to allow you to switch.

The script I sent assumes /current already exists and that you're running
amd64. I've attached an updated version which should handle that, plus will
run as root without sudo (if you do not have sudo setup). It also notes the
lines you should add to /boot.cfg

I've taken the liberty of cc'ing in the list on this reply (hope you do not
mind), because
a) If anyone else was reading the original reply they may as well have the
slightly improved hacky script
b) If I'm sending something which will be run directly or indirectly as
root, its always nice to have it available to other eyes to confirm there
is nothing nefarious :)

Thanks

David

On Sun, 3 Feb 2019 at 12:27, Ron Georgia  wrote:

> David,
> Thank you for responding, I hope you do not mind me sending you email
> directly. I have a question; please excuse my ignorance. What does the
> current kernel with NetBSD 8.0 buy me? Does that bring in some of the new
> drivers?
> If I understand correctly, I simply install NetBSD 8.0, then I follow (or
> run) the script you included, is that correct?
>
> On 2/1/19, 8:59 AM, "David Brownlee"  wrote:
>
> On Fri, 1 Feb 2019 at 12:36, Ron Georgia  wrote:
> >
> > " Why not just run NetBSD-current if that works with your card?"
> > A most excellent question, with a relatively embarrassing answer: I
> am not sure how to keep NetBSD-current, current. I am part of the
> NetBSD-current mailing list and read about different issues others are
> experiencing; however, I do not really know how to update the base OS or
> apply a particular (suggested) patch. I did read the " Tracking
> NetBSD-current" page, but it seems confusing to me.
> >
> > Thank you for responding. I'll try current again.
>
> You might want to try just running a current kernel first - I'm
> running stock netbsd-8 userland and packages and just a current kernel
> on my T530...
>
> I setup boot.cfg to default to a new option (boot '/current') then
> have this quickly hacked up script I run every so often to update the
> current kernel
>
> David
>
>
>
>


update-kernel
Description: Binary data


Re: Video Driver for Intel - resolution stuck at 800x600

2019-02-01 Thread David Brownlee
On Fri, 1 Feb 2019 at 12:36, Ron Georgia  wrote:
>
> " Why not just run NetBSD-current if that works with your card?"
> A most excellent question, with a relatively embarrassing answer: I am not 
> sure how to keep NetBSD-current, current. I am part of the NetBSD-current 
> mailing list and read about different issues others are experiencing; 
> however, I do not really know how to update the base OS or apply a particular 
> (suggested) patch. I did read the " Tracking NetBSD-current" page, but it 
> seems confusing to me.
>
> Thank you for responding. I'll try current again.

You might want to try just running a current kernel first - I'm
running stock netbsd-8 userland and packages and just a current kernel
on my T530...

I setup boot.cfg to default to a new option (boot '/current') then
have this quickly hacked up script I run every so often to update the
current kernel

#!/bin/sh -e
TMPDIR=$HOME/.cache/tmp
mkdir -p $TMPDIR
TMPFILE=$TMPDIR/current.$$
ftp -o $TMPFILE
http://nyftp.netbsd.org/pub/NetBSD-daily/HEAD/latest/amd64/binary/kernel/netbsd-GENERIC.gz
if ! gzip -t $TMPFILE ; then
   echo " Downloaded file fails gzip test"
   rm -f $TMPFILE
   exit 1
fi
if cmp -s $TMPFILE /current ; then
echo "Unchanged"
rm -f $TMPFILE
else
sudo chown root:wheel $TMPFILE
sudo mv /current /ocurrent
sudo mv $TMPFILE /current
fi
stat -f "%9Z %Sm %N%SY" /ocurrent /current

David


Re: minidisplay-port on T440s working?

2019-01-25 Thread David Brownlee
On Thu, 24 Jan 2019 at 15:10,  wrote:

> Hi,
>
> while the VGA port on my T440s laptop is working, the
> minidisplay port is not working (at least with an
> amazonbasics Mini DisplayPort to HDMI cable.
>
> With not working I mean: VGA is recognized by xrandr,
> minidisplayport isn't.
>
> Any idea how I can debug this? Has anyone experienced
> the same issue?
>
> This is on NetBSD 8.0 GENERIC / amd64
>

I have a T530 (with the dual Intel/Nvidia video chipset) - I suspect it may
be a slightly different case, but just for reference:

When I boot with Intel enabled only the VGA port works (also tested with a
Thinkpad dock which has multiple DVI and other ports, and only the VGA port
works on that too).

When I boot with Nvidia enabled the DisplayPort works, but the display
shows video corruption and rapidly becomes instable.

Interestingly when I boot Windows with the BIOS locked to Intel only, VGA
is also the only port that works.

David


Re: fpr(1), asa(1)

2019-01-08 Thread David Brownlee
On Sun, 6 Jan 2019 at 11:53, Rhialto  wrote:
>
> I have various files around with carriage control. You get them from 
> emulators/hercules, for instance. So at the very least they should be 
> packaged.

IIRC OpenBSD refactored the code a long time back to make one of them
provide both implementations, so if we do not move them to pkgsrc we
could at least trivially have them both built from the same code :)
(I'd also support moving them to pkgsrc)

David


Re: rcvar for locate.updatedb

2018-11-24 Thread David Brownlee
On Sat, 24 Nov 2018 at 07:28, Jaromír Doleček  wrote:
>
> Le sam. 24 nov. 2018 à 08:16, Robert Elz  a écrit :
> > Aside from the inertia criteria, which is probably really what
> > it is, I'd have thought a better test than "critical" would be
> > "probably useful to the majority of users - particularly the
> > less knowledgable".
>
> I actually think it would make sense to disable locatedb by default as
> a privacy precaution, and system performance tweak.
>
> It's just not useful on most of systems.

I'd very much support that - care to lead the charge into the bikeshed? :-p

David


Re: suspend-to-RAM intel-x86 issues and tests

2018-10-31 Thread David Brownlee
On Mon, 29 Oct 2018 at 23:54, Riccardo Mottola
 wrote:
>
> Those ThinkPads do not have a current setup to buidl on, however I have
> one 64bit which runs NetBSD current on which I could (and did in the
> past) cross-compile kernels for x86, incase somebody suggest a single
> patch to test.
> Otherwise kernels from RelEng should be quite reliable and convenient,
> shoudln't they?

Absolutely, but if you find something that stopped working between
NetBSD versions you can bisect the changes to find out what specific
change caused the issue.

Thanks

David


Re: suspend-to-RAM intel-x86 issues and tests

2018-10-29 Thread David Brownlee
On Tue, 23 Oct 2018 at 22:31, Riccardo Mottola
 wrote:
>
> Hi,
>
> David Brownlee wrote:
>
> >
> >> I don't have a setup to build there, I am trying RelEng kernels.
> >> I could use those to bisect - but I have worse news. Even NetBSD 8
> >> release is actually unreliable. So it did work, but I tried again and
> >> got a black screen... so it is not a repeatable reference.
> >> Darn :) Would have made things easier.
> >
> > If you have any kind of box (even Windows or Mac) that you could use
> > for testing builds it is likely to be very helpful.
>
> Sorry, did not get fully what do you mean. What should I use that Win or
> Mac box for? I am full of "boxen" :) Including several NetBSD ones.

You mentioned that you didn't have a setup to build NetBSD - I was
just trying to note
that NetBSD can be cross built from other boxes, so if you have a
bigger machines with
sufficient disk and cpu which doesn't happen to run NetBSD it can make
a convenient
build box.

> > As a random test idea on the Thinkpad - maybe go into the BIOS and try
> > disabling as much hardware there as possible to see if that helps the
> > suspend/resume. It probably wont affect anything, but should be easy
> > to test and if it does then it gives some useful information.
>
> I took the T30, the P4 with ATI Radeon, which looked promising since it
> at least spits out some kernel messages before dieing!
>
> I went into the BIOS and disabled: Strange "wake on lan or flash on LAN
> options", Serial Port, Parallel Port, Infrared Port, USB port, legacy
> floppy drives (not present anyway), even the TrackPoint. I don't have
> the Security chip, so it is disabled by default.
> I even disabled Intel Speed Step (I hope it does no harm)
>
> So pretty much anything I could find!
>
> Then I booted a couple of days old generic kernel.
> There I disabled more stuff:
> - isa
> - fxp
> - radeon
> - audio
>
>
> should be quite barebones!!! Below a dmesg of such "bare" configuration.
>
> Yet... it crashes on sleep with the already stated error
>
> trap_tss() at netbsd:trap_tss
> --- trap via task gate ---
> netbsd:cpu_info_primary:
> cpu0 End traceback...

Ah - it was a "probably wont affect anything, but easy to test and
could have given useful information" :/

Thanks

David


Re: suspend-to-RAM intel-x86 issues and tests

2018-10-19 Thread David Brownlee
On Fri, 19 Oct 2018 at 02:46, Riccardo Mottola
 wrote:

> I don't have a setup to build there, I am trying RelEng kernels.
> I could use those to bisect - but I have worse news. Even NetBSD 8
> release is actually unreliable. So it did work, but I tried again and
> got a black screen... so it is not a repeatable reference.
> Darn :) Would have made things easier.

If you have any kind of box (even Windows or Mac) that you could use
for testing builds it is likely to be very helpful.

> As you say - it might make sense to work on the ThinkPad which spits out
> at least a trace, the invalid TSS.
>
> Any further ideas?
>
> If somebody has a specific clue for a driver to disable on any of these
> three test systems, just tell me!

As a random test idea on the Thinkpad - maybe go into the BIOS and try
disabling as much hardware there as possible to see if that helps the
suspend/resume. It probably wont affect anything, but should be easy
to test and if it does then it gives some useful information.

David


Re: suspend-to-RAM intel-x86 issues and tests

2018-09-28 Thread David Brownlee
On Thu, 27 Sep 2018 at 22:20, Riccardo Mottola
 wrote:
>
> Hi David,
>
> David Brownlee wrote:
> >> So I conclude that having the system mounted on USB causes issues (which
> >> manifests themselves slightly different on different computers) and
> >> while it probably should work, it is not a test and adds more issues.
> > Would it be make sense to try booting a CD install image on some of
> > the machines (to avoid the USB) issue?
>
> for those machines which have an optical drive, I can do so! To help
> NetBSD improve, this and more.
>
> Would using the install CD enough to test an ACPI suspend? is it enabled
> at all?
> Install CDs though do not usually enable DRM console, which is often a
> problematic component in sleep.

Actually testing with/without drm would probably also be helpful - if
a machine can reliably suspend/resume without DRM or active USB then
it means that people can focus just on the DRM side.

> In any case, three ThinkPads have netbsd8 release on it, so testing is
> easier and they exhibit issues: T30, R51 and T43 (the latter with a
> regression compared to release). SO perhaps it is best fixing those
> first, before attempting more delicate work on others.

Again, it might be interesting to see if the regression is in
suspend/resume with DRM or more general :)

Thanks

David


Re: suspend-to-RAM intel-x86 issues and tests

2018-09-27 Thread David Brownlee
On Wed, 26 Sep 2018 at 22:34, Riccardo Mottola
 wrote:
>
> Hi All
>
> I did a Big ACPI/SLEEP compariso (or at least, tried to):
>
[...]
>
> So I conclude that having the system mounted on USB causes issues (which
> manifests themselves slightly different on different computers) and
> while it probably should work, it is not a test and adds more issues.

Would it be make sense to try booting a CD install image on some of
the machines (to avoid the USB) issue?

David


Re: Sizing hardware drive capabilities (in the absence of probed devices)

2018-09-25 Thread David Brownlee
On Tue, 25 Sep 2018 at 06:51, Don NetBSD  wrote:
>
> On 9/24/2018 4:14 AM, David Brownlee wrote:
> > On Mon, 24 Sep 2018 at 11:08, Don NetBSD  wrote:
> >
> > I have no idea whether this would actually map to your real
> > requirements, but a possible workflow could be:
> >
> > Bringing up new appliance ("slot mapping")
> > - Assuming you have "ID" devices digitally and physically labelled 1..n.
> > - User is directed to insert as many ID devices as they have slots
> > switch on machine
> > - Appliance boots, detects it has devices attached, checks to see they
> > are ID devices, updates slots and records its slot mappings
>
> I would just use N different (make/model) drives for that purpose and
> examine dmesg on boot:  "OK, the 500G Seacrate is located in the
> top left slot and that appears to have been probed as sd0.  The 320G WD
> is in the slot to its right and that seems to have been probed as sd4.
> etc."  As this is only done once, I can just grab any old drives and
> stuff them into the machine, knowing their contents won't be altered
> (unless I screw up).  Then, put them back  once I've got
> the slots marked.

Mmm finding and maintaining N different models of drives might be a
pain. If you have how swap bays you could always script up something
like
"put disk in slot 1 and hit return or Q to quit"
"..."
"OK identified, move disk from slot 1 to slot 2 and hit return or Q to quit"

Also provides an inline test of the hot swap facility :)

> I am expecting this to bear some logical relationship to how the
> manufacturer designed the "drive cage" (the one server that I've
> examined so far has them laid out in the order a casual observer
> would expect -- no surprises, there).
>
> I don't expect (nor want!) "them" to be able to bring up new boxes
> unsupervised.  There are too many little details that could have
> consequences.  E.g., any performance metrics reported for a drive
> in appliance A might differ from (that same drive!) in appliance B.

Reasonable, but its always nice to design what would be the full
robust system, and then decide what corners to cut :-p, plus from past
experience you invariably end up at some point needing to build a box
at the same time as your attention is split fielding something else
urgent.

> > Normal use
> > - When a new sdX or wdX device is detected system determines its slot
> > mapping and uses it when talking to user
> > - If it can't determine slot mapping, it suggests a new slot mapping
> > pass (something strange has happened)
> >
> > Optional extra credit ("Where is what slot")
> > - User is instructed to apply sticky number labels next to ID devices
> > when bring up appliance
>
> *I* would be that "user".  I imagine eventually having a "live (remote)
> display" that  reports/summarizes the activities and status of each
> drive slot.  Presently, that takes the form of a text display that
> summarizes a single appliance on a single screen (curses).  That
> could evolve into something graphical.

Usually a big fan of html in this case - can start by spitting out a
static html page with a table and 30 second meta refresh, and extend
to some simple javascript which refreshes within page...

> > Optional extra credit ("Where is what slot and sticky labels fall off")
> > - User directed to take photo of appliance with ID devices to record
> > where the slots were & upload to web server on applicance
> > - If user is confused on slot mapping web server on appliance can show
> > mapping picture
> >
> > Optional extra credit ("Users mess with hardware/swap disks to other 
> > machines")
> > - At boot time system takes a copy of dmesg and notes the available
> > atabus/scsibus and device names
> > - If this ever changes it forces a new slot mapping pass
>
>   I do product design/development for a living, not "test fixture
> design".

We all have to start somewhere :-p

> So, I'm not too keen on embelishing this more than necessary
> (and delaying the NEXT product's delivery!)

It sounds like you have all the right ideas - we're fascinated to hear
how it goes! :)

David


  1   2   >