Re: OAUTH TOTP
Thank you for all your suggestions - I managed to log in! Cheers, Patrick
OAUTH TOTP
Apparently I need to "purchase an inexpensive OATH TOTP compatible token device." $ wtf oath wtf: I don't know what `oath' means! $ wtf totp TOTP: time-based one time password Any suggestions on something that works on NetBSD/amd64? Cheers, Patrick
Re: hostapd
On Wed, Apr 03, 2024 at 08:53:47AM -, Michael van Elst wrote: > pr...@welche.eu (Patrick Welche) writes: > > >The system httpd via inetd doesn't receive a web page request from the > >device. > >tcpdump shows the device requesting it, but no response. > > If httpd wouldn't run, the request would be answered with > a TCP RST. > > If httpd does run, the request (SYN) is answered with a > TCP SYN/ACK. > > Can you say what exactly is "no response" here? I really mean nothing at all! # tcpdump -nvi urtwn0 port 80 tcpdump: listening on urtwn0, link-type EN10MB (Ethernet), snapshot length 262144 bytes 10:15:20.886823 IP (tos 0x0, ttl 64, id 41996, offset 0, flags [DF], proto TCP (6), length 60) 192.168.100.3.60609 > 192.168.100.62.80: Flags [S], cksum 0x8457 (correct), seq 1628667887, win 65535, options [mss 1460,sackOK,TS val 2022371 ecr 0,nop,wscale 6], length 0 10:15:21.144835 IP (tos 0x0, ttl 64, id 12911, offset 0, flags [DF], proto TCP (6), length 60) 192.168.100.3.60610 > 192.168.100.62.80: Flags [S], cksum 0x78a3 (correct), seq 50981267, win 65535, options [mss 1460,sackOK,TS val 2022396 ecr 0,nop,wscale 6], length 0 10:15:21.887188 IP (tos 0x0, ttl 64, id 41997, offset 0, flags [DF], proto TCP (6), length 60) 192.168.100.3.60609 > 192.168.100.62.80: Flags [S], cksum 0x83f3 (correct), seq 1628667887, win 65535, options [mss 1460,sackOK,TS val 2022471 ecr 0,nop,wscale 6], length 0 10:15:22.135344 IP (tos 0x0, ttl 64, id 12912, offset 0, flags [DF], proto TCP (6), length 60) 192.168.100.3.60610 > 192.168.100.62.80: Flags [S], cksum 0x783f (correct), seq 50981267, win 65535, options [mss 1460,sackOK,TS val 2022496 ecr 0,nop,wscale 6], length 0 ... > >on the server, telnet localhost 80, GET /, works > > Did you configure (in /etc/inetd.conf) http for tcp or tcp6 ? > A 'telnet localhost 80' would see either, but a pure IPv4 client > only sees the 'tcp' one. For tcp: httpstream tcp nowait:600 _httpd /usr/libexec/httpd httpd -dnX /var/www I tried nginx with the same result. I assume hostapd: urtwn0: interface state UNINITIALIZED->ENABLED hostapd: urtwn0: AP-ENABLED rules out a monitor mode? or ? The dhcpd response was fine... Cheers, Patrick
hostapd
Just tried hostapd for the first time yesterday, with urtwn0. I can see a device successfully authenticate via hostapd. The device successfully obtains a dhcp lease, so the connection must be working. The system httpd via inetd doesn't receive a web page request from the device. tcpdump shows the device requesting it, but no response. hostapd, dhcpd and inetd are all running on the same "server". on the server, telnet localhost 80, GET /, works, so inetd is OK routing looks OK arp sees the device npf etc is not running host.deny etc is empty / same when not using libwrap for httpd set ip.forwarding=1 just in case Any suggestions on what I am missing? Cheers, Patrick
Re: X on 10.0 RC1 is unusable on my laptop
On Thu, Nov 23, 2023 at 08:44:10PM +, Mike Pumford wrote: > Absolutely. If I could get rid of the artifacts it would be perfect. They > self clear after about a second but they are occasionally irritating and > anything we can do to improve things is a good idea. I notice that my artifacts (8th gen) disappear really quickly / hardly exist if the system is under load. Otherwise, they also self clear after about a second. Someone (tnn? rvp?) mentioned the possibility of cache lines not being flushed in this context. Cheers, Patrick
Re: X on 10.0 RC1 is unusable on my laptop
On Mon, Nov 13, 2023 at 09:53:09PM +0100, Rhialto wrote: > My old laptop (Compaq Pressario CQ71)), which always had a working X, > doesn't like the X in 10.0 RC1 at all. > Nov 13 21:39:39 vargaz /netbsd: [ 1.0049443] i915drmkms0 at pci0 dev 2 > function 0: Intel 82GM45 Integrated Graphics Device (rev. 0x07) You could try adding something like Section "Device" Identifier "Card0" BusID "PCI:0:2:0" Driver "intel" Option "NoAccel" EndSection to /etc/X11/xorg.conf If that helps, then try swapping the NoAccel line with Option "AccelMethod" "UXA" (I think the default was changed from UXA to SNA in 2013...) Cheers, Patrick
Re: state of EFI support live/install images
On Mon, Sep 06, 2021 at 08:22:46PM -0400, Greg Troxel wrote: > I am doing everything with current/amd64. and in my case on a Dell inspiron > questions: > > 1) I'll try configuring legacy boot, but I am wondering if there is a > way to build a live image. I haven't tried the live image, but just writing boot.iso to a USB key and booting with that worked. (NetBSD bonus vs Ubuntu, was that Ubuntu would only install EFI if the key was booted EFI. If the key was booted "BIOS" then it wouldn't install EFI. NetBSD doesn't care :-) ) > 2) It seems obvious that one has to disable secure boot in the bios to > boot netbsd. Correct? Anyhing else I should know? That was it - disable secure boot. > 3) any other hints? Pleasantly surprised how easy it was to add a boot menu entry in the Dell BIOS to say boot _that_ efi file for this entry. (so I happen to have EFI/Boot/nbsd_bootx64.efi, and left otherOS as bootx64.efi) Cheers, Patrick
disk scrubbing
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 ? Cheers, Patrick
Re: OpenGL - browser and WebGL support - failed libGL.so
On Mon, Aug 23, 2021 at 01:29:43PM -0400, Greg Troxel wrote: > > neit...@hackett.marshlabs.gaertner.de (Martin Neitzel) writes: > > >> > GLXtest process failed (exited with status 1): Unable to load > >> > libGL.so.1 > >> > >> This reminds me of e.g., libepoxy hardcoding "libGL.so.1", when > >> > >> $ ls /usr/X11R7/lib/libGL.* > >> /usr/X11R7/lib/libGL.a /usr/X11R7/lib/libGL.so.3 > >> /usr/X11R7/lib/libGL.so /usr/X11R7/lib/libGL.so.3.0 > >> > >> (Why hardcode the major number?) > > > > The convention is that the major number reflects the shared lib's API, > > while minor numbers are used for bug fixes and internal improvements. > > > > *IF* the GL folks have taken care to keep their API downwards-compatible, > > you can safely > > That's close but not quite. > > First, this is about ABI not API. > > In theory, the major number is incremented when there is an ABI break, > meaning that something built for the older version will fail in the new > version. So a change in intended semantics, in layout of structures > passed as args or returned, or a function being withdrawn are all ABI > breaks. > > Adding a new function is fine, and bugfixes, and all of these can just > increment the minor. I think in this case for "GL folks" read "xsrc" folks if I'm not mistaken. It's been a while, but I think that number "3" might not be what you think... Cheers, Patrick
Re: OpenGL - browser and WebGL support - failed libGL.so
On Mon, Aug 23, 2021 at 02:46:39PM +0200, Riccardo Mottola wrote: > GLXtest process failed (exited with status 1): Unable to load libGL.so.1 This reminds me of e.g., libepoxy hardcoding "libGL.so.1", when $ ls /usr/X11R7/lib/libGL.* /usr/X11R7/lib/libGL.a /usr/X11R7/lib/libGL.so.3 /usr/X11R7/lib/libGL.so /usr/X11R7/lib/libGL.so.3.0 (Why hardcode the major number?) Cheers, Patrick
Re: Printing and CUPS
On Thu, Oct 15, 2020 at 03:12:23PM +1100, Glenn Mawby wrote: > E [14/Oct/2020:20:06:47 +1100] [CGI] Unable to execute ippfind utility: No > such file or directory It seems print/cups-base only provides ippfind if the avahi option is set. This option is not set by default. cc pkgsrc-users for opinions on changing this default, as cups is going "driverless", i.e., no PPDs, and ippfind is part of the way of discovering what a suitable PPD equivalent might be. Cheers, Patrick
bridge0
I thought that setting up a bridge was as trivial as the following, but apparently not as the ping fails. bridge0 doesn't even learn box2's ethernet address. What am I missing? Cheers, Patrick # ++ # || # box1 192.168.0.1 --- wire1 ---+ bridge:if1 | # || # box2 192.168.0.2 --- wire2 ---+ bridge:if2 | # || # ++ bridge=unix:///tmp/sockbr box1=unix:///tmp/sockbx1 box2=unix:///tmp/sockbx2 wire1=/tmp/netbus1 wire2=/tmp/netbus2 rumpserve="rump_server -lrumpnet -lrumpnet_net -lrumpnet_netinet -lrumpnet_shmif -lrumpnet_bridge" ${rumpserve} ${bridge} export RUMP_SERVER=${bridge} rump.ifconfig shmif1 create rump.ifconfig shmif1 linkstr ${wire1} rump.ifconfig shmif2 create rump.ifconfig shmif2 linkstr ${wire2} rump.ifconfig bridge0 create rump.ifconfig -a export RUMPHIJACK=socket=all,sysctl=yes export RUMPHIJACK_RETRYCONNECT=inftime export LD_PRELOAD=/usr/lib/librumphijack.so brconfig bridge0 add shmif1 add shmif2 brconfig bridge0 up brconfig -a unset LD_PRELOAD ${rumpserve} ${box1} export RUMP_SERVER=${box1} rump.ifconfig shmif0 create rump.ifconfig shmif0 linkstr ${wire1} rump.ifconfig shmif0 inet 192.168.0.1 netmask 0xff00 rump.ifconfig -w 0 rump.ifconfig -a ${rumpserve} ${box2} export RUMP_SERVER=${box2} rump.ifconfig shmif0 create rump.ifconfig shmif0 linkstr ${wire2} rump.ifconfig shmif0 inet 192.168.0.2 netmask 0xff00 rump.ifconfig -w 0 rump.ifconfig -a rump.ping -nc 5 192.168.0.1 export RUMP_SERVER=${bridge} export LD_PRELOAD=/usr/lib/librumphijack.so brconfig -a unset LD_PRELOAD for box in ${bridge} ${box1} ${box2}; do export RUMP_SERVER=${box} rump.halt done
Re: tsleep / EAGAIN
On Sat, Jun 20, 2020 at 02:55:05AM +0700, Robert Elz wrote: > Date:Fri, 19 Jun 2020 18:00:11 +0100 > From: Patrick Welche > Message-ID: <20200619170011.GA21933@quantz> > > | ltsleep(9) doesn't mention it as return value. > > It does mention EWOULDBLOCK, and EWOULDBLOCK is just EAGAIN with > a different name. So it really is a timeout, so somehow iwm_softintr doesn't happen.. Thank you! Patrick
tsleep / EAGAIN
Where would you look for an EAGAIN returned by tsleep? (e.g. https://nxr.netbsd.org/xref/src/sys/dev/pci/if_iwm.c#3363 ) ltsleep(9) doesn't mention it as return value. Cheers, Patrick
debug kernel in qemu
I have an apparently working -current/amd64 in qemu started with qemu-system-x86_64 \ -m 512 \ -drive file=wd.img,if=virtio,format=raw,media=disk,snapshot=on \ -object rng-random,filename=/dev/random,id=rng0 \ -device virtio-rng-pci,rng=rng0 \ -accel nvmm \ -soundhw hda \ -no-reboot \ -nographic -curses \ -serial mon:stdio I was under the impression that debugging the kernel might be as simple as adding -s -S and setting breakpoints, but apparently not: (gdb) target remote localhost:1234 Remote debugging using localhost:1234 0xfff0 in ?? () (gdb) break radix_tree_init Breakpoint 1 at 0x80e0a104: file ../../../../../../lib/libkern/../../... (gdb) c Continuing. and off it goes never hitting the breakpoint. What else needs to be done? Cheers, Patrick
Re: find dir inode?
On Tue, Jun 09, 2020 at 01:05:40PM -, Michael van Elst wrote: > pr...@cam.ac.uk (Patrick Welche) writes: > > >which shows dump | restore created a bad filesystem. > > restore doesn't create a filesystem. It just writes to an existing filesystem. > If the result is bad, the destination filesystem must have a problem. I phrased it badly. The filesystem of the destination of the restore had just been created with newfs -O2. P
Re: find dir inode?
On Thu, May 28, 2020 at 10:37:23AM -0400, MLH wrote: > Getting a panic every night with NetBSD 9.99.64 due to a directory issue: So it isn't just me then: http://mail-index.netbsd.org/current-users/2020/06/07/msg038814.html which shows dump | restore created a bad filesystem. An update on that thread is that I ran fsck -f on the original dumped partition, and it is OK. About to redo the dump | restore. Cheers, Patrick
Re: zfs wedges
On Tue, Jun 02, 2020 at 06:01:25PM +0100, Mike Pumford wrote: > > > On 02/06/2020 17:36, Michael van Elst wrote: > > > Another method is to export and import the zpool. Importing scans disks > > for ZFS labels and doesn't need the cached device paths. That's similar > > to how LVM works. > > > Oddly enought I was curious and went googling and found: > > https://forums.freebsd.org/threads/zfs-confused-by-renamed-devices.51234/ > > That seems to suggest exporting and re-importing as well. :) Thank you Michael & Mike! # zpool export ssdpool # zpool import ssdpool cannot import 'ssdpool': pool may be in use from other system use '-f' to import anyway # zpool import -f ssdpool # zpool status ssdpool pool: ssdpool state: ONLINE scan: none requested config: NAMESTATE READ WRITE CKSUM ssdpool ONLINE 0 0 0 dk19 ONLINE 0 0 0 errors: No known data errors Cheers, Patrick
zfs wedges
How does one tell a zpool that the wedge it was on has been renumbered? e.g., I just replaced a disklabel with a gpt, which created some wedges. I created a zpool on one of the wedges. I rebooted, so the wedges renumbered (which is normal), but then: # zpool status ssdpool pool: ssdpool state: UNAVAIL status: One or more devices could not be opened. There are insufficient replicas for the pool to continue functioning. action: Attach the missing device and online it using 'zpool online'. see: http://illumos.org/msg/ZFS-8000-3C scan: none requested config: NAME STATE READ WRITE CKSUM ssdpoolUNAVAIL 0 0 0 5276238111042164986 UNAVAIL 0 0 0 was /dev/dk26 which is true, it is just that /dev/dk26 is now called /dev/dk19. Any ideas? Cheers, Patrick
Re: gpt uuid
On Tue, Feb 25, 2020 at 04:12:24PM -, Christos Zoulas wrote: > In article <20200224105737.GB2843@quartz>, > Patrick Welche wrote: > >I erroneously ran gpt uuid -a. I know what the old uuids were from > >/var/log/messages. From the man page, it doesn't look as though > >gpt uuid can take a uuid as an argument. Any idea how I can set > >the uuids back? (What is the "header UUID" mentioned in the manpage?) > > > >[The symptom is that the dual boot windows now doesn't boot.] > > Can you use gpt backup, edit the plist and then restore? Sounds promising - thanks! (In the meantime I convinced bcdboot to fix the symptom.) Cheers, Patrick
gpt uuid
I erroneously ran gpt uuid -a. I know what the old uuids were from /var/log/messages. From the man page, it doesn't look as though gpt uuid can take a uuid as an argument. Any idea how I can set the uuids back? (What is the "header UUID" mentioned in the manpage?) [The symptom is that the dual boot windows now doesn't boot.] Cheers, Patrick
Re: repo missing package
On Wed, Jan 08, 2020 at 06:38:16PM -0500, Greg Troxel wrote: > I was able to build rust and firefox on 2019Q4. Did it just work, or did you keep having to restart it? (PR pkg/54795) (and gpgme always hangs for me in pbulk, but always works with cd gpgme && make) Cheers, Patrick
Re: netbsd-9 build failed
On Wed, Sep 18, 2019 at 11:59:18AM +0700, Gua Chung Lim wrote: > Oops, sorry I should have replied to the list. > > * Patrick Welche wrote: > > What does > > > > grep libisccc /usr/src/distrib/sets/lists/base/shl.mi > > give you? > % grep libisccc /usr/src/distrib/sets/lists/base/shl.mi > ./usr/lib/libisccc.so base-bind-shlib > compatfile > ./usr/lib/libisccc.so.13 base-bind-shlib > compatfile > ./usr/lib/libisccc.so.13.0base-bind-shlib > compatfile Right, so as others have said by now, just delete the files listed in your original message from your DESTDIR, as they are just old. BTW adding -r to your build.sh invocation empties DESTDIR. (Make sure it isn't / ;-) ) Cheers, Patrick
Re: netbsd-9 build failed
On Tue, Sep 17, 2019 at 10:38:20PM +0700, Gua Chung Lim wrote: > === > checkflist ===> distrib/sets > cd /usr/src/distrib/sets && DESTDIR=/usr/src/../obj/destdir.amd64 > MACHINE=amd64 MACHINE_ARCH=x86_64 AWK=/usr/src/../tools/bin/nbawk > CKSUM=/usr/src/../tools/bin/nbcksum DB=/usr/src/../tools/bin/nbdb > EGREP=/usr/src/../tools/bin/nbgrep\ -E HOST_SH=/bin/sh > MAKE=/usr/src/../tools/bin/nbmake MKTEMP=/usr/src/../tools/bin/nbmktemp > MTREE=/usr/src/../tools/bin/nbmtree PAX=/usr/src/../tools/bin/nbpax > COMPRESS_PROGRAM=/usr/src/../tools/bin/nbxz GZIP=-n XZ_OPT=-9 > TAR_SUFF=tar.xz PKG_CREATE=/usr/src/../tools/bin/nbpkg_create > SED=/usr/src/../tools/bin/nbsed TSORT=/usr/src/../tools/bin/nbtsort\ -q > /bin/sh /usr/src/distrib/sets/checkflist -L base -M > /usr/src/../obj/destdir.amd64/METALOG.sanitised > > === 28 extra files in DESTDIR = > Files in DESTDIR but missing from flist. > File is obsolete or flist is out of date ? > -- > ./usr/lib/i386/libbind9.so.12 > ./usr/lib/i386/libbind9.so.12.0 > ./usr/lib/i386/libdns.so.12 > ./usr/lib/i386/libdns.so.12.0 > ./usr/lib/i386/libirs.so.12 > ./usr/lib/i386/libirs.so.12.0 > ./usr/lib/i386/libisc.so.12 > ./usr/lib/i386/libisc.so.12.0 > ./usr/lib/i386/libisccc.so.12 > ./usr/lib/i386/libisccc.so.12.0 > ./usr/lib/i386/libisccfg.so.12 > ./usr/lib/i386/libisccfg.so.12.0 > ./usr/lib/i386/libns.so.12 > ./usr/lib/i386/libns.so.12.0 > ./usr/lib/libbind9.so.12 > ./usr/lib/libbind9.so.12.0 > ./usr/lib/libdns.so.12 > ./usr/lib/libdns.so.12.0 > ./usr/lib/libirs.so.12 > ./usr/lib/libirs.so.12.0 > ./usr/lib/libisc.so.12 > ./usr/lib/libisc.so.12.0 > ./usr/lib/libisccc.so.12 > ./usr/lib/libisccc.so.12.0 > ./usr/lib/libisccfg.so.12 > ./usr/lib/libisccfg.so.12.0 > ./usr/lib/libns.so.12 > ./usr/lib/libns.so.12.0 > = end of 28 extra files === What does grep libisccc /usr/src/distrib/sets/lists/base/shl.mi give you? And if you just want to get passed this point and are not too worried about running BIND, set SLOPPY_FLIST=yes in /etc/mk.conf. Cheers, Patrick
Re: failed to initialize ZFS library
On Thu, Sep 12, 2019 at 10:46:46AM +0100, Patrick Welche wrote: > On Thu, Sep 12, 2019 at 10:13:45AM +0100, Patrick Welche wrote: > > Playing around with ZFS, after the zfs diff snapshot hang, I keep getting > > > > # zfs list > > internal error: failed to initialize ZFS library > > > > kobj_load, 428: [%M/zfs/zfs.kmod]: linker error: out of memory > > WARNING: module error: vfs load failed for `zfs', error 12 > > > > ENOMEM? I tried moving /etc/zfs/zpool.cache away in case corruption there > > could cause it, but no change... > > > > # modload zfs > > modload: zfs: Cannot allocate memory > > > > total memory = 16291 MB > > avail memory = 15725 MB > > module_newmodule() mod = kmem_zalloc(sizeof(*mod), KM_SLEEP); > but struct module doesn't look "big" > > (modload wsbell succeeded) Removed DEBUG, LOCKDEBUG and KUBSAN, and now it works again. (Had rebooted with the old case, so can't be the reboot that did it) P
Re: failed to initialize ZFS library
On Thu, Sep 12, 2019 at 10:13:45AM +0100, Patrick Welche wrote: > Playing around with ZFS, after the zfs diff snapshot hang, I keep getting > > # zfs list > internal error: failed to initialize ZFS library > > kobj_load, 428: [%M/zfs/zfs.kmod]: linker error: out of memory > WARNING: module error: vfs load failed for `zfs', error 12 > > ENOMEM? I tried moving /etc/zfs/zpool.cache away in case corruption there > could cause it, but no change... > > # modload zfs > modload: zfs: Cannot allocate memory > > total memory = 16291 MB > avail memory = 15725 MB module_newmodule() mod = kmem_zalloc(sizeof(*mod), KM_SLEEP); but struct module doesn't look "big" (modload wsbell succeeded) Cheers, Patrick
failed to initialize ZFS library
Playing around with ZFS, after the zfs diff snapshot hang, I keep getting # zfs list internal error: failed to initialize ZFS library kobj_load, 428: [%M/zfs/zfs.kmod]: linker error: out of memory WARNING: module error: vfs load failed for `zfs', error 12 ENOMEM? I tried moving /etc/zfs/zpool.cache away in case corruption there could cause it, but no change... # modload zfs modload: zfs: Cannot allocate memory total memory = 16291 MB avail memory = 15725 MB Any ideas what to look for? Cheers, Patrick
Re: efi msdos puzzle
On Mon, Sep 09, 2019 at 05:53:03PM +0100, Patrick Welche wrote: > On Mon, Sep 09, 2019 at 11:23:49AM -0500, Jonathan A. Kollasch wrote: > > On Mon, Sep 09, 2019 at 04:58:01PM +0100, Patrick Welche wrote: > > > gpt add -a 1024k -l efi0 -s 256M -t efi wd0 (on -current/amd64) > > > > > > dk0: efi0, 524288 blocks at 2048, type: msdos > > > > > > # newfs_msdos -F 32 -b 4096 /dev/rdk0 > > > newfs_msdos: 65404 clusters too few clusters for FAT32, need 65525 > > > > > > but 65525 * 8 = 524200 < 524288 ? > > > > > > Where does 65404 come from? > > > > > > > The FATs and various other FS internal data structures take space, > > apparently to the tune of 132 clusters, or 1056 sectors, or 540672 bytes. > > > > A 32-bit FAT for up to 65408 clusters is 511 sectors, FAT32 keeps a > > duplicate copy of the fat, so you're up to 1022 sectors used already. > > > > There's also the boot sector and it's backup, the file system > > information block(s?), any reserved sectors, and I forget how > > it worked on FAT32 (it's different than FAT16/12) but maybe also the > > root directory entries. > > > > The bit-width of the FAT is a function of the number of data clusters, > > you'll just end up getting failures like this if you specify any more > > than two of the partition/FS size, the cluster size, and the FAT width. > > > > Microsoft was helpful enough to publish the FAT spec specifically for > > use in the EFI context. > > Thanks - I'll experiment to find the magic number! gpt add -a 4k -l efi0 -s 525256 -t efi wd0 seems to be the minimum... Cheers, Patrick
Re: efi msdos puzzle
On Mon, Sep 09, 2019 at 11:23:49AM -0500, Jonathan A. Kollasch wrote: > On Mon, Sep 09, 2019 at 04:58:01PM +0100, Patrick Welche wrote: > > gpt add -a 1024k -l efi0 -s 256M -t efi wd0 (on -current/amd64) > > > > dk0: efi0, 524288 blocks at 2048, type: msdos > > > > # newfs_msdos -F 32 -b 4096 /dev/rdk0 > > newfs_msdos: 65404 clusters too few clusters for FAT32, need 65525 > > > > but 65525 * 8 = 524200 < 524288 ? > > > > Where does 65404 come from? > > > > The FATs and various other FS internal data structures take space, > apparently to the tune of 132 clusters, or 1056 sectors, or 540672 bytes. > > A 32-bit FAT for up to 65408 clusters is 511 sectors, FAT32 keeps a > duplicate copy of the fat, so you're up to 1022 sectors used already. > > There's also the boot sector and it's backup, the file system > information block(s?), any reserved sectors, and I forget how > it worked on FAT32 (it's different than FAT16/12) but maybe also the > root directory entries. > > The bit-width of the FAT is a function of the number of data clusters, > you'll just end up getting failures like this if you specify any more > than two of the partition/FS size, the cluster size, and the FAT width. > > Microsoft was helpful enough to publish the FAT spec specifically for > use in the EFI context. Thanks - I'll experiment to find the magic number! (https://en.wikipedia.org/wiki/File_Allocation_Table#FAT32 suggests: Min. volume size 256 MiB-36 KiB (with 65525 clusters and 4 KiB sectors) maybe that should be a '+' sign...) Cheers, Patrick
efi msdos puzzle
gpt add -a 1024k -l efi0 -s 256M -t efi wd0 (on -current/amd64) dk0: efi0, 524288 blocks at 2048, type: msdos # newfs_msdos -F 32 -b 4096 /dev/rdk0 newfs_msdos: 65404 clusters too few clusters for FAT32, need 65525 but 65525 * 8 = 524200 < 524288 ? Where does 65404 come from? Cheers, Patrick
machine_arch
Is there something in a similar vein to OBJMACHINE=yes for MACHINE_ARCH? Cheers, Patrick
ntp
I just soldered a replacement SD card reader on my raspberry pi 1 B, and noticed ntpq> peers remote refid st t when poll reach delay offset jitter == srv146.personal 82.76.255.6 4 u 54 641 51.017 5085705 0.004 ntp.uk.eria.one 85.199.214.102 2 u 53 6419.073 5085704 0.004 2a03:b0c0:1:e0: .INIT. 16 u- 6400.0000.000 0.000 luna.dh.bytemar 185.203.69.150 2 u 40 641 10.014 5085704 0.004 ntpq> peers remote refid st t when poll reach delay offset jitter == +srv146.personal 82.76.255.6 4 u 24 64 37 48.636 14.126 6.248 +ntp.uk.eria.one 85.199.214.102 2 u 24 64 379.010 -0.058 5.994 2a03:b0c0:1:e0: .STEP. 16 u- 6400.0000.000 0.000 *luna.dh.bytemar 185.203.69.150 2 u 32 64 37 10.1150.168 5.910 which makes perfect sense, as the pi has no battery to keep a clock going. My question is why this doesn't happen on amd64? On amd64, if the clock goes out of sync by that much, e.g., after booting into windows without having set the "clock is in UTC" registry key, ntpd quits, and one has to run ntpdate first so that ntpd keeps going. Both /etc/ntp.conf files are the default identical ones. Cheers, Patrick
Re: sudden appearance of timekeeping problems with netbsd-8 just after 8.1
On Tue, Jun 18, 2019 at 04:56:33PM -, Michael van Elst wrote: > g...@lexort.com (Greg Troxel) writes: > > > -timecounter: Timecounter "ACPI-Safe" frequency 3579545 Hz quality 900 > > +timecounter: Timecounter "ACPI-Fast" frequency 3579545 Hz quality 1000 > > > -timecounter: Timecounter "TSC" frequency 2800071320 Hz quality 3000 > > +timecounter: Timecounter "TSC" frequency 3920113160 Hz quality 3000 > > That looks like a non-invariant TSC that changes with the "turbo" mode > of the CPU. The interesting part is the 3.9GHz number, according to Intel > your CPU can only go up to 3.06GHz. > > > >I then set: > > kern.timecounter.hardware = hpet0 > >and things seem ok, at least after 10 minutes. > > That's what to do, you can also use the ACPI timer. I just hit the same very incorrect time on my everyday laptop which had no issues (other than SNA artifacts ;-) ) Something must have changed... P
Re: Splash progress config for kernel
On Thu, Apr 11, 2019 at 10:42:23AM +0530, Jay Patel wrote: > I have image path in boot loader "menu=Boot NetBSD:vesa 1280x800;splash > /logo.gif;boot netbsd" but it wont show up. Is there anything else to be > done besides kernel options? Guess: try a bitmap .bmp rather than a .gif? Cheers, Patrick
kernel symbols
How do you make use of amd64/binary/kernel/netbsd-GENERIC.symbols.gz ? (e.g., I guessed (gdb) symbol-file netbsd-GENERIC.symbols `/usr/export/amd64/netbsd-GENERIC.symbols': can't read symbols: File format not recognized. ) Cheers, Patrick
Re: Clock Unsynchronized
> On Mon, 28 Jan 2019 at 15:51, Patrick Welche wrote: > > > > Just noticed (NetBSD-8.99.26/amd64): > > > > ntpd[1575]: kernel reports TIME_ERROR: 0x4041: Clock Unsynchronized > > > > This is after a ntpdate which succeeded in catching up the 3/4 hour > > that clock was behind by. I haven't seen this error before... > > > > Is ACPI-Fast a good choice? (I didn't choose...) > > > > # sysctl kern.timecounter > > kern.timecounter.choice = TSC(q=-100, f=2666902400 Hz) clockinterrupt(q=0, > > f=100 Hz) ichlpcib0(q=1000, f=3579545 Hz) ACPI-Fast(q=1000, f=3579545 Hz) > > lapic(q=-100, f=266767233 Hz) i8254(q=100, f=1193182 Hz) dummy(q=-100, > > f=100 Hz) > > kern.timecounter.hardware = ACPI-Fast > > kern.timecounter.timestepwarnings = 0 On Mon, Jan 28, 2019 at 07:17:23PM +, Chavdar Ivanov wrote: > I remember having problems sometimes ago when my NetBSD machines were > around 8.99.25 or so (my timeserver is an RPI Model B still on > 8.99.2). I haven't had these problems for a while, but all my -current > machines are on 8.99.32. I just updated to Wednesday's 8.99.32, and saw it again: Feb 1 12:09:51 warbler ntpd[327]: kernel reports TIME_ERROR: 0x41: Clock Unsynchronized Hardware problem? Cheers, Patrick
Clock Unsynchronized
Just noticed (NetBSD-8.99.26/amd64): ntpd[1575]: kernel reports TIME_ERROR: 0x4041: Clock Unsynchronized This is after a ntpdate which succeeded in catching up the 3/4 hour that clock was behind by. I haven't seen this error before... Is ACPI-Fast a good choice? (I didn't choose...) # sysctl kern.timecounter kern.timecounter.choice = TSC(q=-100, f=2666902400 Hz) clockinterrupt(q=0, f=100 Hz) ichlpcib0(q=1000, f=3579545 Hz) ACPI-Fast(q=1000, f=3579545 Hz) lapic(q=-100, f=266767233 Hz) i8254(q=100, f=1193182 Hz) dummy(q=-100, f=100 Hz) kern.timecounter.hardware = ACPI-Fast kern.timecounter.timestepwarnings = 0 Cheers, Patrick
Re: Links crashed when open a https site?
On Sun, Jan 13, 2019 at 10:10:44PM +0100, Cs?nyi P?l wrote: > I changed the shell for root like this: > # usermod -s /bin/ksh root > > and now when I login with root ( not with su ) I have command/filename > completition. > But if I do su from my bash shell, and get root, the command > completition does not work. Why? How about "su -l" ? Cheers, Patrick
Re: raid0 disappears
On Wed, Jan 02, 2019 at 01:55:56PM +0300, pierre-philipp braun wrote: > Hello Patrick, Hello Pierre - thanks for taking a look! > your problem is either badly explained or too complicated, or both. I am reaching the conclusion that it must be "bad disks". > You say you do not see raid0 when using netboot, and then it seems the same > happens when booting from the disk. Correct. > I suppose there's something wrong about partitioning, either with MBR or > labels. Not sure there is something specific in that regard, compared > to non-booting arrays. But the relying and unused EFI partition makes > the whole thing a bit far fetched. Unless you really want EFI, just a > big NetBSD partition as with `fdisk -0ua /dev/rwd0d`. If there were something wrong the MBR or the labels, I wouldn't be able to boot the kernel from raid0a. > just in case, even though dmesg does not show it, you could check that > /dev/rraid0 /dev/raid0 are truly absent. They are truly absent in the sense of ioctls fail. After the raidctl -c (and no further initialisation), raid0 is fine, i.e., the behaviour is exactly as if I hadn't set the raid to autoconfigure. [The need for netboot to illustrate is that no root filesystem is found on normal boot] > Also I donno about `2 0` as > array setting. I do `1 2 0` for RAID-1 as explained in the manual. The initial '1' was redundant and has been removed in the newer syntax. Since then I booted that box with Seatools. Both disks passed the long test. dmesg doesn't contain "can't read blk ..." errors. I notice sometimes delays in writes and an associated unwelcome "thunk" from the disks, so I will shelve this as unprovable disk hardware issue (unsatisfactory). Cheers, Patrick
raid0 disappears
My raid 1 root partition is not found at boot, and I don't see what is missing. Netbooting, I see: $ dmesg | grep raid [ 3.193038] dk1 at wd0: "sysraid0", 16777216 blocks at 524328, type: raidframe [ 3.193038] dk3 at wd0: "usr0", 209715200 blocks at 34078760, type: raidframe [ 3.193038] dk4 at wd0: "home0", 209715200 blocks at 243793960, type: raidframe [ 3.263067] dk6 at wd1: "sysraid1", 16777216 blocks at 524328, type: raidframe [ 3.263067] dk8 at wd1: "usr1", 209715200 blocks at 34078760, type: raidframe [ 3.263067] dk9 at wd1: "home1", 209715200 blocks at 243793960, type: raidframe [ 5.193874] raid1: RAID Level 1 [ 5.193874] raid1: Components: /dev/dk3 /dev/dk8 [ 5.193874] raid1: Total Sectors: 209715072 (102399 MB) [ 5.203879] raid1: GPT GUID: b1fa28b2-aaed-4901-98b7-c54817e148cb [ 5.203879] dk10 at raid1: "usr", 209714992 blocks at 40, type: ffs [ 5.213883] raid2: RAID Level 1 [ 5.213883] raid2: Components: /dev/dk4 /dev/dk9 [ 5.213883] raid2: Total Sectors: 209715072 (102399 MB) If I: # cat > /etc/raid.conf START array 2 0 START disks /dev/dk1 /dev/dk6 START layout 128 1 1 1 START queue fifo 100 # raidctl -c /etc/raid.conf raid0 # raidctl -s raid0 Components: /dev/dk1: optimal /dev/dk6: optimal No spares. Component label for /dev/dk1: Row: 0, Column: 0, Num Rows: 1, Num Columns: 2 Version: 2, Serial Number: 2018122300, Mod Counter: 1361302869 Clean: No, Status: 0 sectPerSU: 128, SUsPerPU: 1, SUsPerRU: 1 Queue size: 100, blocksize: 512, numBlocks: 16777088 RAID Level: 1 Autoconfig: Yes Root partition: Soft Last configured as: raid0 Component label for /dev/dk6: Row: 0, Column: 1, Num Rows: 1, Num Columns: 2 Version: 2, Serial Number: 2018122300, Mod Counter: 1361302869 Clean: No, Status: 0 sectPerSU: 128, SUsPerPU: 1, SUsPerRU: 1 Queue size: 100, blocksize: 512, numBlocks: 16777088 RAID Level: 1 Autoconfig: Yes Root partition: Soft Last configured as: raid0 Parity status: clean Reconstruction is 100% complete. Parity Re-write is 100% complete. Copyback is 100% complete. so it is there, and set to autoconfig. When I boot from the disk, the kernel on raid0a is run, and I am offered raid1 and raid2 partitions as possibilities, but raid0 is not listed. (dk1 and dk6 start at 524328 as there is an efi partition before it which is NOT used in this example. This is just an ordinary BIOS + MBR boot - and the kernel is found. (PR 53808 for the efi problem.)) Cheers, Patrick
Re: npf forwarding <-
On Mon, Nov 19, 2018 at 08:37:51PM +0300, Dima Veselov wrote: > On Mon, Nov 19, 2018 at 03:14:33PM +0000, Patrick Welche wrote: > > > > > procedure "log" > > > > map iwn0 dynamic any -> 10.111.65.65 pass family inet4 from 10.168.204.0/24 > > # id="1" > > map wm0 dynamic 10.111.65.4 <- any pass family inet4 to 128.232.132.8 # > > id="2" > > I got your setup working and now have to explain something: > typical pub->priv redirect always works with priv->pub mapping, > because NAT have to allocate outleading port when inside server > replies. In your setup there is no rule for mapping replies. > > You have to NAT replied packet and it will work with that: > map $int_if static 172.20.27.7 -> 128.232.132.8 > map $int_if static 172.20.27.7 <- 128.232.132.8 > map $ext_if dynamic $int_net -> $ext_v4 > > (172.20.27.7 is the outside webserver you are trying to reach). Interesting: this gets me 172.20.27.7 if I aim for 128.232.132.8 as requested, but given the other rule, if I aim for 172.20.27.7 I don't get 172.20.27.7... > I also converted "dynamic" to "static" and have no idea why it works, > maybe npf architector can tell us. > > As for previous note about stateful - recently I got same problem. > It seems NAT will never work if inside->outside connection is stateful. According to http://rmind.github.io/npf/nat.html It should be remembered that dynamic NAT, as a concept, relies on stateful filtering, therefore it is performing it implicitly. I expected the return rule not be necessary, as I expected the reply packet to match the connection state. How is this meant to work? Cheers, Patrick
npf forwarding <-
How is npf <- meant to work? This is the simplest test rig I could think of: # rpi laptopwebserver # NetBSD-8.99.25/evbarmNetBSD-8.99.25/amd64 NetBSD-8.99.25/amd64 # usmsc0 10.168.204.26/24 <--> wm0 10.168.204.62/24 # iwm0 10.111.65.65/24 <--> wm0 10.111.65.4/24 $ext_if = "iwn0" $int_if = "wm0" $ext_v4 = inet4($ext_if) $int_v4 = inet4($int_if) alg "icmp" procedure "log" { log: npflog0 } map $ext_if dynamic $int_net -> $ext_v4 map $int_if dynamic 10.111.65.4 <- 128.232.132.8 group "external" on $ext_if { pass stateful out final all apply "log" pass all apply "log" } group "internal" on $int_if { pass stateful final all apply "log" pass all apply "log" } group "local" on "lo0" { pass all apply "log" } group default { pass all apply "log" } On the rpi, lynx http://webserver/ gets the page successfully. However, lynx http://128.232.132.8/ hangs. On the laptop, tcpdump -nvi wm0 shows: 12:05:59.236370 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 60) 10.168.204.26.65517 > 128.232.132.8.80: Flags [S], cksum 0x9dbf (correct), seq 1728898885, win 32768, options [mss 1460,nop,wscale 3,sackOK,TS val 1 ecr 0], length 0 12:05:59.236439 IP (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto ICMP (1), length 56, bad cksum 0 (->e1c)!) 10.168.204.62 > 10.168.204.26: ICMP host 10.111.65.4 unreachable, length 36 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 60) 10.168.204.26.65517 > 10.111.65.4.8096: [|tcp] 12:06:05.238546 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 60) 10.168.204.26.65517 > 128.232.132.8.80: Flags [S], cksum 0x9db3 (correct), seq 1728898885, win 32768, options [mss 1460,nop,wscale 3,sackOK,TS val 13 ecr 0], length 0 12:06:05.238638 IP (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto ICMP (1), length 56, bad cksum 0 (->e1c)!) 10.168.204.62 > 10.168.204.26: ICMP host 10.111.65.4 unreachable, length 36 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 60) 10.168.204.26.65517 > 10.111.65.4.8096: [|tcp] 12:06:17.248729 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 60) 10.168.204.26.65517 > 128.232.132.8.80: Flags [S], cksum 0x9d9b (correct), seq 1728898885, win 32768, options [mss 1460,nop,wscale 3,sackOK,TS val 37 ecr 0], length 0 12:06:17.248802 IP (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto ICMP (1), length 56, bad cksum 0 (->e1c)!) 10.168.204.62 > 10.168.204.26: ICMP host 10.111.65.4 unreachable, length 36 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 60) 10.168.204.26.65517 > 10.111.65.4.8096: [|tcp] rpi# ping -c1 10.111.65.4 PING warbler.flow.bpi.cam.ac.uk (10.111.65.4): 56 data bytes 64 bytes from 10.111.65.4: icmp_seq=0 ttl=254 time=4.833378 ms warbler.flow.bpi.cam.ac.uk PING Statistics 1 packets transmitted, 1 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 4.833378/4.833378/4.833378/0.00 ms What am I missing? Cheers, Patrick
Re: fsck "NO WRITE"
On Wed, Oct 17, 2018 at 09:15:29PM +0100, Patrick Welche wrote: > This is just a USB stick. I haven't seen "NO WRITE" before: > > $ fsck -v /dev/rdk1 > start /dev/rdk1 wait fsck_ffs /dev/rdk1 > ** /dev/rdk1 (NO WRITE) > ** Last Mounted on /mnt > ** Phase 1 - Check Blocks and Sizes > ** Phase 2 - Check Pathnames > ** Phase 3 - Check Connectivity > ** Phase 4 - Check Reference Counts > ** Phase 5 - Check Cyl groups > BLK(S) MISSING IN BIT MAPS > SALVAGE? no > > 10407 files, 351626 used, 363501 free (13 frags, 45436 blocks, 0.0% > fragmentation) > > * UNRESOLVED INCONSISTENCIES REMAIN * > > (It's actually a NetBSD UEFI install disk, so was written to...) > > Broken stick? Nevermind - just did mount /dev/dk1 /mnt cd /mnt vi install.sh (deleted a line and saved) cd / umount /mnt fsck /dev/rdk1 ** /dev/rdk1 ** Last Mounted on /mnt .. BLK(S) MISSING IN BIT MAPS SALVAGE? [yn] y and have a "working" stick. I don't understand the NO WRITE though Cheers, Patrick
fsck "NO WRITE"
This is just a USB stick. I haven't seen "NO WRITE" before: $ fsck -v /dev/rdk1 start /dev/rdk1 wait fsck_ffs /dev/rdk1 ** /dev/rdk1 (NO WRITE) ** Last Mounted on /mnt ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups BLK(S) MISSING IN BIT MAPS SALVAGE? no 10407 files, 351626 used, 363501 free (13 frags, 45436 blocks, 0.0% fragmentation) * UNRESOLVED INCONSISTENCIES REMAIN * (It's actually a NetBSD UEFI install disk, so was written to...) Broken stick? Cheers, Patrick
Re: uchcom USB-serial
On Tue, Oct 16, 2018 at 05:44:30PM +0200, Manuel Bouyer wrote: > On Tue, Oct 16, 2018 at 04:36:35PM +0100, Patrick Welche wrote: > > Just had a proper go, and see: > > > > uchcom0: QinHeng Electronics (0x1a86) USB2.0-Ser! (0x7523), rev 1.10/2.54, > > addr 3 > > uchcom0: CH341 detected > > ucom3 at uchcom0 > > uchcom0: cannot reset: STALLED > > uchcom0: cannot reset: STALLED > > uchcom0: cannot reset: STALLED > > uchcom0: cannot reset: STALLED > > uchcom0: cannot reset: STALLED > > uchcom0: cannot reset: STALLED > > uchcom0: cannot reset: STALLED > > ... > > > > I note that you have the full word "Serial"... > > Looks like a communication problem. Mine is manufactured by olimex, > which usually do robust hardware. I can see there is a true 12Mhz crystal. > Maybe yours uses a ceramic resonator, which is not stable enough ? This says "NLink Pax" on it. I think it is returning to where it came from... Thanks, Patrick
Re: uchcom USB-serial
On Sat, Oct 13, 2018 at 12:39:35PM +0200, Manuel Bouyer wrote: > On Tue, Oct 09, 2018 at 04:13:32PM +0100, Patrick Welche wrote: > > I purchased a couple of USB-serial adapters. Unfortunately, given the lack > > of detail in the descriptions, they turned out to be > > > > uchcom0: QinHeng Electronics (0x1a86) USB2.0-Ser! (0x7523), rev 1.10/2.54 > > > > According to > > > > https://nxr.netbsd.org/xref/src/sys/dev/usb/uchcom.c#40 > > > > this is "the worst USB-serial chip in the world." > > > > Do these work at all? (Get "tip: link down", then change to a > > uplcom0: Prolific Technology Inc. and all is well.) > > I use one: > uchcom0: QinHeng Electronics (0x1a86) USB2.0-Serial (0x7523), rev 1.10/2.54, > addr 3 > uchcom0: CH341 detected > ucom0 at uchcom0 > > to connect to an ARM board's console. I didn't notice problems so far ... Just had a proper go, and see: uchcom0: QinHeng Electronics (0x1a86) USB2.0-Ser! (0x7523), rev 1.10/2.54, addr 3 uchcom0: CH341 detected ucom3 at uchcom0 uchcom0: cannot reset: STALLED uchcom0: cannot reset: STALLED uchcom0: cannot reset: STALLED uchcom0: cannot reset: STALLED uchcom0: cannot reset: STALLED uchcom0: cannot reset: STALLED uchcom0: cannot reset: STALLED ... I note that you have the full word "Serial"... Cheers, Patrick
uchcom USB-serial
I purchased a couple of USB-serial adapters. Unfortunately, given the lack of detail in the descriptions, they turned out to be uchcom0: QinHeng Electronics (0x1a86) USB2.0-Ser! (0x7523), rev 1.10/2.54 According to https://nxr.netbsd.org/xref/src/sys/dev/usb/uchcom.c#40 this is "the worst USB-serial chip in the world." Do these work at all? (Get "tip: link down", then change to a uplcom0: Prolific Technology Inc. and all is well.) Cheers, Patrick
Re: Recommended desktop environment?
On Thu, Sep 06, 2018 at 05:01:41PM +0100, Patrick Welche wrote: > Not as fun as I had hoped! It has been a while since the last round, and I > wondered, given an ideal world with infinite developer time and full > documentation, with just an eye on correctness, what current views were on: > > * wayland vs X: what would The Right compositor look like? > > * What would the notion of a "seat" in a > > https://www.freedesktop.org/wiki/Software/systemd/multiseat/ > > sense look like in NetBSD? > > * ioctl vs sysctl: > GTK4 -> Vulkan(!) -> Mesa 18.1 -> kern/51786 how to pass info to drm The answer to the last question is "neither!" according to yesterday's commit from Taylor - thanks! Any thoughts on the other two? Cheers, Patrick
Re: Recommended desktop environment?
On Wed, Sep 05, 2018 at 07:38:17AM -0700, Andy Ruhl wrote: > On Wed, Sep 5, 2018 at 3:09 AM Wean Irdeh wrote: > > > > Hi all mailing list members! What is your recommended desktop environment > > for NetBSD? > > This should be fun. Not as fun as I had hoped! It has been a while since the last round, and I wondered, given an ideal world with infinite developer time and full documentation, with just an eye on correctness, what current views were on: * wayland vs X: what would The Right compositor look like? * What would the notion of a "seat" in a https://www.freedesktop.org/wiki/Software/systemd/multiseat/ sense look like in NetBSD? * ioctl vs sysctl: GTK4 -> Vulkan(!) -> Mesa 18.1 -> kern/51786 how to pass info to drm Cheers, Patrick
Re: Status of run0 support on NetBSD 8.0_RC1
On Tue, Jun 12, 2018 at 11:19:04AM -0500, David Young wrote: > On Tue, Jun 12, 2018 at 05:09:20PM +0100, Patrick Welche wrote: > > On Tue, Jun 12, 2018 at 03:05:40PM +0100, Patrick Welche wrote: > > > On Tue, Jun 12, 2018 at 03:02:26PM +0100, Patrick Welche wrote: > > > > That reminds me of: > > > > > > > > http://mail-index.netbsd.org/tech-net/2017/01/19/msg006248.html > > > > > > > > Some feedback would have been / would be nice... > > > > > > Instant feedback: > > > > > > + } else if (sc->mac_ver == 0x3070 && sc->mac_rev < 0x0201) { > > > > > > can't be right... > > > > ... but it's in the FreeBSD driver: > > > > https://svnweb.freebsd.org/base/head/sys/dev/usb/wlan/if_run.c?view=markup=257955#l4608 > > At first glance, that line looks like it's performing an impossible test > on one member of `sc`: `mac_ver` cannot both equal 0x3070 and be less > than 0x0201. I think that's what you mean when you say that it can't be > right? > > On second glance, there are actually two members involved: one is a > `version` number and the other is `revision` number. Indeed! OK - then please check out my patch :-) Cheers, Patrick
Re: Status of run0 support on NetBSD 8.0_RC1
On Tue, Jun 12, 2018 at 03:02:26PM +0100, Patrick Welche wrote: > That reminds me of: > > http://mail-index.netbsd.org/tech-net/2017/01/19/msg006248.html > > Some feedback would have been / would be nice... Instant feedback: + } else if (sc->mac_ver == 0x3070 && sc->mac_rev < 0x0201) { can't be right... P
Re: Status of run0 support on NetBSD 8.0_RC1
On Tue, Jun 12, 2018 at 04:14:50PM +0530, Mayuresh wrote: > Just realize the issue is not arm specific, faced the same on amd64. > NetBSD asusnetbsd 8.0_RC1 NetBSD 8.0_RC1 (GENERIC.201804191727Z) amd64 > > > On Mon, Jun 11, 2018 at 09:19:05PM +0530, Mayuresh wrote: > > Just want to check whether run0 is expected to work on the following > > setup: > > > > # uname -a > > NetBSD armv7 8.0_RC1 NetBSD 8.0_RC1 (RPI2.201804240813Z) evbarm > > > > > > # dmesg | grep run0 > > run0 at uhub1 port 3 > > run0: Ralink (0x148f) 802.11 n WLAN (0x5370), rev 2.00/1.01, addr 4 > > run0: MAC/BBP RT5390 (rev 0x0502), RF RT5592 (MIMO 1T1R), address > > 00:c1:00:c1:94:b6 > > run0: 11a rates: 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps > > run0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps > > run0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps > > 24Mbps 36Mbps 48Mbps 54Mbps > > > > # wpa_cli status > > Selected interface 'run0' > > 20:31:07.754: wpa_state=SCANNING > > address=00:c1:00:c1:94:b6 That reminds me of: http://mail-index.netbsd.org/tech-net/2017/01/19/msg006248.html Some feedback would have been / would be nice... Cheers, Patrick
string_view and clang
According to http://en.cppreference.com/w/cpp/compiler_support string_view is supported by gcc 7 and clang 4.0. As in NetBSD-current base we have gcc 6.4.0 and clang 5.0.1, I thought I would try it out: $ clang -std=c++17 -o foo foo.cpp foo.cpp:3:10: fatal error: 'string_view' file not found #include ^ 1 error generated. Is the page over optimistic, or do I need more flags on my compile line? (Guessing that /usr/include has the gcc include files...) Cheers, Patrick
Re: How to boot in UEFI mode: practically no documentation
On Tue, May 29, 2018 at 08:15:43AM +, Thomas Mueller wrote: > Where do I find documentation on how to boot NetBSD amd64 or possibly i386 in > UEFI mode? > > I couldn't find any man page and couldn't find anything useful in the online > NetBSD wiki. > > I don't want to be limited to NetBSD, would also want to be able to boot > FreeBSD and Linux in UEFI mode. > > I noticed /usr/mdec/bootx64.efi and bootia32.efi (on an amd64 installation) > but don't really know where these would lead to. > > I also saw /usr/src/sys/arch/i386/stand/efiboot . Did you see Petra's excellent page: https://wiki.netbsd.org/users/spz/moderndisk/ ? Cheers, Patrick
Re: sshguard fails to start
On Fri, May 25, 2018 at 10:40:14AM -0400, Greg Troxel wrote: > > Patrick Welche <pr...@cam.ac.uk> writes: > > > Maybe this use-case is "don't do that". Essentially: take an "internal" > > computer, with its default gateway. Add another network card. Connect > > it directly to "outside", and say run a webserver on it. If you run > > ipf saying block everything on the external card except to port http > > keep state, anyone can successfully connect to your webserver, but > > not to your sshd. If you try the same with npf, the reply from the > > server will be routed via the default gateway, and the 3rd packet, > > i.e., the second from the web client, will be blocked as not matching > > the connection state. (I was confused for ages in PR 53199) > > ("outside" has its own gateway.) > > Asymmetric routing and firewalls is tricky business, and requires > cooperating firewalls to synchronize state. > > So if you want to send replies via not the default gateway, then you > need explicit support for routing them contrary to routing. I suspect > npf can do this, but that it needs to be explicitly configured. Any idea how? (bpf rules rather than npf syntax?) Cheers, Patrick
Re: sshguard fails to start
On Fri, May 25, 2018 at 10:05:22AM -0400, Greg Troxel wrote: > > Patrick Welche <pr...@cam.ac.uk> writes: > > > On Wed, May 23, 2018 at 11:03:38PM +0100, Mike Pumford wrote: > >> I'm going to be attempting to reproduce it in npf as well as I've got an > >> updated firewall box to deploy which I'm hoping will use npf instead of ipf > >> (assuming I can make npf do everything I want). > > > > FWIW I'm going back to ipf: AFAICT keep state with ipf sends replies back > > through the interface the requests came in on, but npf obeys the routing > > table. It seems I was relying on ipf's behaviour. Feature? Bug? > > To first order, a firewall should pass/drop, and not adjust routing, > unless there's some extra rule which makes an affirmative request to > grab a packet and reroute it contrary to the routing table. keep state > is just a 2nd-order rule to add temporary rules for replies to packets > seen in one direction. > > So I think you are relying on a probably-bug. > > If you disable the firewall briefly, does your system still work? (Or > do you think it would, if you don't want to?) Maybe this use-case is "don't do that". Essentially: take an "internal" computer, with its default gateway. Add another network card. Connect it directly to "outside", and say run a webserver on it. If you run ipf saying block everything on the external card except to port http keep state, anyone can successfully connect to your webserver, but not to your sshd. If you try the same with npf, the reply from the server will be routed via the default gateway, and the 3rd packet, i.e., the second from the web client, will be blocked as not matching the connection state. (I was confused for ages in PR 53199) ("outside" has its own gateway.) Cheers, Patrick
Re: sshguard fails to start
On Wed, May 23, 2018 at 11:03:38PM +0100, Mike Pumford wrote: > I'm going to be attempting to reproduce it in npf as well as I've got an > updated firewall box to deploy which I'm hoping will use npf instead of ipf > (assuming I can make npf do everything I want). FWIW I'm going back to ipf: AFAICT keep state with ipf sends replies back through the interface the requests came in on, but npf obeys the routing table. It seems I was relying on ipf's behaviour. Feature? Bug? Cheers, Patrick
Re: sshguard fails to start
On Tue, May 22, 2018 at 11:03:34AM +0100, Stephen Borrill wrote: > > While it worked okay I found that the number of firewall rules it > > produced crept up to be stupidly large over time. This plus the startup > > anoyance made me switch to blacklistd. I'm still using ipf as a firewall > > so I cooked my own custom script to integrate it with ipf (it defaults > > to npf) based on the scripts that FreeBSD provides. > > Nice, care to share your ipf-interfacing script (and/or make it commitable)? If you mean blacklistd + ipf, doesn't it already "just work"? (Surprised to see "npf only" comment earlier in thread: /usr/src/external/bsd/blacklist/libexec/blacklistd-helper Cheers, Patrick
Re: umount after bad blocks...
On Sun, May 20, 2018 at 10:36:20PM -0700, George Georgalis wrote: > Is there a graceful way to abort and umount the broken device? Don't care > about the data, have tried SIGKILL the processes etc but at this point it > looks like I have to powercycle to release the umass device. Does umount -f help? -f The file system is forcibly unmounted. Active special devices continue to work, but all other files return errors if further accesses are attempted. The root file system cannot be forcibly unmounted. Cheers, Patrick
Re: stateful npf
Another attempt at npf state on -current/amd64. ext iwn0: 10.168.5.65 int wm0: 192.168.2.62 Toy ipf setup works as expected: # cat /etc/ipnat.conf map iwn0 192.168.2.0/24 -> 10.168.5.65 portmap tcp/udp 4:6000 map iwn0 192.168.2.0/24 -> 10.168.5.65 # cat /etc/ipf.conf block in on wm0 all pass in proto tcp from any to 10.168.5.4 port = 80 flags S/SA keep state I hope this is the equivalent in npf: # cat /etc/npf.conf map iwn0 dynamic 192.168.2.0/24 -> 10.168.5.65 group "ext" on wm0 { block in all pass stateful in proto tcp flags S/SA from any to 10.168.5.4 port 80 } group default { pass all } test: plug NetBSD-running rpi into wm0 as 192.168.2.26 and grab web page from another NetBSD/amd64 webserver, 10.168.5.4. Webpage arrives with ipf, but not with npf. Cheers, Patrick
Re: stateful npf
On Wed, Mar 28, 2018 at 12:43:59PM +0100, Patrick Welche wrote: > On a toy -current/amd64 system with internal wm0 and external wm1: > > # npfctl show > # filtering:active > # config: loaded > > procedure "log" > > group "ext" on wm1 # id="1" > pass in final family inet6 proto ipv6-icmp # id="2" > pass out final family inet6 proto ipv6-icmp # id="3" > pass in final family inet4 proto icmp # id="4" > pass stateful in final family inet4 proto tcp flags S/SA to > 192.168.25.65 port 80 apply "log" # id="5" > block all # id="6" > > group "int" on wm0 # id="7" > pass all # id="8" > > group # id="9" > pass final on lo0 all # id="a" > block all # id="b" > > > If I > > telnet 192.168.25.65 80 > > I see the connection into ext_if with flag S, but nothing is returned. > Shouldn't the "stateful"ness allow a reply? (Connecting via int_if > works, so the httpd is happy.) Logging on ext's block all, shows packets subsquent to the S/SA with Flags [.] or Flags [P.] being blocked. i.e., logging rules 5 and 6, we see on npflog0: 1st packet: rule 5.rules.0/0(match): pass in on wm1 ..>..65.80 Flags [S] 2nd packet: rule 6.rules.0/0(match): block in on wm1 ..>..65.80 Flags [.] so what happened to the state? Cheers, Patrick
stateful npf
On a toy -current/amd64 system with internal wm0 and external wm1: # npfctl show # filtering:active # config: loaded procedure "log" group "ext" on wm1 # id="1" pass in final family inet6 proto ipv6-icmp # id="2" pass out final family inet6 proto ipv6-icmp # id="3" pass in final family inet4 proto icmp # id="4" pass stateful in final family inet4 proto tcp flags S/SA to 192.168.25.65 port 80 apply "log" # id="5" block all # id="6" group "int" on wm0 # id="7" pass all # id="8" group # id="9" pass final on lo0 all # id="a" block all # id="b" If I telnet 192.168.25.65 80 I see the connection into ext_if with flag S, but nothing is returned. Shouldn't the "stateful"ness allow a reply? (Connecting via int_if works, so the httpd is happy.) Cheers, Patrick
Re: vlan
On Wed, Mar 14, 2018 at 11:41:32PM +0700, Robert Elz wrote: > Date:Wed, 14 Mar 2018 15:31:23 + > From: Patrick Welche <pr...@cam.ac.uk> > Message-ID: <20180314153123.GD6381@quark> > > | Rather than the traditional /etc/ifconfig.vlan0, I thought I would try the > | fancy rc.conf variables: > | > | net_interfaces="vlan0" > | ifconfig_vlan0="create;vlan 1 vlanif wm0;inet 192.168.1.1 netmask > 0xff00" > | > | but after a reboot, no complaints in /var/run/rc.log, but also no vlan0... > > What do you have auto_ifconfig set to? > > /etc/defaults/rc.conf has ... > > auto_ifconfig=YES # config all avail. interfaces > net_interfaces="" # used only if above is NO > > Note the comment on the second .If you set auto_ifconfog=NO > then you are also going to need wm0 in net_interfaces (before vlan0 I presume) > or it will not be configured. I think I now see the issue... I only tried net_interfaces="vlan0" because after a reboot, vlan0 wasn't created. In /etc/rc.d/network, I see: for cloner in $(/sbin/ifconfig -C); do for int in /etc/ifconfig.${cloner}[0-9]*; do [ ! -f $int ] && break tmp="$tmp ${int##*.}" done ifconfig -C certainly returns vlan, but then it looks as though I need the /etc/ifconfig.vlan0 file rather than being able to try the fancy variable (c.f., original message...). Might need a -a -n eval \$ifconfig_$cloner or somesuch... Cheers, Patrick
vlan
Rather than the traditional /etc/ifconfig.vlan0, I thought I would try the fancy rc.conf variables: net_interfaces="vlan0" ifconfig_vlan0="create;vlan 1 vlanif wm0;inet 192.168.1.1 netmask 0xff00" but after a reboot, no complaints in /var/run/rc.log, but also no vlan0... (BTW, what does enabling IP4CSUM_Rx on vlan0 mean when it is already enabled on its vlanif?) Cheers, Patrick
Re: nc -N and EOF
On Wed, Feb 28, 2018 at 11:09:57PM +, Valery Ushakov wrote: > Patrick Welche <pr...@cam.ac.uk> wrote: > > > I tried > > > > echo "hello from server" | nc -l 1234 > > > > nc -l 1234 << EOF > > hello from server > > EOF > > > > echo "hello from server" > tmpfile > > nc -l 1234 < tmpfile > > > > and in all cases > > > > nc -N 127.0.0.1 1234 > > > > prints "hello from server" but doesn't exit. > > Use > > nc -d localhost 1234 Thank you! echo "hello from server" | nc -l 1234 nc -N -d localhost 1234 Patrick
Re: bozohttpd
On Wed, Feb 28, 2018 at 07:11:56PM +, m...@netbsd.org wrote: > On Wed, Feb 28, 2018 at 04:41:57PM +0000, Patrick Welche wrote: > > /usr/libexec/httpd -d -d -d -d -P /tmp/foo.pid -i 127.0.0.1 -b -s /var/www > > works for me. What do you see? quark$ uname -srp NetBSD 8.99.12 x86_64 quark# /usr/libexec/httpd -d -d -d -d -P /tmp/foo.pid -i 127.0.0.1 -b -s /var/www quark# ftp http://127.0.0.1/index.html Requesting http://127.0.0.1/index.html 100% |***|781.14 MiB/s00:00 ETA 78 bytes retrieved in 00:00 (482.09 KiB/s) quark# All the output there is from ftp - I don't see anything from httpd? (I was hoping that "EXPLOSIVE" would be quite a lot of debug output.) > easier to debug: > /usr/libexec/httpd -d -d -d -d -P /tmp/foo.pid -i 127.0.0.1 -b -f /var/www (I'm trying to debug the attached script, so not very interactive - the puzzle is that /usr/tests/net/net do something very similar and pass.) Cheers, Patrick web.sh Description: Bourne shell script
bozohttpd
Running /usr/libexec/httpd -d -d -d -d -P /tmp/foo.pid -i 127.0.0.1 -b -s /var/www and fetching index.html, I see no output whatsoever. Where is it going? -s Forces logging to be set to stderr always. Cheers, Patrick
Re: nc -N and EOF
On Tue, Feb 27, 2018 at 09:50:34PM -0500, Eric Hawicz wrote: > On 2018-02-27 10:33 AM, Patrick Welche wrote: > >echo "hello from server" | nc -l 1234 > > > >nc -l 1234 << EOF > >hello from server > >EOF > > > >echo "hello from server" > tmpfile > >nc -l 1234 < tmpfile > > > > and in all cases > > > >nc -N 127.0.0.1 1234 > > > > prints "hello from server" but doesn't exit. Maybe I'm misunderstanding > > > > -N shutdown(2) the network socket after EOF on the input. Some > > servers require this to finish their work. > > > > ? > Do you hit control-D on the client nc to give it the EOF on the input? I was hoping to be able to script both sides, and have the file go from the listener to the client rather than the other way around. Patrick
nc -N and EOF
I tried echo "hello from server" | nc -l 1234 nc -l 1234 << EOF hello from server EOF echo "hello from server" > tmpfile nc -l 1234 < tmpfile and in all cases nc -N 127.0.0.1 1234 prints "hello from server" but doesn't exit. Maybe I'm misunderstanding -N shutdown(2) the network socket after EOF on the input. Some servers require this to finish their work. ? Cheers, Patrick
Re: SMB
On Thu, Feb 22, 2018 at 05:31:19AM -0500, Jason Mitchell wrote: > > > On Feb 21, 2018, at 9:16 AM, Stephen Borrill <net...@precedence.co.uk> > > wrote: > > > >> On Wed, 21 Feb 2018, Patrick Welche wrote: > >> I haven't tried SMB in years (it definitely worked against a different > >> windows server). Quick attempt on -current/amd64 gets: > >> > >> $ smbutil -v login -I wibble //prlw1@wibble > >> Password: > >> smbutil: can't get handle to requester (no /dev/nsmb* device available) > >> smbutil: can't get handle to requester (no /dev/nsmb* device available) > >> smbutil: could not login to server WIBBLE: syserr = Invalid argument > > > > I guess it is possible the error messages are spurious and the real problem > > is that SMBv1 is disabled on the target (unless SMBFS supported SMBv2 or > > later). > > > > -- > > Stephen > > > If this is the case, then the following might help. It talks about how to > enable SMBv1 on Windows 7 and later: > > https://support.microsoft.com/en-us/help/2696547/how-to-detect-enable-and-disable-smbv1-smbv2-and-smbv3-in-windows-and Thank you for your suggestions! - the test server is an ancient real pentium running windows server 2003, so I don't think it knows about SMBv2. - as pointed out in private email, I should have been root given the permissions on /dev/nsmb* Now when I try, I see # smbutil -v login -I wibble //prlw1@wibble Password: smbutil: connection already exists # smbutil lc SMB connections: None error = smb_ctx_lookup(ctx, level, 0); if (error == 0) { smb_error("connection already exists", error); exit(0); } smb_ctx_lookup does complete, and ctx looks sane, but lc doesn't list anything. Cheers, Patrick
SMB
I haven't tried SMB in years (it definitely worked against a different windows server). Quick attempt on -current/amd64 gets: $ smbutil -v login -I wibble //prlw1@wibble Password: smbutil: can't get handle to requester (no /dev/nsmb* device available) smbutil: can't get handle to requester (no /dev/nsmb* device available) smbutil: could not login to server WIBBLE: syserr = Invalid argument Yet $ config -x /netbsd | grep SMB file-system SMBFS # experimental - CIFS; also needs nsmb (below) ... # a pseudo device needed for SMBFS pseudo-device nsmb# experimental - SMB requester $ ls -l /dev/nsmb* crw-r--r-- 1 root wheel 98, 0 Jul 19 2011 /dev/nsmb0 crw-r--r-- 1 root wheel 98, 1 Jul 19 2011 /dev/nsmb1 crw-r--r-- 1 root wheel 98, 2 Jul 19 2011 /dev/nsmb2 crw-r--r-- 1 root wheel 98, 3 Jul 19 2011 /dev/nsmb3 Cheers, Patrick
sysctl creation
According to sysctl(9): int sysctl_createv(struct sysctllog **log, int cflags, const struct sysctlnode **rnode, const struct sysctlnode **cnode, int flags, int type, const char *namep, const char *desc, sysctlfn func, u_quad_t qv, void *newp, size_t newlen, ...); One of func, qv and the CTLFLAG_IMMEDIATE flag, or newp and newlen must be given for nodes that instrument data, otherwise an error is returned. AFAICT func is called whenever I read/write the sysctl after creation, but how can I set the original sysctl value if it is an error to set qv as well? (What is the Right Way?) Cheers, Patrick
Re: NPF error in /var/run/rc.log
On Sun, Dec 03, 2017 at 01:09:20AM +0700, Gua Chung Lim wrote: > Hi all, > > > /etc/npf.conf:2:21: no addresses matched for interface 'wm0' near ')' > I figured out their meaning. They are simply line number and column. > But my first 4 lines in /etc/npf.conf are very simple. > > % head -n 4 /etc/npf.conf > # /etc/npf.conf > $ext_if0 = inet4(wm0) > $int_if1 = inet4(wm1) > $ext_if6 = inet6(wm0) > > A warning occurs on the second line, column 21. > How can this be an error? > Defining the interfaces is so simple. > I didn't see anything wrong here. > Anyone plese point me out. It means that when your /etc/npf.conf is loaded, wm0 has no address assigned to it. Could it be e.g., that wm0 isn't getting a response to a dhcp request or something? (I just reproduced this on a laptop that is connected to wireless, so has no addresses assigned to the wired wm0.) Cheers, Patrick
Re: Cannot login via xdm after fresh install
On Sun, Sep 10, 2017 at 07:43:04PM +0300, Erkki Ruohtula wrote: > I did a fresh installation with NetBSD-7.1-amd64.iso in VirtualBox > 5.1.26, mostly using defaults. I did enable xdm in the installer. > Everything appeared to go smoothly, and the system now starts nicely > X11, and shows the xdm login screen. The problem is I cannot get > past that. If I enter the username root and its correct > password, I get a dialog box labeled "Session Menu", > with text "chooseSessionListWidget" and buttons under it, > of which most are grayed except "Default/Fail Safe" and "Cancel". Does adding your hostname to /etc/hosts 127.0.0.1, ::1 help? Cheers, Patrick
kgdb
Playing with kgdb on -current/amd64, on the remote, I see com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo com1: kgdb In /etc/remote (on the remote), I have com1:dv=/dev/dty01:br#115200:pa=none:dc: to go with options KGDB_DEVNAME="\"com\"",KGDB_DEVADDR=0x2f8,KGDB_DEVRATE=115200 and # tip com1 tip: /dev/dty01: Device busy tip: link down As I wasn't in the debugger, kgdb shouldn't be using com1? (Why busy?) Correct to use dty01 rather than tty01? Cheers, Patrick
dhcpcd timeout
I tried adding "timeout 180" to /etc/dhcpcd.conf on a -current/amd64 box, but on boot I still see: Configuring network interfaces:. Adding interface aliases:. Waiting for DAD to complete for statically configured addresses... Starting dhcpcd. wm0: link state DOWN (was UNKNOWN) wm1: link state DOWN (was UNKNOWN) wm2: link state UP (was UNKNOWN) wm3: link state DOWN (was UNKNOWN) wm4: link state DOWN (was UNKNOWN) wm5: link state DOWN (was UNKNOWN) wm2: link state DOWN (was UP) wm2: link state UP (was DOWN) timed out ... NetBSD/amd64 (Amnesiac) (console) After log in, the interface is set correctly for network use, but the lack of hostname is problematic. Should that "timeout" setting help, or is it intended for something else? Any other option than manually setting hostname in rc.conf? Cheers, Patrick
maxusers
Looking at https://wiki.netbsd.org/tutorials/tuning_netbsd_for_performance/ Some say that the maxusers should be set to the amount of RAM in megabytes. For reference, FreeBSD sets is automaticaly by this formula, but limits it's maximum to 384. Given that nowadays it is common to find RAM measured in gigabytes, is there another rule of thumb? Or is the done thing to just increase various limits on boot via /etc/sysctl.conf ? # config QUANTZ QUANTZ:11: warning: maxusers (384) > 128 Build directory is ../compile/QUANTZ Don't forget to run "make depend" Cheers, Patrick
log1pl expm1l
Naively using pkgsrc boost, and: ... undefined reference to `log1pl' ... undefined reference to `expm1l' They do appear in /usr/include/math.h, but not in nm -g /lib/libm.so. The only reference I can find is: Binary file /usr/pkg/lib/libboost_math_c99l.so matches Binary file /usr/pkg/lib/libboost_math_tr1.so matches Binary file /usr/pkg/lib/libboost_math_tr1l.so matches Before I patch up my local boost given that 3 decimal places is fine for me, am I missing something? Better plan? Cheers, Patrick
Re: Can I use NetBSD as a desktop system?
On Mon, Jul 17, 2017 at 09:02:57PM +0200, Jan Danielsson wrote: >I do most of my office work on NetBSD, though there are a few issues > I use Macs for (printing, when people insist on sending Microsoft Office > documents, and a few other things). I bit the bullet and added cups to PKG_OPTIONS.libreoffice and PKG_OPTIONS.gtk3, and even that seems to work for me :-) (Tired of "needs Postscript 3 printer" errors given a merely level 2 printer.) Cheers, Patrick (NetBSD on daily desktop and laptop)
Re: RAIDframe and alignment on 4K-sector disks?
On Mon, Jun 12, 2017 at 01:44:56AM -0500, John D. Baker wrote: > On Mon, 12 Jun 2017 04:55:52 - (UTC), mlel...@serpens.de (Michael > van Elst) wrote: > > > Currently best practice for such a RAID is: > > > > -> align the RAID partition(s) on each component to 4k > > A given. That's all these components are going to do, so 0 % 8 == 0. > > > -> use a stripe size of 64k (maxphys), with RAID-5 on 3 disks that's > >SecPerSU=64 (parity doesn't count). > > Doesn't RAIDframe assume 512-byte sectors? So, 64k stripe size would > be SecPerSU=128, yes? I think it's SecPerSU=64 blocks = 32k. Two data disks in one write, so 2 * 32k = 64k = MAXPHYS written in one write. (Please correct me if I'm wrong: I just make a 3 * 2T raid 5 this morning ;-) ) Cheers, Patrick
cvs broken pipe
Any ideas what to do when you hit this? # for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19; do cvs update -A; done cvs [update aborted]: error writing to server: Broken pipe cvs [update aborted]: error writing to server: Broken pipe cvs [update aborted]: error writing to server: Broken pipe cvs [update aborted]: error writing to server: Broken pipe (tried -z3 and -z9, and there is a -Pd all in .cvsrc) Cheers, Patrick
Re: Why is a wedge on RAID 10x slower?
On Wed, Nov 30, 2016 at 11:30:51AM +, Stephen Borrill wrote: > mlelstv pointed out that because of the 64 sectPerSU RAIDframe setting (i.e. > 128 sectors of data with 3 components, or 64k), the stripe unit is 32k, but > the whole stripe is 64k. By starting the wedge at 64 sectors, > this is 32k, but I'm attempting to do 64k I/O. Therefore the wedge should > start at 128, not 64 > > # dkctl raid0 addwedge bigdata 128 15628073823 ffs > dk3 created successfully. To check: this means the bigdata wedge on raid0 has to be correctly aligned, but the raid0 wedge on wd0 doesn't need to be? Cheers, Patrick
npf map syntax
Just looking at npf as a workaround for kern/50198 (I think the patch in there is correct, and the last comments amount to trying with and without IPN_IN), and am stumped at the first hurdle: ipf: rdr xennet0 0.0.0.0/0 port 80 -> 127.0.0.1 port 1234 tcp What is the equivalent in npf? I tried $any = 0.0.0.0/0 map $ext_if dynamic 127.0.0.1 port 1234 <- $any port 80 #map $ext_if dynamic 127.0.0.1 port 1234 <- $ext_if port 80 #map $ext_if dynamic $any port 80 <- 127.0.0.1 port 1234 and none seem to work. (What is net-seg defined as?) (for the second hurdle: I have the equivalent code running calling npf_nat_lookup() which seems to work, but I suspect it is because I am running on amd64: is npf_addr_t in host or net order? simply same as sockaddr_in?) Cheers, Patrick
Re: disklabel warnings
On Fri, Dec 09, 2016 at 05:20:39PM +, Patrick Welche wrote: > Taking a disk which had /dev/zero written all over it > > wd0: 298 GB, 620181 cyl, 16 head, 63 sec, 512 bytes/sect x 625142448 sectors > > :pd#625142448:od#0:\ > > disklabel: partition d: partition extends past end of unit > > how? Answer: incorrect nc# Sorry for the noise... P
disklabel warnings
Taking a disk which had /dev/zero written all over it wd0: 298 GB, 620181 cyl, 16 head, 63 sec, 512 bytes/sect x 625142448 sectors :pd#625142448:od#0:\ disklabel: partition d: partition extends past end of unit how? Cheers, Patrick
poker?
I hadn't seen this one before: Kernel RNG "7653 0 1" poker test failure: parameter X = 1.95200 P
Re: kernel load failure
On Wed, Sep 14, 2016 at 08:06:16PM +0200, Martin Husemann wrote: > On Wed, Sep 14, 2016 at 11:12:17AM -0500, Patrick Welche wrote: > > I also tried tftp, and get stuck at the same value whether a kernel or > > its compressed version is used - would that rule out the pxe boot side > > of things? (FreeBSD iso served via its pxe boot from the same NetBSD > > server also worked.) > > Can you show the output of "size netbsd" (for the uncompressed kernel) > and what value you get stuck at? > > Also details from "readelf -e netbsd" might be interesting here. Taking the 7.0.1 experiment, the INSTALL kernel from ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-7.0.1/amd64/ has textdata bss dec hex filename 108887125722076 593920 1720470810685e4 nbsd7-INSTALL and stopped at 12120088 = 0xa62608 12120088 > 1088712 ? For the 5.2.3 experiment, the INSTALL kernel from ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-archive/NetBSD-5.2.3/amd64/ has textdata bss dec hex filename 101855795693216 781728 16660523 fe382b nbsd5-INSTALL and stopped at 10185608 What am I looking fro in readelf? e.g. for 7.0.1 INSTALL Section Headers: [Nr] Name Type Address Offset Size EntSize Flags Link Info Align [ 0] NULL 0 0 0 [ 1] .text PROGBITS 8010 0010 007773e5 AX 0 0 64 [ 2] .rodata PROGBITS 80877400 00877400 002eaab3 A 0 0 32 [ 3] link_set_modules PROGBITS 80c8e8a8 00c8e8a8 03e0 A 0 0 8 so 0xa62608 means load got stuck loading .rodata? Thanks, Patrick
Re: kernel load failure
On Wed, Sep 14, 2016 at 06:02:37PM +0200, Martin Husemann wrote: > On Wed, Sep 14, 2016 at 10:57:26AM -0500, Patrick Welche wrote: > > > 9872659+10907160+995816 [12773]=0x165da30 > > > > Thanks - do you know what those numbers refer to? (I get stuck in the > > first one) > > size /netbsd, those are the bytes loaded so far for text and data (and > the size of bss, which is not loaded). > > If NFS locks up like this often read/write sizes are too big for one > of the network cards involved. Can we tune those for pxe boot somehow? I also tried tftp, and get stuck at the same value whether a kernel or its compressed version is used - would that rule out the pxe boot side of things? (FreeBSD iso served via its pxe boot from the same NetBSD server also worked.) (Really flumoxed, as the kernel which is running on the laptop I'm typing on currently doesn't load, yet they are very similar.) Cheers, Patrick
Re: kernel load failure
On Wed, Sep 14, 2016 at 05:52:55PM +0300, Andreas Gustafsson wrote: > Patrick Welche wrote: > > > pxeboot & INSTALL from > > > > > > ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-7.0.1/amd64/ > > > > > > behave in the same way, but stops at 12120088 > > For what it's worth, I have an automated testing setup that netboots > -current kernels using the -current pxeboot, and it's working. Though > it's loading the kernel over TFTP instead of NFS - perhaps that makes > a difference. In the 5.2.3 and 7.0.1 with INSTALL kernels, I used tftp, so I have failure in both cases... > Here's the log output from a successful boot for your reference: > 9872659+10907160+995816 [12773]=0x165da30 Thanks - do you know what those numbers refer to? (I get stuck in the first one) Cheers, Patrick
Re: kernel load failure
On Tue, Sep 13, 2016 at 11:09:41AM -0500, Patrick Welche wrote: > On Tue, Sep 13, 2016 at 10:56:46AM -0500, Patrick Welche wrote: > > Just in case, I downloaded pxeboot_ia32.bin and netbsd-INSTALL.gz from > > ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-archive/NetBSD-5.2.3/amd64/ > > and same thing happens: > > > > >> NetBSD/x86 PXE Boot, Revision 5.1 (from NetBSD 5.2.3) > > >> Memory: 550/2998080 k > > Press return to boot now, any other key for boot menu > > Starting in 0 seconds. > > PXE BIOS Version 2.1 > > Using PCI device at bus 0 device 25 function 0 > > Ethernet address 00:23:18:90:91:92 > > 10185608 > > > > stops at 10185608 every time... > > pxeboot & INSTALL from > > ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-7.0.1/amd64/ > > behave in the same way, but stops at 12120088 Clutching at straws: obase=16 10185608 9B6B88 12120088 B8F018 80100140: 8d 9e 00 70 00 00 lea0x7000(%rsi),%ebx NetBSD 5.2.3: 80100146: ba 88 6b bb 00 mov$0xbb6b88,%edx NetBSD 7.0.1: 80100146: ba 18 f0 d8 00 mov$0xd8f018,%edx 8010014b: 81 e2 00 f0 ff ff and$0xf000,%edx 80100151: b8 00 00 10 00 mov$0x10,%eax 80100156: 89 c1 mov%eax,%ecx 80100158: c1 e9 09shr$0x9,%ecx 8010015b: 01 cb add%ecx,%ebx 8010015d: 89 d1 mov%edx,%ecx 8010015f: 29 c1 sub%eax,%ecx 80100161: c1 e9 0cshr$0xc,%ecx 80100164: 83 c8 01or $0x1,%eax 80100167: 89 03 mov%eax,(%rbx) 80100169: c7 43 04 00 00 00 00movl $0x0,0x4(%rbx) 80100170: 83 c3 08add$0x8,%ebx 80100173: 05 00 10 00 00 add$0x1000,%eax 80100178: e2 ed loop 0x80100167 sits in the loop? Cheers, Patrick
Re: kernel load failure
On Tue, Sep 13, 2016 at 10:56:46AM -0500, Patrick Welche wrote: > Just in case, I downloaded pxeboot_ia32.bin and netbsd-INSTALL.gz from > ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-archive/NetBSD-5.2.3/amd64/ > and same thing happens: > > >> NetBSD/x86 PXE Boot, Revision 5.1 (from NetBSD 5.2.3) > >> Memory: 550/2998080 k > Press return to boot now, any other key for boot menu > Starting in 0 seconds. > PXE BIOS Version 2.1 > Using PCI device at bus 0 device 25 function 0 > Ethernet address 00:23:18:90:91:92 > 10185608 > > stops at 10185608 every time... pxeboot & INSTALL from ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-7.0.1/amd64/ behave in the same way, but stops at 12120088 P
Re: kernel load failure
On Mon, Sep 12, 2016 at 07:17:07AM -0500, Patrick Welche wrote: > I have 2 laptops with identical cases if not identical internals. One is > my everyday -current/amd64 laptop. I have been trying to netboot the > other one which keeps failing to load the kernel over nfs, at the stage > where the twiddle is still printing the first number. (I think there are > normally 3.) > > pxeboot_bin and the kernels are all a few day old -current/amd64. > I tried GENERIC, GENERIC with DEBUG (no extra printing), a compressed > GENERIC, and the kernel from the working laptop. Repeating the > netboot, the load would always stop at the same place for that > kernel. (Different places for different kernels, so not "network > transferred given number of bytes".) Compressed and corresponding > uncompressed kernels stop at the same place. I also tried a > GENERIC/i386 kernel (in case of "can't cope with instruction XXX"), > and the same happened. Just in case, I downloaded pxeboot_ia32.bin and netbsd-INSTALL.gz from ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-archive/NetBSD-5.2.3/amd64/ and same thing happens: >> NetBSD/x86 PXE Boot, Revision 5.1 (from NetBSD 5.2.3) >> Memory: 550/2998080 k Press return to boot now, any other key for boot menu Starting in 0 seconds. PXE BIOS Version 2.1 Using PCI device at bus 0 device 25 function 0 Ethernet address 00:23:18:90:91:92 10185608 stops at 10185608 every time... P
kernel load failure
I have 2 laptops with identical cases if not identical internals. One is my everyday -current/amd64 laptop. I have been trying to netboot the other one which keeps failing to load the kernel over nfs, at the stage where the twiddle is still printing the first number. (I think there are normally 3.) pxeboot_bin and the kernels are all a few day old -current/amd64. I tried GENERIC, GENERIC with DEBUG (no extra printing), a compressed GENERIC, and the kernel from the working laptop. Repeating the netboot, the load would always stop at the same place for that kernel. (Different places for different kernels, so not "network transferred given number of bytes".) Compressed and corresponding uncompressed kernels stop at the same place. I also tried a GENERIC/i386 kernel (in case of "can't cope with instruction XXX"), and the same happened. On a whim, I tried FreeBSD-11.0-CURRENT-amd64-20150716-r285616-bootonly.iso.xz which successfully netbooted. Any suggestions on what might be going on? Cheers, Patrick
Re: uefi boot?
On Tue, May 17, 2016 at 09:11:50AM -0500, Jonathan A. Kollasch wrote: > > 6414680192 1 GPT part - NetBSD RAIDFrame component > gptmbr.bin is just MBR code. You also need to put bootxx code in the > partition at index 1 with installboot. Thanks! The partition at index 1 is a RAID 0 made from dk0 and dk7. I tried (amd64): installboot /dev/rdk0 -t raid /usr/mdec/bootxx_ffsv2 installboot /dev/rdk7 -t raid /usr/mdec/bootxx_ffsv2 gptmbr.bin finds those boot blocks, but says it can't find /boot, i.e., first stage bootloader now runs. /boot is in the first partition of that raid (/dev/raid7a which is disklabeled) # diff -s /usr/mdec/boot /boot Files /usr/mdec/boot and /boot are identical I subsequently tried installboot /dev/rraid7a /usr/mdec/bootxx_ffsv2 and installboot /dev/rdk0 /usr/mdec/bootxx_ffsv2 installboot /dev/rdk7 /usr/mdec/bootxx_ffsv2 but still no luck... file system: /dev/raid7d format FFSv1 endian little-endian magic 11954 timeTue May 17 16:50:59 2016 superblock location 8192id [ 52aa11ca 58762977 ] cylgrp dynamic inodes 4.4BSD sblock FFSv2 fslevel 4 Cheers, Patrick
uefi boot?
In the old days, on i386/amd64, one used to run disklabel, installboot and fdisk to make a disk bootable. What is the method in post-disklabel 3T disk days? Should # gpt show wd0 startsize index contents 0 1 PMBR 1 1 Pri GPT header 2 32 Pri GPT table 34 30 Unused 6414680192 1 GPT part - NetBSD RAIDFrame component 1468025633554432 2 GPT part - NetBSD swap 48234688 262144128 3 GPT part - NetBSD RAIDFrame component 310378816 262144128 4 GPT part - NetBSD RAIDFrame component 572522944 209715328 5 GPT part - NetBSD RAIDFrame component 782238272 2148038863 6 GPT part - NetBSD RAIDFrame component 2930277135 49 Unused 2930277184 2930255951 7 GPT part - NetBSD FFSv1/FFSv2 5860533135 32 Sec GPT table 5860533167 1 Sec GPT header # gpt biosboot -i 1 wd0 /dev/rwd0d: Partition 1 marked as bootable be enough? (with /usr/mdec/boot in /) I updated the BIOS just in case, and get "Missing OS". I suppose I'm asking "What does gptmbr.bin do?" (vs bootxx_ffsv2 etc) Cheers, Patrick
Re: Prevent firefox from making noise
On Wed, Apr 20, 2016 at 11:40:40AM -0600, Swift Griggs wrote: > Can one disable or prevent sound from playing from one specific application > (at the OS level)? If not, then is there any way to simply prevent Firefox > from having sound abilities? I effectively have no sound from Firefox by running the pulseaudio version without running hal, so pulseaudio doesn't know how to start :-) Cheers, Patrick
Re: Last version of of citrix Client core dumps (Was Re: How to run Microsoft Internet Explorer on NetBSD?)
On Fri, Feb 26, 2016 at 04:11:53PM +, Christos Zoulas wrote: > In article <20160226154046.ga1...@quark.internal.precedence.co.uk>, > Patrick Welche <pr...@cam.ac.uk> wrote: > >On Fri, Feb 26, 2016 at 02:30:21PM +0100, Stephan wrote: > >> The assembly looks like junk and considering the adresses, you have > >> tried to disassemble some memory on the stack. Is this a 64-bit wfica > >> binary? > > > > I commented out the x86_64 restriction and it runs on amd64/current. > At least it brings up a window saying it needs me to specify application > servers which I don't have any... Indeed - it runs, but once you actually start using a connected socket recvmsg ends up returning errno 35 Resource temporarily unavailable until the timer SEGVs it. P
Re: Last version of of citrix Client core dumps (Was Re: How to run Microsoft Internet Explorer on NetBSD?)
On Fri, Feb 26, 2016 at 02:30:21PM +0100, Stephan wrote: > The assembly looks like junk and considering the adresses, you have > tried to disassemble some memory on the stack. Is this a 64-bit wfica > binary? This is from: /usr/pkgsrc/distfiles/linuxx64-13.3.0.344519.tar.gz > Either way, this seems to be a completely different case. How does the > backtrace look like? and you're right, that was the shell script(!) $ gdb /usr/pkg/lib/ICAClient/wfica wfica.core GNU gdb (GDB) 7.10.1 Copyright (C) 2015 Free Software Foundation, Inc. ... warning: A handler for the OS ABI "GNU/Linux" is not built into this configuration of GDB. Attempting to continue with the default i386:x86-64 settings. Reading symbols from /usr/pkg/lib/ICAClient/wfica...(no debugging symbols found)...done. [New process 26159] [New process 6029] [New process 18257] [1] Segmentation fault (core dumped) gdb /usr/pkg/lib/ICAClient/wfica wfica.core $ file /usr/pkg/lib/ICAClient/wfica wfica.core /usr/pkg/lib/ICAClient/wfica: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.26, BuildID[sha1]=82aabbc0e9bf9c7211ddbeb8ff679cc6fdb75d88, stripped wfica.core: ELF 64-bit LSB core file x86-64, version 1 (SYSV), too many program headers (495) so not much luck... Cheers, Patrick
Re: Last version of of citrix Client core dumps (Was Re: How to run Microsoft Internet Explorer on NetBSD?)
On Fri, Feb 26, 2016 at 09:22:38AM +0100, Stephan wrote: > I still recommend Receiver for HTML5 in this case. > > The dump looks like a mess and eventually gdb is unable to process > this dump of a Linux binary on NetBSD correctly. It would be > interesting to know what is mapped at 0xba90004d. You could break at > that adress (b *0xba90004d) and check with pmap. Also, what´s the > corresponding instruction (x/i 0xba90004d)? Getting to stop while running for the pmap is proving interesting (need authentication via pnbrowse before dump in wfica). The instruction seems to always be the same though: Core was generated by `wfica'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x7f7fee73a9f4 in ?? () [Current thread is 1 (process 27767)] (gdb) x/20i 0x7f7fee73a9e8 0x7f7fee73a9e8: add%al,(%rax) 0x7f7fee73a9ea: add%al,(%rax) 0x7f7fee73a9ec: add%al,(%rax) 0x7f7fee73a9ee: add%al,(%rax) 0x7f7fee73a9f0: push %rsi 0x7f7fee73a9f1: rex.R 0x7f7fee73a9f2: rex.RB push %r13 => 0x7f7fee73a9f4: rex.RB 0x7f7fee73a9f5: rex.WRB 0x7f7fee73a9f6: cs rex.R 0x7f7fee73a9f8: rex.WR 0x7f7fee73a9f9: rex.WR add %r8b,(%rax) 0x7f7fee73a9fc: add%dl,0x75(%rcx) 0x7f7fee73a9ff: gs jne 0x7f7fee73aa67 0x7f7fee73aa02: add%al,(%rax) 0x7f7fee73aa04: add%al,(%rax) 0x7f7fee73aa06: add%al,(%rax) 0x7f7fee73aa08: stc 0x7f7fee73aa09: mov%al,%al 0x7f7fee73aa0b: idivl 0x7f(%rdi) Cheers, Patrick
Re: Last version of of citrix Client core dumps (Was Re: How to run Microsoft Internet Explorer on NetBSD?)
On Thu, Feb 25, 2016 at 02:44:32PM +0100, Stephan wrote: > Why don´t you just use the Receiver for HTML5? With regard to your > crash, do you have a backtrace handy? Have a look at Jose's from earlier in this thread: http://mail-index.netbsd.org/netbsd-users/2016/02/03/msg017788.html P