OpenBSD 6.8 release boot stuck on Intel NUC NUC7PJYH
Hello misc, I recently upgraded from OpenBSD 6.7 release to the new 6.8 release on an Intel NUC Kit NUC7PJYH mini server. That machine ran OpenBSD without problems since version 6.5 and has been running 6.7 release (including all sypatches) until a day or so. The machine boots via UEFI and the disk is GPT partitioned. See below for a dmesg from OpenBSD 6.7. However, after I performed an interactive upgrade to OpenBSD 6.8 release, the machine remains stuck during boot after displaying the message "entry point at: 0x1001000", and nothing else happens. I have to long-press the power button to force it to shut down. I spent some time researching the issue, and I know the following so far: * The machine boots exclusively via UEFI. There is no legacy boot option available, as far as I can see, that could act as a temporary workaround. * The new boot loader version from OpenBSD 6.8 that is installed now on disk does not seem to be the problem. I can do various things in the boot menu, including changing the terminal configuration and all the other usual things. So boot loader stages 1 and 2 load fine. During my trials to debug the problem, I realised that I had an old OpenBSD 6.7 kernel file on disk in the form of a 'bsd.booted' file. Surprisingly, that kernel booted without problems using the new boot loader and with the latest release binaries. Of course, the booted system was not 100 per cent usable, because of the mismatch between kernel and binaries. * I had a look at the output of 'machine memory' in the boot menu, but could not see any obvious problems there. * The OpenBSD 6.8 ram disk kernel boots fine, but neither do the installed 6.8 single or multiprocessor kernels. I tried both. * I noticed in the dmesg from the OpenBSD 6.8 ram disk kernel that the EFI frame buffer (efifb) is now recognised, which was not the case before. This probably has nothing to do with the boot problem, but I wanted to mention it for completeness. * There have been various reports of similar boot problems recently. Here are some examples: https://www.reddit.com/r/openbsd/comments/je7c8r/stuck_at_boot_after_upgrading_to_68/ https://andinus.nand.sh/writings/2020/OpenBSD-6.8-EFI-boot-failure.html https://marc.info/?l=openbsd-misc&m=160376706629651 https://marc.info/?l=openbsd-misc&m=160224393101534 https://marc.info/?l=openbsd-misc&m=159147446008114 * I saw the patches posted by Kastus Shchuka and Marc Kettenis, but I haven't had time to build a custom release yet to test them. I want to avoid rolling back to version 6.7 and figure out what the problem is. What else can I try? Cheers. Fabian OpenBSD 6.7 (GENERIC.MP) #2: Thu Jun 4 09:55:08 MDT 2020 r...@syspatch-67-amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP real mem = 8166744064 (7788MB) avail mem = 7906615296 (7540MB) mpath0 at root scsibus0 at mpath0: 256 targets mainbus0 at root bios0 at mainbus0: SMBIOS rev. 3.1 @ 0x6bf67000 (49 entries) bios0: vendor Intel Corp. version "JYGLKCPX.86A.0055.2020.0603.1745" date 06/03/2020 bios0: Intel Corporation NUC7PJYH acpi0 at bios0: ACPI 6.1 acpi0: sleep states S0 S3 S4 S5 acpi0: tables DSDT FACP FPDT FIDT MCFG DBG2 DBGP HPET LPIT APIC NPKT SSDT SSDT SSDT SSDT SSDT SSDT SSDT SSDT UEFI BGRT TPM2 DMAR WDAT WSMT acpi0: wakeup devices SIO1(S3) HDAS(S3) XHC_(S4) XDCI(S4) RP01(S4) PXSX(S4) RP02(S4) PXSX(S4) RP03(S4) PXSX(S4) RP04(S4) PXSX(S4) RP05(S4) PXSX(S4) RP06(S4) PXSX(S4) [...] acpitimer0 at acpi0: 3579545 Hz, 32 bits acpimcfg0 at acpi0 acpimcfg0: addr 0xe000, bus 0-255 acpihpet0 at acpi0: 1920 Hz acpimadt0 at acpi0 addr 0xfee0: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: Intel(R) Pentium(R) Silver J5005 CPU @ 1.50GHz, 1496.43 MHz, 06-7a-01 cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,CX16,xTPR,PDCM,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,SGX,SMEP,ERMS,MPX,RDSEED,SMAP,CLFLUSHOPT,PT,SHA,UMIP,MD_CLEAR,IBRS,IBPB,STIBP,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN cpu0: 4MB 64b/line 16-way L2 cache cpu0: smt 0, core 0, package 0 mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges cpu0: apic clock running at 19MHz cpu0: mwait min=64, max=64, C-substates=0.2.0.2.4.2.1.1, IBE cpu1 at mainbus0: apid 2 (application processor) cpu1: Intel(R) Pentium(R) Silver J5005 CPU @ 1.50GHz, 1495.87 MHz, 06-7a-01 cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,CX16,xTPR,PDCM,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,SGX,SMEP,ERMS,MPX,RDSEED,SMAP,CLFLUSHOPT,PT,SHA,UMIP,MD_CLEAR,IBRS,IBPB,STIBP
Stuck on remote rsync with BackupPC and openrsync
Hi, I have been trying to get BackupPC 3.3.2 running on a Debian 10/Buster server to back up my OpenBSD 6.6 router. It works fine with the GNU rsync port on the OpenBSD box but when I try to use the native openrsync instead, it just seems to not get started properly and hangs. On the Debian side, it looks like this until I kill it after a few hours: $ /usr/bin/perl /usr/share/backuppc/bin/BackupPC_dump -v milan cmdSystemOrEval: about to system /bin/ping -c 1 172.16.10.1 cmdSystemOrEval: finished: got output PING 172.16.10.1 (172.16.10.1) 56(84) bytes of data. 64 bytes from 172.16.10.1: icmp_seq=1 ttl=255 time=0.173 ms --- 172.16.10.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.173/0.173/0.173/0.000 ms cmdSystemOrEval: about to system /bin/ping -c 1 172.16.10.1 cmdSystemOrEval: finished: got output PING 172.16.10.1 (172.16.10.1) 56(84) bytes of data. 64 bytes from 172.16.10.1: icmp_seq=1 ttl=255 time=0.094 ms --- 172.16.10.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.094/0.094/0.094/0.000 ms CheckHostAlive: returning 0.094 full backup started for directory / (baseline backup #135) started full dump, share=/ Running: /usr/bin/ssh -q -x -o UserKnownHostsFile=/etc/backuppc/ssh/known_hosts -i /etc/backuppc/ssh/id_ed25519 -l backup 172.16.10.1 doas /usr/local/bin/rsync --server --sender --numeric-ids --perms --owner --group -D --links --times --recursive -x --ignore-times . / Xfer PIDs are now 10093 xferPids 10093 Got remote protocol 27 Negotiated protocol version 27 milan/172.16.10.1 is the OpenBSD box to be backed up. BackupPC connects via ssh and starts openrsync in server mode. /usr/local/bin/rsync is a wrapper script that removes the "--ignore-times" parameter before it invokes openrsync because openrsync does not understand that parameter and BackupPC insists on adding that parameter. On the OpenBSD box I see the following processes until I kill them after a few hours: USER PID PPID PGID SESS JOBC STAT TT TIME COMMAND backup 22274 23311 23311 fd80731388500 I ??0:00.12 sshd: backup@notty (sshd) backup 98017 22274 98017 fd80731388c00 Ip ??0:00.05 sh -c doas /usr/local/bin/rsync --server --sender --numeric-ids --perms --owner --group -D --links --times --recursive -x --ignore-times . / root 95559 98017 98017 fd80731388c00 Ip ??0:00.01 /bin/ksh /usr/local/bin/rsync --server --sender --numeric-ids --perms --owner --group -D --links --times --recursive -x --ignore-times . / root 15271 95559 98017 fd80731388c00 IpU??0:00.28 /usr/bin/openrsync --server --sender --numeric-ids --perms --owner --group -D --links --times --recursive -x . / A ktrace -dig 98017 just gives me an empty trace file (it starts to have something when I kill the processes but that obviously does not tell me what went wrong initially). Any suggestions what might go wrong or how to debug this further? Fabian
Re: OpenBSD 6.8 release boot stuck on Intel NUC NUC7PJYH
Hi Sven, misc, Thanks for your email and the effort of putting up a patched EFI boot file. Much appreciated. It took a long time to make a release in my case. I too can confirm that the patch by Marc Kettenis linked below [1] resolved the boot issue on the Intel NUC. It boots fine again now, and I could complete the post-upgrade steps for OpenBSD 6.8 release without problems. To resolve the issue, I basically did what you suggested. However, after the heads-up from Theo in the other email thread [2], I used the BOOTIA32.EFI and BOOTX64.EFI files from the latest official snapshot, and not the one that you shared earlier. Specifically, I did the following: * Boot into bsd.rd * Mount the local GPT EFI partition (mount -t msdos /dev/sd0i /mnt/efi) * Download the BOOTIA32.EFI and BOOTX64.EFI files from the latest OpenBSD snapshot from one of the mirror servers * Copy the two files into the EFI partition, replacing the files that were installed during the upgrade to OpenBSD 6.8 release * Reboot That procedure worked fine for me and was reasonably straightforward. Cheers. Fabian [1] https://marc.info/?l=openbsd-misc&m=160380332006125 [2] https://marc.info/?l=openbsd-misc&m=160390222432642 > Hi Fabian, > > the today posted patch from Marc Kettenis works on my system - > https://marc.info/?l=openbsd-tech&m=160383074317608&w=2 > > For test purposes you can download my build BOOTX64.EFI from > http://mailinglist.fusion-zone.net/BOOTX64.EFI > > Just replace it in your EFI partition. Please make a backup of your > BOOTX64.efi or download the original BOOTX64.EFI from > https://cdn.openbsd.org/pub/OpenBSD/6.7/amd64/ (in case of an error) again. > > Best regards, > Sven
Re: snapshot boot fails with error "entry point at 0x1001000"
Hi all, For the record, Mark Kettenis' patch below fixed the boot stuck problem on my Intel NUC Kit NUC7PJYH mini server, see the following email thread: https://marc.info/?l=openbsd-misc&m=160391516603159 Thanks a lot for this. Cheers. Fabian > Hi Mark, > > on my Lenovo V130 the patch works. Now I'm able to boot the current > kernel again, without the need to remove the radeon and amdgpu driver > (https://marc.info/?l=openbsd-misc&m=159276382718317&w=2) > > Thanks and best regards, > Sven > > On 10/27/20 1:40 PM, Mark Kettenis wrote: > > Hi Kastus, > > > > Please don't have technical discussions on misc@; some developers, > > like me, only read it sporadically. The tech@ list is a much better > > place. > > > > The problem with your approach is that you allocate memory at a fixed > > address, and we can't be sure that memory is available. We may have > > to extend the amount of memory we allocate such that larger kernels > > fit. The diff below bumps it from 32MB to 64MB. Does this work for > > you? > > > > > > Index: arch/amd64/stand/efiboot/efiboot.c > > === > > RCS file: /cvs/src/sys/arch/amd64/stand/efiboot/efiboot.c,v > > retrieving revision 1.35 > > diff -u -p -r1.35 efiboot.c > > --- arch/amd64/stand/efiboot/efiboot.c 22 Mar 2020 14:59:11 - > > 1.35 > > +++ arch/amd64/stand/efiboot/efiboot.c 27 Oct 2020 12:36:45 - > > @@ -39,7 +39,7 @@ > > #include "eficall.h" > > #include "run_i386.h" > > > > -#defineKERN_LOADSPACE_SIZE (32 * 1024 * 1024) > > +#defineKERN_LOADSPACE_SIZE (64 * 1024 * 1024) > > > > EFI_SYSTEM_TABLE *ST; > > EFI_BOOT_SERVICES *BS;
New ral(4) RT2860 Draft-N wireless PCI card
Hello! The Longshine LCS-8031N Draft-N wireless PCI card [1] is supported by ral(4). It is based on the RT2860 chip. It works reliably here as hostap with WPA-PSK and good coverage. $ dmesg | grep ral ral0 at pci0 dev 16 function 0 "Ralink RT2860" rev 0x00: irq 14, address XX:XX:XX:XX:XX:XX ral0: MAC/BBP RT2860 (rev 0x0101), RF RT2820 (2T3R) This is on OpenBSD 4.4-beta i386 snapshot from July 31, see dmesg at the end. [1] http://longshine.de/longshine/p_wireless.php?lang=eng Here's a diff for the man page. Fabian Index: src/share/man/man4/ral.4 === RCS file: /cvs/src/share/man/man4/ral.4,v retrieving revision 1.87 diff -u -r1.87 ral.4 --- src/share/man/man4/ral.429 Jul 2008 16:44:19 - 1.87 +++ src/share/man/man4/ral.47 Aug 2008 19:16:02 - @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: July 28 2008 $ +.Dd $Mdocdate: August 7 2008 $ .Os .Dt RAL 4 .Sh NAME @@ -173,6 +173,7 @@ KCORP LifeStyle KLS-660. LevelOne WNC-0301 v2. Linksys WMP54G v4. +Longshine LCS-8031N. Micronet SP906GK. Minitar MN54GPC-R. MSI MS-6834. $ dmesg OpenBSD 4.4-beta (GENERIC) #1004: Thu Jul 31 00:42:16 MDT 2008 [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC cpu0: Intel Pentium III ("GenuineIntel" 686-class, 512KB L2 cache) 548 MHz cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,S SE real mem = 267993088 (255MB) avail mem = 250699776 (239MB) mainbus0 at root bios0 at mainbus0: AT/286+ BIOS, date 02/25/00, BIOS32 rev. 0 @ 0xfd801, SMBIOS rev. 2.1 @ 0xf7903 (46 entries) bios0: vendor IBM version "NVKT51AUS" date 02/25/2000 bios0: IBM 6862S50 apm0 at bios0: Power Management spec V1.2 apm0: AC on, battery charge unknown acpi at bios0 function 0x0 not configured pcibios0 at bios0: rev 2.1 @ 0xf/0x1 pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xf1d00/176 (9 entries) pcibios0: PCI Interrupt Router at 000:02:0 ("Intel 82371FB ISA" rev 0x00) pcibios0: PCI bus #1 is the last bus bios0: ROM list: 0xc/0x8000 0xc8000/0x4400 cpu0 at mainbus0 pci0 at mainbus0 bus 0: configuration mode 1 (no bios) pchb0 at pci0 dev 0 function 0 "Intel 82443BX AGP" rev 0x03 ppb0 at pci0 dev 1 function 0 "Intel 82443BX AGP" rev 0x03 pci1 at ppb0 bus 1 vga1 at pci1 dev 1 function 0 "S3 Trio3D AGP" rev 0x01 wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation) wsdisplay0: screen 1-5 added (80x25, vt100 emulation) agp0 at vga1: aperture at 0xec00, size 0x400 direct rendering for vga1 unsupported piixpcib0 at pci0 dev 2 function 0 "Intel 82371AB PIIX4 ISA" rev 0x02 pciide0 at pci0 dev 2 function 1 "Intel 82371AB IDE" rev 0x01: DMA, channel 0 wired to compatibility, channel 1 wired to compatibility pciide0: channel 0 ignored (disabled) atapiscsi0 at pciide0 channel 1 drive 0 scsibus0 at atapiscsi0: 2 targets, initiator 7 cd0 at scsibus0 targ 0 lun 0: ATAPI 5/cdrom removable cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2 uhci0 at pci0 dev 2 function 2 "Intel 82371AB USB" rev 0x01: irq 10 piixpm0 at pci0 dev 2 function 3 "Intel 82371AB Power" rev 0x02: SMI iic0 at piixpm0 iic0: addr 0x28 00=01 03=7f 04=7f 05=54 06=03 07=03 08=03 09=03 0a=03 0b=03 0c=af 0d=36 0e=07 10=01 13=7f 14=7f 15=54 16=03 17=03 18=03 19=03 1a=03 1b=03 1c=af 1d=36 1e=07 20=99 21=ab 22=c0 23=c3 24=b1 25=bd 26=ba 27=27 28=ff 29=ff 2a=ff 2c=ff 2e=ff 30=ff 32=ff 34=ff 36=ff 38=ff 3a=14 3b=0a 3e=ba 3f=40 40=01 43=7f 44=7f 45=54 46=03 47=03 48=ba 49=03 4a=ba 4b=03 4c=af 4d=36 4e=07 50=01 53=7f 54=7f 55=54 56=03 57=03 58=03 59=03 5a=03 5b=03 5c=af 5d=36 5e=07 60=99 61=ab 62=c0 63=c3 64=b1 65=bd 66=ba 67=27 68=ff 69=ff 6a=ff 6c=ff 6e=ff 70=ff 72=ff 74=ff 76=ff 78=ff 7a=14 7b=0a 7e=ba 7f=40 80=01 83=7f 84=7f 85=54 86=03 87=03 88=03 89=03 8a=03 8b=03 8c=af 8d=36 8e=07 90=01 93=7f 94=7f 95=54 96=03 97=03 98=03 99=03 9a=03 9b=03 9c=af 9d=36 9e=07 a0=99 a1=ab a2=c0 a3=c3 a4=b1 a5=bd a6=ba a7=27 a8=ff a9=ff aa=ff ac=ff ae=ff b0=ff b2=ff b4=ff b6=ff b8=ff ba=14 bb=0a be=ba bf=40 c0=01 c3=7f c4=7f c5=54 c6=03 c7=03 c8=03 c9=03 ca=03 cb=03 cc=af cd=36 ce=07 d0=01 d3=7f d4=7f d5=54 d6=03 d7=03 d8=03 d9=03 da=03 db=03 dc=af dd=36 de=07 e0=99 e1=ab e2=c0 e3=c3 e4=b1 e5=bd e6=ba e7=27 e8=ff e9=ff ea=ff ec=ff ee=ff f0=ff f2=ff f4=ff f6=ff f8=ff fa=14 fb=0a fe=ba ff=40 words 00=0180 01=0080 02=0080 03=7f80 04=7f80 05=5480 06=0380 07=0380 spdmem0 at iic0 addr 0x50: 256MB SDRAM non-parity PC100CL3 ral0 at pci0 dev 16 function 0 "Ralink RT2860" rev 0x00: irq 14, address XX:XX:XX:XX:XX:XX ral0: MAC/BBP RT2860 (rev 0x0101), RF RT2820 (2T3R) sis0 at pci0 dev 18 function 0 "NS DP83815 10/100" rev 0x00, DP83815D: irq 9, address XX:XX:XX:XX:XX:XX nsphyter0 at sis0 phy 0: DP8
Re: SIL-3512 supported?
Hello, I am using one of these add-in cards (PCI, 2 channel SATA) for the exact same purpose you mentioned. I had some problems in the beginning, but after I upgraded the firmware to the latest non-RAID version, it is working fine here. Fabian pciide1 at pci0 dev 18 function 0 "CMD Technology SiI3512 SATA" rev 0x01: DMA pciide1: using irq 10 for native-PCI interrupt pciide1: port 0: device present, speed: 1.5Gb/s On Sat, Jun 16, 2012 at 12:53:43PM +0200, LEVAI Daniel wrote: > On szo, j?n 16, 2012 at 19:10:09 +1000, Jonathan Gray wrote: > > It should work fine, this is the same controller as in the > > Thecus N1200 for example. It isn't sili(4) but rather pciide(4), see > > http://www.openbsd.org/cgi-bin/man.cgi?query=pciide&sektion=4 > > Thanks Jonathan, I'll get one then. I overlooked the pciide(4) page.
Re: SIL-3512 supported?
Well, it was needed in my case, but it might not be needed in your case. As I understand, this chipset is used in a couple of no-name cards. There is a small DOS utility on the SiliconImage website, where you get the latest BIOS images for the card, in the support section. The steps needed are described there in detail. It is pretty straightforward. I am using the latest non-RAID BIOS. Fabian On Sat, Jun 16, 2012 at 03:06:19PM +0200, LEVAI Daniel wrote: > Can you tell me what steps are involved in doing that? Do you need a > proprietary software for it, or is it doable from its configuration > ui?
Re: Privoxy crashes on one OpenBSD machine but not another
TJ wrote: > I'm migrating my system configs from one OpenBSD machine (Pentium 4) to > another (Core 2 Duo). > > I noticed unpredictable crashes of the Privoxy package when run and used > on the C2D computer. These crashes don't occur on the P4 at all, with > the same traffic. I tried to reproduce the crashes with OpenBSD 6.7 amd64 and Privoxy 3.0.29 built from git and Privoxy reliably crashes when executing a regression test ... The crash I encountered seems to be triggered by long host names resolved from a thread. Here's a reduced test case: openbsd$ cat resolve.c #include #include #include #include #include #include pthread_mutex_t mutex; void resolve(char *host) { int error; error = pthread_mutex_lock(&mutex); if (error) { printf("Locking failed: %s", strerror(error)); exit(1); } printf("Calling gethostbyname with %s\n", host); gethostbyname(host); pthread_mutex_unlock(&mutex); } int main(int argc, char **argv) { pthread_t the_thread; pthread_attr_t attrs; int i; if (!argc) { printf("No argument to resolve given\n"); exit(1); } pthread_attr_init(&attrs); pthread_attr_setdetachstate(&attrs, PTHREAD_CREATE_DETACHED); pthread_mutex_init(&mutex, NULL); for (i = 0; i < 3; i++) { pthread_create(&the_thread, &attrs, (void * (*)(void *))resolve, argv[1]); } sleep(1); exit(0); } openbsd$ clang -pthread -ggdb -Wall -o resolve resolve.c openbsd$ ./resolve AAA.example.org Calling gethostbyname with AAA.example.org Calling gethostbyname with AAA.example.org Calling gethostbyname with AAA.example.org openbsd$ ./resolve .example.org Calling gethostbyname with .example.org Segmentation fault (core dumped) openbsd$ egdb resolve resolve.core GNU gdb (GDB) 7.12.1 Copyright (C) 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-unknown-openbsd6.7". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from resolve...done. [New process 616459] [New process 145207] [New process 578084] [New process 517316] Core was generated by `resolve'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x031a025d201d in unpack_data (p=0x31a6a754b40, data=0x31a6a754b70, len=12) at /usr/src/lib/libc/asr/asr_utils.c:193 193 /usr/src/lib/libc/asr/asr_utils.c: No such file or directory. [Current thread is 1 (process 616459)] (gdb) where #0 0x031a025d201d in unpack_data (p=0x31a6a754b40, data=0x31a6a754b70, len=12) at /usr/src/lib/libc/asr/asr_utils.c:193 #1 _asr_unpack_header (p=0x31a6a754b40, h=0x31a6a754b70) at /usr/src/lib/libc/asr/asr_utils.c:257 #2 0x031a0265db34 in hostent_from_packet (reqtype=3, family=2, pkt=, pktlen=) at /usr/src/lib/libc/asr/gethostnamadr_async.c:463 #3 gethostnamadr_async_run (as=, ar=) at /usr/src/lib/libc/asr/gethostnamadr_async.c:305 #4 0x031a02603308 in _libc_asr_run (as=0x319e01a2e00, ar=0x31a6a754c70) at /usr/src/lib/libc/asr/asr.c:176 #5 _libc_asr_run_sync (as=0x319e01a2e00, ar=0x31a6a754c70) at /usr/src/lib/libc/asr/asr.c:223 #6 0x031a025f994e in _gethostbyname (name=0x7f7d01ba 'A' , ".example.org", af=2, ret=, buflen=4096, h_errnop=, buf=) at /usr/src/lib/libc/asr/gethostnamadr.c:119 #7 _libc_gethostbyname2 (name=0x7f7d01ba 'A' , ".example.org", af=2) at /usr/src/lib/libc/asr/gethostnamadr.c:154 #8 0x0317d0a323c4 in resolve (host=0x7f7d01ba 'A' , ".example.org") at resolve.c:18 #9 0x031ab56970d1 in _rthread_start (v=) at /usr/src/lib/librthread/rthread.c:96 #10 0x031a0264cdb8 in __tfork_thread () at /usr/src/lib/libc/arch/amd64/sys/tfork_thread.S:77 #11 0x in ?? () Fabian
Re: Privoxy crashes on one OpenBSD machine but not another
Sebastien Marie wrote: > A fix has been commited. Great. After applying 009_asr Privoxy's regression tests indeed run without errors. > Thanks for investigated the problem and provided a test case. It was very > useful to properly found the state corruption. You're welcome. Fabian
Does rkpcie(4) on RockPro64 supports PCI-E To Dual SATA-II Interface Card?
Hi. I've got me a RockPro64 and the RockPro64 PCI-E To Dual SATA-II Interface Card [0] and followed jaspers@'s instructions [1] on how to install OpenBSD. Is the mentioned PCI-E To Dual SATA-II Interface Card or PCI-E on the RockPro64 supposed to work? When I boot OpenBSD, I see the following in the dmesg: rkpcie0 at mainbus0 rkpcie0: link training timeout Full dmesg is attached. Thanks, Fabian [0] https://www.pine64.org/?product=rockpro64-pci-e-to-dual-sata-ii-interface-card [1[ https://github.com/jasperla/openbsd-rockpro64 In channel 0 CS = 0 MR0=0x98 MR4=0x3 MR5=0xFF MR8=0x8 MR12=0x72 MR14=0x72 MR18=0x0 MR19=0x0 MR24=0x8 MR25=0x0 CS = 1 MR0=0x18 MR4=0x3 MR5=0xFF MR8=0x8 MR12=0x72 MR14=0x72 MR18=0x0 MR19=0x0 MR24=0x8 MR25=0x0 channel 1 CS = 0 MR0=0x98 MR4=0x1 MR5=0xFF MR8=0x8 MR12=0x72 MR14=0x72 MR18=0x0 MR19=0x0 MR24=0x8 MR25=0x0 CS = 1 MR0=0x18 MR4=0x2 MR5=0xFF MR8=0x8 MR12=0x72 MR14=0x72 MR18=0x0 MR19=0x0 MR24=0x8 MR25=0x0 channel 0 training pass! channel 1 training pass! change freq to 400MHz 0,1 channel 0 CS = 0 MR0=0x98 MR4=0x82 MR5=0xFF MR8=0x8 MR12=0x72 MR14=0x72 MR18=0x0 MR19=0x0 MR24=0x8 MR25=0x0 CS = 1 MR0=0x18 MR4=0x81 MR5=0xFF MR8=0x8 MR12=0x72 MR14=0x72 MR18=0x0 MR19=0x0 MR24=0x8 MR25=0x0 channel 1 CS = 0 MR0=0x98 MR4=0x1 MR5=0xFF MR8=0x8 MR12=0x72 MR14=0x72 MR18=0x0 MR19=0x0 MR24=0x8 MR25=0x0 CS = 1 MR0=0x18 MR4=0x2 MR5=0xFF MR8=0x8 MR12=0x72 MR14=0x72 MR18=0x0 MR19=0x0 MR24=0x8 MR25=0x0 channel 0 training pass! channel 1 training pass! change freq to 800MHz 1,0 Channel 0: LPDDR4,800MHz Bus Width=32 Col=10 Bank=8 Row=15/15 CS=2 Die Bus-Width=16 Size=2048MB Channel 1: LPDDR4,800MHz Bus Width=32 Col=10 Bank=8 Row=15/15 CS=2 Die Bus-Width=16 Size=2048MB 256B stride ch 0 ddrconfig = 0x101, ddrsize = 0x2020 ch 1 ddrconfig = 0x101, ddrsize = 0x2020 pmugrf_os_reg[2] = 0x3AA1FAA1, stride = 0xD OUT U-Boot SPL board init U-Boot SPL 2017.09-rockchip-ayufan-1045-g9922d32c04 (Mar 21 2019 - 17:27:29) booted from SPI flash Trying to boot from SPI NOTICE: BL31: v1.3(debug):370ab80 NOTICE: BL31: Built : 09:23:41, Mar 4 2019 NOTICE: BL31: Rockchip release version: v1.1 INFO:GICv3 with legacy support detected. ARM GICV3 driver initialized in EL3 INFO:Using opteed sec cpu_context! INFO:boot cpu mask: 0 INFO:plat_rockchip_pmu_init(1181): pd status 3e INFO:BL31: Initializing runtime services WARNING: No OPTEE provide boot loader, Booting device without OPTEE initialization. SMC`s destined for OPTEE will return SMC_UNK ERROR: Error initializing runtime service opteed_fast INFO:BL31: Preparing for EL3 exit to normal world INFO:Entry point address = 0x20 INFO:SPSR = 0x3c9 U-Boot 2017.09-rockchip-ayufan-1045-g9922d32c04 (Mar 21 2019 - 17:27:35 +) Model: Pine64 RockPro64 DRAM: 3.9 GiB DCDC_REG1@vdd_center: ; enabling DCDC_REG2@vdd_cpu_l: ; enabling DCDC_REG3@vcc_ddr: ; enabling (ret: -38) DCDC_REG4@vcc_1v8: set 180 uV; enabling LDO_REG1@vcc1v8_dvp: set 180 uV; enabling LDO_REG2@vcc3v0_touch: set 300 uV; enabling LDO_REG3@vcc1v8_pmu: set 180 uV; enabling LDO_REG4@vcc_sd: set 330 uV; enabling LDO_REG5@vcca3v0_codec: set 300 uV; enabling LDO_REG6@vcc_1v5: set 150 uV; enabling LDO_REG7@vcca1v8_codec: set 180 uV; enabling LDO_REG8@vcc_3v0: set 300 uV; enabling SWITCH_REG1@vcc3v3_s3: ; enabling (ret: -38) SWTCH_REG2@vcc3v3_s0: ; enabling (ret: -38) vcc1v8-s0@vcc1v8_s0: set 180 uV; enabling (ret: -38) dc-12v@dc_12v: set 1200 uV; enabling (ret: -38) vcc-sys@vcc_sys: set 500 uV; enabling (ret: -38) vcc3v3-sys@vcc3v3_sys: set 330 uV; enabling (ret: -38) vcc-phy-regulator@vcc_phy: ; enabling (ret: -38) vdd-log@vdd_log: ; enabling (ret: -38) MMC: sdhci@fe33: 0, dwmmc@fe32: 1 SF: Detected gd25q128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB *** Warning - bad CRC, using default environment In:serial@ff1a Out: serial@ff1a Err: serial@ff1a Model: Pine64 RockPro64 Net: eth0: ethernet@fe30 Hit any key to stop autoboot: 0 Card did not respond to voltage select! mmc_init: -95, time 20 switch to partitions #0, OK mmc1 is current device Scanning mmc 1:1... reading /dtb/rockchip/rk3399-rockpro64.dtb 67805 bytes read in 12 ms (5.4 MiB/s) Found EFI removable media binary efi/boot/bootaa64.efi reading efi/boot/bootaa64.efi 161546 bytes read in 22 ms (7 MiB/s) ## Starting EFI application at 0200 ... Card did not respond to voltage select! mmc_init: -95, time 20 Scanning disk sd...@fe33.blk... MMC: block number 0x1 exceeds max(0x0) MMC: block number 0x1 exceeds max(0x0) MMC: block number 0x44 exceeds max(0x0) Scanning disk dw...@fe32.blk... Found 2 disks disks: sd0* sd1 >> OpenBSD/arm64 BOOTAA64 0.14 boot> cannot open sd0a:/etc/random.seed: No such file or directory booting sd0a:/bsd: 2797284+439984+8969752+738048 [208212+109+336840+186074]=0xff4d48 type 0x2 pa 0x20 va 0x20 pages 0x4000 attr 0x8 type 0x7 pa 0x420 va 0x20 pages 0
vim+YouCompleteMe: basic .ycm_extra_conf.py for /usr/src and bsd.*.mk Makefiles
Hi, i've been using vim + YouCompleteMe [0] for some time know and it works pretty well with OpenBSD's src tree. I want to share my .ycm_extra_conf.py ([1] and below) with you. Maybe someone will find it usefull. This configuration will gather compiler flags (CFLAGS / CPPFLAGS) from the appropriate Makefiles and should work for userland as well as the kernel. Just put .ycm_extra_conf.py under your SRCDIR (/usr/src) and follow the HOWTO instructions which you can find in the .ycm_extra_conf.py file. This .ycm_extra_conf.py will probably work for other projects as long as all relevant flags are in CFLAGS / CPPFLAGS. If someone knows a better solution to read variables from Makefiles, let me know! :) Cheers, Fabian [0] - https://github.com/Valloric/YouCompleteMe [1] - https://gist.github.com/Mischi/b8d57f8732b27239469a .ycm_extra_conf.py -- # Based on # https://github.com/Valloric/ycmd/blob/master/cpp/ycm/.ycm_extra_conf.py # # HOWTO # # # === Step 1 # # For kernel .c files, CFLAGS / CPPFLAGS from # the actual kernel configuration are used. # These are gathered via uname(1). # # If you want a specific arch/config, override # them with 'default_arch' / 'default_config' # # NOTE: The choosen kernel configuration must # exist. # # === Step 2 # # The following target mimics 'make show' # from bsd.port.mk(5) and is used to retrieve # CFLAGS / CPPFLAGS variables from Makefiles. # # Copy & Paste the folloing make target # into your /etc/mk.conf: # # myshow: # .for v in ${myshowvar} # @echo ${$v} # .endfor # # # .PHONY: myshow # import os import ycm_core default_arch = None default_config = None # You can add additional CFLAGS / CPPFLAGS here. additional_userland_flags = [ # "-Weverything" ] additional_kernel_flags = [ # "-Weverything" ] srcdir = os.path.dirname( os.path.abspath( __file__ ) ) sysdir = os.path.join(srcdir, "sys") def MakeRelativePathsInFlagsAbsolute( flags, working_directory ): if not working_directory: return list( flags ) new_flags = [] make_next_absolute = False path_flags = [ '-isystem', '-I', '-iquote', '--sysroot=' ] for flag in flags: new_flag = flag if make_next_absolute: make_next_absolute = False if not flag.startswith( '/' ): new_flag = os.path.join( working_directory, flag ) for path_flag in path_flags: if flag == path_flag: make_next_absolute = True break if flag.startswith( path_flag ): path = flag[ len( path_flag ): ] new_flag = path_flag + os.path.join( working_directory, path ) break if new_flag: new_flags.append( new_flag ) return new_flags def GetKernelFlags( darch, dconfig ): if darch != None: arch = darch else: arch = os.popen("uname -m").read().rstrip() if dconfig != None: config = dconfig else: config = os.popen("uname -v").read().split('#')[0] makefiledir = "arch/%s/compile/%s" % ( arch, config ) makefiledir = os.path.join(sysdir, makefiledir) return GetFlags( makefiledir ) def GetUserlandFlags( filename ): makefiledir = os.path.dirname( filename ) while not "Makefile" in os.listdir( makefiledir ): makefiledir = os.path.join(makefiledir, "..") return GetFlags( makefiledir ) def GetFlags( makefiledir ): cd_cmd = "cd %s" % makefiledir make_cmd = "make myshowvar=\"CFLAGS CPPFLAGS\" myshow" make_flags = os.popen("%s && %s" % (cd_cmd, make_cmd)).read().split() return MakeRelativePathsInFlagsAbsolute( make_flags, makefiledir ) def FlagsForFile( filename ): if filename.startswith( sysdir ): final_flags = GetKernelFlags( default_arch , default_config ) final_flags.extend( additional_kernel_flags ) elif filename.startswith( srcdir ): final_flags = GetUserlandFlags( filename ) final_flags.extend( additional_userland_flags ) return { 'flags': final_flags, 'do_cache': True }
Re: vim+YouCompleteMe: basic .ycm_extra_conf.py for /usr/src and bsd.*.mk Makefiles
On Tue, Jan 13, 2015 at 10:33:56PM +0100, Fabian Raetz wrote: > Hi, > > i've been using vim + YouCompleteMe [0] for some time know and it works > pretty well with OpenBSD's src tree. I want to share my > .ycm_extra_conf.py ([1] and below) with you. Maybe someone will > find it usefull. > > This configuration will gather compiler flags (CFLAGS / CPPFLAGS) > from the appropriate Makefiles and should work for userland as well as > the kernel. > > Just put .ycm_extra_conf.py under your SRCDIR (/usr/src) and follow the > HOWTO instructions which you can find in the .ycm_extra_conf.py file. > > This .ycm_extra_conf.py will probably work for other projects as long as > all relevant flags are in CFLAGS / CPPFLAGS. > > > > If someone knows a better solution to read variables from Makefiles, > let me know! :) > > Cheers, > Fabian > > > [0] - https://github.com/Valloric/YouCompleteMe > [1] - https://gist.github.com/Mischi/b8d57f8732b27239469a > > .ycm_extra_conf.py > -- > > # Based on > # https://github.com/Valloric/ycmd/blob/master/cpp/ycm/.ycm_extra_conf.py > > # > # HOWTO > # > # > # === Step 1 > # > # For kernel .c files, CFLAGS / CPPFLAGS from > # the actual kernel configuration are used. > # These are gathered via uname(1). > # > # If you want a specific arch/config, override > # them with 'default_arch' / 'default_config' > # > # NOTE: The choosen kernel configuration must > # exist. > # > # === Step 2 > # > # The following target mimics 'make show' > # from bsd.port.mk(5) and is used to retrieve > # CFLAGS / CPPFLAGS variables from Makefiles. > # > # Copy & Paste the folloing make target > # into your /etc/mk.conf: > # > # myshow: > # .for v in ${myshowvar} > # @echo ${$v} > # .endfor > # > # > # .PHONY: myshow Hmmpf, this breaks normal kernel/port builds. i'm not sure why .. needs some more work -_- > # > > import os > import ycm_core > > default_arch = None > default_config = None > > # You can add additional CFLAGS / CPPFLAGS here. > additional_userland_flags = [ > # "-Weverything" > ] > > additional_kernel_flags = [ > # "-Weverything" > ] > > srcdir = os.path.dirname( os.path.abspath( __file__ ) ) > sysdir = os.path.join(srcdir, "sys") > > def MakeRelativePathsInFlagsAbsolute( flags, working_directory ): > if not working_directory: > return list( flags ) > new_flags = [] > make_next_absolute = False > path_flags = [ '-isystem', '-I', '-iquote', '--sysroot=' ] > for flag in flags: > new_flag = flag > > if make_next_absolute: > make_next_absolute = False > if not flag.startswith( '/' ): > new_flag = os.path.join( working_directory, flag ) > > for path_flag in path_flags: > if flag == path_flag: > make_next_absolute = True > break > > if flag.startswith( path_flag ): > path = flag[ len( path_flag ): ] > new_flag = path_flag + os.path.join( working_directory, path ) > break > > if new_flag: > new_flags.append( new_flag ) > return new_flags > > > def GetKernelFlags( darch, dconfig ): > if darch != None: > arch = darch > else: > arch = os.popen("uname -m").read().rstrip() > > if dconfig != None: > config = dconfig > else: > config = os.popen("uname -v").read().split('#')[0] > > makefiledir = "arch/%s/compile/%s" % ( arch, config ) > makefiledir = os.path.join(sysdir, makefiledir) > return GetFlags( makefiledir ) > > > def GetUserlandFlags( filename ): > makefiledir = os.path.dirname( filename ) > while not "Makefile" in os.listdir( makefiledir ): > makefiledir = os.path.join(makefiledir, "..") > > return GetFlags( makefiledir ) > > > def GetFlags( makefiledir ): > cd_cmd = "cd %s" % makefiledir > make_cmd = "make myshowvar=\"CFLAGS CPPFLAGS\" myshow" > make_flags = os.popen("%s && %s" % (cd_cmd, make_cmd)).read().split() > return MakeRelativePathsInFlagsAbsolute( make_flags, makefiledir ) > > > > > def FlagsForFile( filename ): > if filename.startswith( sysdir ): > final_flags = GetKernelFlags( default_arch , default_config ) > final_flags.extend( additional_kernel_flags ) > > elif filename.startswith( srcdir ): > final_flags = GetUserlandFlags( filename ) > final_flags.extend( additional_userland_flags ) > > return { > 'flags': final_flags, > 'do_cache': True > }
Automatically start cwm
Dear OpenBSD fellows, I'm looking at using OpenBSD for digital signage, therefore I need to automatically start a X session with cwm. The problem is, is that xdm does not support automatic logins, which I understand, because it is a security concern for regular desktop setups. Although for this, possibly rare case, what is the recommended way to start it? I have tried adding the following line to /etc/rc.local: su - $user -c 'startx -- nocursor' The problem with this, is that it prevents the system from fully booting, I discovered this when my cronjob didn't work. So my question, how should I start it? (also without cursor)
Re: Routing tables and pf rules with using 2 DHCP WAN interfaces ...
On Mon, Aug 04, 2014 at 08:39:10PM +0200, Christophe wrote: > Hi misc@, > > I was wondering about the behavior of OpenBSD in this case (not a > production case at this time). > > 2 WAN interfaces (Ethernet / IPv4 DHCP) , linked to an OpenBSD box and 1 > LAN interface (Ethernet / IPv4 static address) > > WAN1 (em0 DHCP) - > |--- OpenBSD - LAN (em2 static) > WAN2 (em1 DHCP) - > > DHCP is providing a default gateway for the 2 WAN interfaces (and can > potentially change). > > First of all : > If only "dhcp" is specified in /etc/hostname.em[0|1] files, which of > these interfaces will provide the default gateway ? Is there a > precedence in this case ? Maybe giving one of your interfaces a lower "priority" could solve this problem in a simple setup? > > Otherwise, is there anyway to specify a routing table in /etc/hostname.X > while using DHCP ? > > Second question : > I used to write route-to and reply-to rules in pf.conf in a static context. > As far as I've seen, there are modifiers on interface specifications > like :network or :peer. But is there a :gateway or something similar > telling pf to use the defaut gateway learned by DHCP on the specified > interface ? > > Thanks and regards, > Christophe.
Re: ifconfig scan while connected
On Sun, Sep 07, 2014 at 02:11:04PM +0200, Mike Burns wrote: > A `sudo ifconfig iwn0 scan' works but only if the device is disconnected. Is > this expected behavior? Is this specific to my card? Am I interpreting > the results correctly? Hi, this is a known problem with the iwn(4) driver. I'm in the process of backporting a patch from FreeBSD, which seems to fix the problem. Running here with this patch for an hour or so and can scan with iwn running and it continues to work. I'll probably send a patch to tech@ next week. Regards, Fabian > > I'd like to be able to see other networks while remaining connected. > > These are the results I am interpreting: > > $ sudo ifconfig iwn0 scan > iwn0: flags=28843 mtu 1500 > lladdr 84:3a:4b:0a:ae:80 > priority: 4 > groups: wlan egress > media: IEEE802.11 autoselect (OFDM54 mode 11g) > status: active > ieee80211: nwid ComHem chan 1 bssid a0:21:b7:e8:2c:29 212dB > wpakey 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef > wpaprotos wpa1,wpa2 wpaakms psk wpaciphers tkip,ccmp wpagroupcipher tkip > inet 192.168.0.13 netmask 0xff00 broadcast 192.168.0.255 > $ sudo ifconfig iwn0 -wpakey > $ sudo ifconfig iwn0 scan > iwn0: flags=28843 mtu 1500 > lladdr 84:3a:4b:0a:ae:80 > priority: 4 > groups: wlan egress > media: IEEE802.11 autoselect (OFDM54) > status: no network > ieee80211: nwid ComHem > nwid dlink chan 6 bssid 00:1c:f0:84:01:f0 171dB 54M > short_preamble,short_slottime > [ ... and so on ... ] > > pcidump and dmesg below. Want anything else? > > $ sudo pcidump -vv 3:0:0 > 3:0:0: Intel Centrino Advanced-N 6205 > 0x: Vendor ID: 8086 Product ID: 0085 > 0x0004: Command: 0006 Status: 0010 > 0x0008: Class: 02 Subclass: 80 Interface: 00 Revision: 96 > 0x000c: BIST: 00 Header Type: 00 Latency Timer: 00 Cache Line Size: 10 > 0x0010: BAR mem 64bit addr: 0xf0c0/0x2000 > 0x0018: BAR empty () > 0x001c: BAR empty () > 0x0020: BAR empty () > 0x0024: BAR empty () > 0x0028: Cardbus CIS: > 0x002c: Subsystem Vendor ID: 8086 Product ID: c220 > 0x0030: Expansion ROM Base Address: > 0x0038: > 0x003c: Interrupt Pin: 01 Line: 0a Min Gnt: 00 Max Lat: 00 > 0x00c8: Capability 0x01: Power Management > 0x00d0: Capability 0x05: Message Signaled Interrupts (MSI) > 0x00e0: Capability 0x10: PCI Express > Link Speed: 2.5 / 2.5 GT/s Link Width: x1 / x1 > > $ dmesg > OpenBSD 5.6 (GENERIC.MP) #320: Mon Aug 4 23:46:51 MDT 2014 > dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP > real mem = 8255762432 (7873MB) > avail mem = 8027209728 (7655MB) > mpath0 at root > scsibus0 at mpath0: 256 targets > mainbus0 at root > bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xdae9d000 (71 entries) > bios0: vendor LENOVO version "G6ET93WW (2.53 )" date 02/04/2013 > bios0: LENOVO 3444CUU > acpi0 at bios0: rev 2 > acpi0: sleep states S0 S3 S4 S5 > acpi0: tables DSDT FACP SLIC TCPA SSDT SSDT SSDT HPET APIC MCFG ECDT FPDT > ASF! UEFI UEFI MSDM SSDT SSDT UEFI SSDT DBG2 > acpi0: wakeup devices LID_(S4) SLPB(S3) IGBE(S4) EXP2(S4) XHCI(S3) EHC1(S3) > EHC2(S3) HDEF(S4) > acpitimer0 at acpi0: 3579545 Hz, 24 bits > acpihpet0 at acpi0: 14318179 Hz > acpimadt0 at acpi0 addr 0xfee0: PC-AT compat > cpu0 at mainbus0: apid 0 (boot processor) > cpu0: Intel(R) Core(TM) i7-3667U CPU @ 2.00GHz, 1896.03 MHz > cpu0: > FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS > cpu0: 256KB 64b/line 8-way L2 cache > cpu0: smt 0, core 0, package 0 > mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges > cpu0: apic clock running at 99MHz > cpu0: mwait min=64, max=64, C-substates=0.2.1.1.2, IBE > cpu1 at mainbus0: apid 1 (application processor) > cpu1: Intel(R) Core(TM) i7-3667U CPU @ 2.00GHz, 1895.70 MHz > cpu1: > FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS > cpu1: 256KB 64b/line 8-way L2 cache > cpu1: smt 1, core 0, package 0 > c
X11/RANDR Screen Change Notification doesn't work?
Hi all, i want to automatically execute some scripts when my monitor setup changes (plug in/out a monitor via VGA). Is there a utility in base which can do this? I imported x11/srandrd into openbsd-wip which subscribes to the Randr RROutputChange event and made a second small test program which uses xcb to listen for the XCB_RANDR_SCREEN_CHANGE_NOTIFY event. Both programs don't work for me on OpenBSD, as they fire the events only if i manually call `xrandr --auto` after i changed my monitor setup. I tested both programs on Linux Mint 17 Cinnamon and they work there as expected. Does somebody of you know why this is not working on OpenBSD? Regards, Fabian Makefile PROG = monplugd NOMAN = NOMAN LDADD +=-L/usr/X11R6/lib LDADD +=-lxcb -lxcb-util -lxcb-randr CFLAGS += -I/usr/X11R6/include -Wall CFLAGS += -Wstrict-prototypes -Wmissing-prototypes CFLAGS += -Wmissing-declarations CFLAGS += -Wshadow -Wpointer-arith CFLAGS += -Wsign-compare DEBUG = -g .include monplugd.c /* * Copyright (c) 2014 Fabian Raetz * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include #include #include #include #include #include int main(int argc, char *argv[]) { const xcb_query_extension_reply_t *extreply; xcb_screen_t*root_screen; xcb_connection_t*conn; xcb_generic_event_t *evt; xcb_randr_screen_change_notify_event_t *sce; int screen, evt_base; if ((conn = xcb_connect(NULL, &screen)) == NULL || xcb_connection_has_error(conn)) errx(1, "cannot open display\n"); root_screen = xcb_aux_get_screen(conn, screen); extreply = xcb_get_extension_data(conn, &xcb_randr_id); if (!extreply->present) errx(1, "no xrandr present"); evt_base = extreply->first_event; xcb_randr_select_input(conn, root_screen->root, XCB_RANDR_NOTIFY_MASK_SCREEN_CHANGE); xcb_flush(conn); while ((evt = xcb_wait_for_event(conn))) { switch (evt->response_type - evt_base) { case XCB_RANDR_SCREEN_CHANGE_NOTIFY: sce = (xcb_randr_screen_change_notify_event_t *)evt; printf("screen change notification\n"); break; default: printf("unknown event %d\n", evt->response_type - evt_base); } free(evt); } return (0); }
ksh: expr 2147483648 / 2 = -1073741824 expected behavior or bug?
Hi misc@, while calculating my phys. memory (mb) with the folllowing shellsript i get as a result -424. sysctl -n hw.physmem returns 3849830400 #!/bin/sh phys_mem_bytes=`sysctl -n hw.physmem` phys_mem_mb=`expr $phys_mem_bytes / 1024 / 1024` echo $phys_mem_mb -- so i tried expr 2147483647 / 2 which returns 1073741824 while expr 2147483648 / 2 returns -1073741824 ksh(1) states that expr does Integer arithmetic. So is this the expected behaviour or a bug? Regards, Fabian Raetz
Re: ksh: expr 2147483648 / 2 = -1073741824 expected behavior or bug?
On Tue, Feb 25, 2014 at 02:00:49AM +0100, Ingo Schwarze wrote: > Hi Fabian, > > Fabian Raetz wrote on Mon, Feb 24, 2014 at 10:59:34PM +0100: > > > while calculating my phys. memory (mb) with the > > folllowing shellsript i get as a result -424. > > > > sysctl -n hw.physmem returns 3849830400 > > > > > > #!/bin/sh > > > > phys_mem_bytes=`sysctl -n hw.physmem` > > phys_mem_mb=`expr $phys_mem_bytes / 1024 / 1024` > > echo $phys_mem_mb > > -- > > > > so i tried > > expr 2147483647 / 2 which returns 1073741824 while > > expr 2147483648 / 2 returns -1073741824 > > > > ksh(1) states that expr does Integer arithmetic. > > So is this the expected behaviour or a bug? > > How strange, six replies but nobody answered your question... > > The above behaviour is required by POSIX: > > http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap01.html#tag_17_01_02_01 > > "Integer variables and constants, including the values of operands >and option-arguments, used by the standard utilities listed in >this volume of POSIX.1-2008 shall be implemented as equivalent >to the ISO C standard signed long data type; floating point shall >be implemented as equivalent to the ISO C standard double type. >Conversions between types shall be as described in the ISO C >standard. All variables shall be initialized to zero if they are >not otherwise assigned by the input to the application. > >Arithmetic operators and control flow keywords shall be implemented >as equivalent to those in the cited ISO C standard section, as >listed in Selected ISO C Standard Operators and Control Flow >Keywords." > > So, POSIX *requires* that the output of "expr 2147483648 + 0" > and "sh -c 'echo $((2147483648 + 0))'" be machine dependent. > For example, on i386, where "long" is 32 bit, it must be negative, > but on amd64, where long is 64 bit, it must be positive. > I guess it was a bad idea to have the standard require such > weirdness; then again, this isn't exactly the only place > where POSIX requires, well, weird behaviour. Hi, i should have included that i'm running amd64 and "expr 2147483648 + 0" returns -2147483647 while "sh -c 'echo $((2147483648 + 0))'" returns 1073741824 as expected. This looks like expr is broken as Philip noted. I'm pretty new to shell programming and the behavior required by POSIX makes no sense to me at all how could i ever trust in expr with unknown numbers? For now, i will go with the perl based solution suggested by Stuart. Thanks to all, Fabian
P2V with VMWare -> "ERR M"
Hello I have an old box (3.6) which makes a lot of noise, so i like to virtualize it. I made an Image with acronis and converted it with vmware converter. When i start the virtual machine "Loading... ERR M" is shown. (dmesg at the bottom) I loaded cd36.iso as cdrom and at the boot prompt tried the following: > machine boot hd0b -> ERR M > boot hd0a:/bsd -> Invalid argument failed(22). will try /bsd also with hd0b, hd0c if i boot with the cd, select shell and run the following # mount /dev/sd0c /mnt i get "Inappropriate filetype or format". also with /dev/sd0a - d If i run # cp /usr/mdec/boot /boot # /usr/mdec/installboot -v /boot /usr/mdec/biosboot sd0 i get the following output: -8<-- boot: /boot proto: /usr/mdec/biosboot device: /dev/rsd0c /usr/mdec/biosboot: entry point 0 proto bootblock size 512 installboot: cross-device install -8<-- but the error persists. Does anyone have an idea what i'm doing wrong? Other Openbsd machines which i installed from scratch to a virtual machine are running fine. Thank You Fabian Infos: 00 Virtual machine running in VMWare Server 2 Beta Ubuntu 7.10 as Host New Box infos unfortunately only as pictures New Box dmesg http://www.w3p.ch/tmpp/openbsd/dmesg.gif New Box fdisk http://www.w3p.ch/tmpp/openbsd/fdisk.gif New Box disklabel http://www.w3p.ch/tmpp/openbsd/disklabel.gif Old box dmesg (http://www.w3p.ch/tmpp/openbsd/dmesg.txt) -8<-- OpenBSD 3.6-stable (GENERIC) #1: Sun Jun 12 16:14:49 CEST 2005 [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC cpu0: Intel Pentium III ("GenuineIntel" 686-class) 592 MHz cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,F XSR,SSE real mem = 267948032 (261668K) avail mem = 237608960 (232040K) using 3296 buffers containing 13500416 bytes (13184K) of memory mainbus0 (root) bios0 at mainbus0: AT/286+(69) BIOS, date 02/29/00, BIOS32 rev. 0 @ 0xfd7d2 pcibios0 at bios0: rev 2.1 @ 0xfd7d0/0x830 pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfdf00/224 (12 entries) pcibios0: PCI Exclusive IRQs: 9 pcibios0: PCI Interrupt Router at 000:15:0 ("ServerWorks ROSB4 SouthBridge" rev 0x00) pcibios0: PCI bus #0 is the last bus bios0: ROM list: 0xc/0x8000 0xc8000/0x800 0xc8800/0xc00 0xc9800/0x800 cpu0 at mainbus0 pci0 at mainbus0 bus 0: configuration mode 1 (no bios) pchb0 at pci0 dev 0 function 0 "ServerWorks CNB20LE Host" rev 0x05 pchb1 at pci0 dev 0 function 1 "ServerWorks CNB20LE Host" rev 0x05 pci1 at pchb1 bus 3 ppb0 at pci1 dev 2 function 0 "Intel i960 RP PCI-PCI" rev 0x05 pci2 at ppb0 bus 4 ami0 at pci1 dev 2 function 1 "Intel 80960RP ATU" rev 0x05: irq 11 HP 466/32b ami0: FW F.02.02, BIOS vB.02.01, 16MB RAM ami0: 1 channels, 16 targets, 1 logical drives scsibus0 at ami0: 8 targets sd0 at scsibus0 targ 0 lun 0: SCSI2 0/direct fixed sd0: 17354MB, 2212 cyl, 255 head, 63 sec, 512 bytes/sec, 35540992 sec total xl0 at pci1 dev 5 function 0 "3Com 3c905C 100Base-TX" rev 0x78: irq 9xl0: reset didn't complete , address 00:0a:5e:50:fc:0b exphy0 at xl0 phy 24: 3Com internal media interface xl0: reset didn't complete siop0 at pci1 dev 6 function 0 "Symbios Logic 53c896" rev 0x06: irq 5, using 8K of on-board RAM scsibus1 at siop0: 16 targets siop1 at pci1 dev 6 function 1 "Symbios Logic 53c896" rev 0x06: irq 5, using 8K of on-board RAM scsibus2 at siop1: 16 targets st0 at scsibus2 targ 3 lun 0: SCSI2 1/sequential removable st0: drive empty or not ready fxp0 at pci0 dev 4 function 0 "Intel 82557" rev 0x08: irq 9, address 00:10:83:fc:c9:3d inphy0 at fxp0 phy 1: i82555 10/100 media interface, rev. 4 vga1 at pci0 dev 5 function 0 "ATI Mach64 GY" rev 0x7a wsdisplay0 at vga1: console (80x25, vt100 emulation) wsdisplay0: screen 1-5 added (80x25, vt100 emulation) pcib0 at pci0 dev 15 function 0 "ServerWorks ROSB4 SouthBridge" rev 0x4f pciide0 at pci0 dev 15 function 1 "ServerWorks OSB4 IDE" rev 0x00: DMA atapiscsi0 at pciide0 channel 0 drive 0 scsibus3 at atapiscsi0: 2 targets cd0 at scsibus3 targ 0 lun 0: SCSI0 5/cdrom removable cd0(pciide0:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 2 isa0 at pcib0 isadma0 at isa0 pckbc0 at isa0 port 0x60/5 pckbd0 at pckbc0 (kbd slot) pckbc0: using irq 1 for kbd slot wskbd0 at pckbd0: console keyboard, using wsdisplay0 pcppi0 at isa0 port 0x61 midi0 at pcppi0: sysbeep0 at pcppi0 lpt0 at isa0 port 0x378/4 irq 7 npx0 at isa0 port 0xf0/16: using exception 16 pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo pccom1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo fdc0 at isa0 port 0x3f0/6 irq 6 drq 2 fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec biomask fd65 netmask ff65 ttymask ffe7 pctr: 686-class user-level performance counters enabled mtrr: Pentium
Re: P2V with VMWare -> "ERR M"
Nick, thank you for taking the time to answer my questions. As you successfully detected, i have done some brute force with no luck. Thank you for your tip about dump/restore, i applied it with success. With the help of a OpenBSD live CD i managed to do some instant dump & restore over the network. For this i used a command sequence like the following for each partition: # mount /dev/sd0a /mnt/hd1 # cd /mnt/hd1 # ssh 192.168.1.52 dump -0f - /dev/sd0a | restore -rvf - # cd / # umount /dev/sd0a At the end I installed the boot loader as described in the manpages with success. What was confusing me was that "fdisk /dev/sd0c" returns the same as the proper "fdisk /dev/sd0" which mixed up my idea of the things. Fabian Fabian Heusser wrote: > Hello > > I have an old box (3.6) which makes a lot of noise, so i like to > virtualize it. I made an Image with acronis and converted it with > vmware converter. > When i start the virtual machine "Loading... ERR M" is shown. (dmesg > at the bottom) > > I loaded cd36.iso as cdrom and at the boot prompt tried the following: > >> machine boot hd0b -> ERR M I'm surprised you get THAT error, but it is a nonsense command. >> boot hd0a:/bsd -> Invalid argument failed(22). will try /bsd > also with hd0b, hd0c um. did you really think that /bsd might be on the b, c, or d partitions?? > if i boot with the cd, select shell and run the following > # mount /dev/sd0c /mnt > i get "Inappropriate filetype or format". also with /dev/sd0a - d I'd *hope* you can't mount sd0c like that. > If i run > # cp /usr/mdec/boot /boot > # /usr/mdec/installboot -v /boot /usr/mdec/biosboot sd0 > i get the following output: > -8<-- > boot: /boot > proto: /usr/mdec/biosboot > device: /dev/rsd0c > /usr/mdec/biosboot: entry point 0 > proto bootblock size 512 > installboot: cross-device install > -8<-- > but the error persists. You couldn't read the file system, so you figured you would just run a utility to alter a random sector someplace on the disk. Did you notice the little error message? "cross-device install"??? Read the man page, read the FAQ, and think about that command. > Does anyone have an idea what i'm doing wrong? Almost everything so far. You can't just type random commands without understanding what you are saying to the computer. What you are doing is very, very dangerous. If you want to get some idea what went wrong, boot a CD, and do a disklabel sd0 and fdisk sd0, see what that tells you. There was obviously something that went very wrong with your imaging transfer process, which doesn't surprise me, the process of migrating OpenBSD is so simple, it is hard to get anyone worried about making a special tool, 'specially since it wouldn't have this kind of flexibility. Quit using special tools, and use the OS. SIMPLE way: dump(8) each existing partition to a file, move the file, then restore(8) the files to the partitions of the new disk. Install your boot loader (PROPERLY this time), and done. And YES, I am being deliberately vague about how to do this. You need to spend some time with the man pages and the FAQ and thinking about how things work, not magic commands to type. The PROPER way of doing this, however, being this is a many year old, unmaintained install, is to build a new 4.2 or 4.3 system, install the apps, and transfer the data files. I'm guessing it is a screwed up system, or it would have been properly maintained and be running 4.2 now. So, why would you want to blindly migrate a mess to new hardware? Nick.
Re: P2V with VMWare -> "ERR M"
Sorry, I refered to the second example in installboot(8) : http://www.openbsd.org/cgi-bin/man.cgi?query=installboot&apropos=0&sektion=0&; manpath=OpenBSD+Current&arch=i386&format=html It's the same as this step from your linked FAQ # cp /usr/mdec/boot /mnt/boot # /usr/mdec/installboot -v /mnt/boot /usr/mdec/biosboot sd0 Yes a howto would be nice, for windows there are many, for linux some, and for Openbsd not so many. But as Nick said, it's realy simple if you go the dump/restore route. It's 90% percent of the FAQ you are referring. But If you go the Diskimage route it's not so easy. In the FAQ, they restore first / and boot into single user mode and then restore the rest. Does somone know if it makes any difference if i restore all partitions in one step and then booting in the finished restore? On Wed, Feb 27, 2008 at 3:32 PM, Zlfar M. E. Johnson <[EMAIL PROTECTED]> wrote: > Hi, > > Did you use http://www.openbsd.org/faq/faq14.html#Backup to restore your old > box to a vmware server image. The only part I am confused by is " At the end > > I installed the boot loader as described in the manpages with success." What > man page are you referring to? What steps did you use to restore the boot > loader? Just curious. Could be good fodder for setting up a wiki or howto > for transferring openbsd physical setups to virtual setups on vmware. > > > > Zlfar M. E. Johnson > Sk}rr > > [EMAIL PROTECTED] > 569 5100 > http://www.skyrr.is > > http://www.skyrr.is/legal/disclaimer.txt > > > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of > Fabian Heusser > Sent: 26. febrzar 2008 23:48 > To: misc@openbsd.org > Subject: Re: P2V with VMWare -> "ERR M" > > Nick, thank you for taking the time to answer my questions. > > As you successfully detected, i have done some brute force with no luck. > > Thank you for your tip about dump/restore, i applied it with success. > With the help of a OpenBSD live CD i managed to do some instant dump & > restore over the network. > For this i used a command sequence like the following for each partition: > > # mount /dev/sd0a /mnt/hd1 > # cd /mnt/hd1 > # ssh 192.168.1.52 dump -0f - /dev/sd0a | restore -rvf - > # cd / > # umount /dev/sd0a > > At the end I installed the boot loader as described in the manpages > with success. > > What was confusing me was that "fdisk /dev/sd0c" returns the same as > the proper "fdisk /dev/sd0" which mixed up my idea of the things. > > Fabian > > > > > Fabian Heusser wrote: > > Hello > > > > I have an old box (3.6) which makes a lot of noise, so i like to > > virtualize it. I made an Image with acronis and converted it with > > vmware converter. > > When i start the virtual machine "Loading... ERR M" is shown. (dmesg > > at the bottom) > > > > I loaded cd36.iso as cdrom and at the boot prompt tried the following: > > > >> machine boot hd0b -> ERR M > > I'm surprised you get THAT error, but it is a nonsense command. > > >> boot hd0a:/bsd -> Invalid argument failed(22). will try /bsd > > also with hd0b, hd0c > > um. did you really think that /bsd might be on the b, c, or d > partitions?? > > > if i boot with the cd, select shell and run the following > > # mount /dev/sd0c /mnt > > i get "Inappropriate filetype or format". also with /dev/sd0a - d > > I'd *hope* you can't mount sd0c like that. > > > If i run > > # cp /usr/mdec/boot /boot > > # /usr/mdec/installboot -v /boot /usr/mdec/biosboot sd0 > > i get the following output: > > -8<-- > > boot: /boot > > proto: /usr/mdec/biosboot > > device: /dev/rsd0c > > /usr/mdec/biosboot: entry point 0 > > proto bootblock size 512 > > installboot: cross-device install > > -8<-- > > but the error persists. > > You couldn't read the file system, so you figured you would just > run a utility to alter a random sector someplace on the disk. > > Did you notice the little error message? "cross-device install"??? > > Read the man page, read the FAQ, and think about that command. > > > Does anyone have an idea what i'm doing wrong? > > Almost everything so far. > You can't just type random commands without understanding > what you are saying to the computer. What you are doing is > very, very dangerous. > > If
Re: P2V with VMWare -> "ERR M"
I used Acronis (like Ghost) to get an image and converted it with vmware converter to a virtual machine. but the file system was not useable after this procedure. On Thu, Feb 28, 2008 at 10:52 AM, Zlfar M. E. Johnson <[EMAIL PROTECTED]> wrote: > Thanks for the replay. I was not sure which man page you were referring to, but I took a quick glance at installboot. > I have often cloned linux systems at work with rsync. I have also done bare-bone restores using system-rescue cd and backups from our backup system. I thought it would be interesting to see how others do it with openbsd. > What exactly are you referring to " Diskimage route it's not so easy."? Are you referring to cloning the system? Similar to this example http://www.monkey.org/openbsd/archive/tech/0112/msg00079.html > What tool does one use to Diskimage the system? > You could probably try this tool if I understand what you mean by "Diskimage" http://sanbarrow.com/moa-video-vdiskmanager-as-ghost.html > > > > > Zlfar M. E. Johnson > Sk}rr > > > [EMAIL PROTECTED] > 569 5100 > http://www.skyrr.is > > http://www.skyrr.is/legal/disclaimer.txt > -Original Message- > > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Fabian Heusser > Sent: 27. febrzar 2008 17:47 > To: Zlfar M. E. Johnson > Subject: Re: P2V with VMWare -> "ERR M" > > Sorry, I refered to the second example in installboot(8) : > http://www.openbsd.org/cgi-bin/man.cgi?query=installboot&apropos=0&sektion=0&; manpath=OpenBSD+Current&arch=i386&format=html > > It's the same as this step from your linked FAQ > # cp /usr/mdec/boot /mnt/boot > # /usr/mdec/installboot -v /mnt/boot /usr/mdec/biosboot sd0 > > Yes a howto would be nice, for windows there are many, for linux some, > and for Openbsd not so many. > But as Nick said, it's realy simple if you go the dump/restore route. > It's 90% percent of the FAQ you are referring. But If you go the > Diskimage route it's not so easy. > > In the FAQ, they restore first / and boot into single user mode and > then restore the rest. > Does somone know if it makes any difference if i restore all > partitions in one step and then booting in the finished restore? > > > > On Wed, Feb 27, 2008 at 3:32 PM, Zlfar M. E. Johnson > <[EMAIL PROTECTED]> wrote: > > Hi, > > > > Did you use http://www.openbsd.org/faq/faq14.html#Backup to restore your old > > box to a vmware server image. The only part I am confused by is " At the end > > > > I installed the boot loader as described in the manpages with success." What > > man page are you referring to? What steps did you use to restore the boot > > loader? Just curious. Could be good fodder for setting up a wiki or howto > > for transferring openbsd physical setups to virtual setups on vmware. > > > > > > ____ > > Zlfar M. E. Johnson > > Sk}rr > > > > [EMAIL PROTECTED] > > 569 5100 > > http://www.skyrr.is > > > > http://www.skyrr.is/legal/disclaimer.txt > > > > > > > > -Original Message- > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of > > Fabian Heusser > > Sent: 26. febrzar 2008 23:48 > > To: misc@openbsd.org > > Subject: Re: P2V with VMWare -> "ERR M" > > > > Nick, thank you for taking the time to answer my questions. > > > > As you successfully detected, i have done some brute force with no luck. > > > > Thank you for your tip about dump/restore, i applied it with success. > > With the help of a OpenBSD live CD i managed to do some instant dump & > > restore over the network. > > For this i used a command sequence like the following for each partition: > > > > # mount /dev/sd0a /mnt/hd1 > > # cd /mnt/hd1 > > # ssh 192.168.1.52 dump -0f - /dev/sd0a | restore -rvf - > > # cd / > > # umount /dev/sd0a > > > > At the end I installed the boot loader as described in the manpages > > with success. > > > > What was confusing me was that "fdisk /dev/sd0c" returns the same as > > the proper "fdisk /dev/sd0" which mixed up my idea of the things. > > > > Fabian > > > > > > > > > > Fabian Heusser wrote: > > > Hello > > > > > > I have an old box (3.6) which makes a lot of noise, so i like to > > > virtualize it. I made an Image with a
Re: Squid 2.6 transparent proxy with pf
Dominik Zalewski <[EMAIL PROTECTED]> wrote: > On Thursday 21 December 2006 15:04, Peter N. M. Hansteen wrote: > > Dominik Zalewski <[EMAIL PROTECTED]> writes: > > > I have OpenBSD 4.0 firewall and I would like to redirect all outgoing > > > http requests to my squid web proxy. > > > > Daniel Hartmeier wrote about this a while back, his article can be > > found at http://www.benzedrine.cx/transquid.html > > In this article squid is running on the same machine as OpenBSD > firewall. In my case I have squid running on different machine connected > to LAN interface. My question is can redirect traffic on $int_if to > another machine connected to the same interface? Does this rule is > corrrect ? > > rdr pass on $int_if proto tcp from any to any port 80 -> $squid port 8080 > > pfctl doesnt complain about nothing but its simply doesnt work. I believe Squid's intercepting mode relies on PF's DIOCNATLOOK ioctl to get an idea what the real destination was. I don't know if this information can be pfsync'ed between different machines, but from the man page I would assume that it's currently not possible (I only checked on FreeBSD 6.2-PRERELEASE, my pfsync version might be a few steps behind the one on OpenBSD 4.0). If it's not possible you probably have to move Squid to the box where PF is running, or use a proxy that extracts the destination from the host header. Unless with DIOCNATLOOK, this doesn't work for HTTP/1.0 requests without host headers, but with recent clients this shouldn't be an issue. Privoxy 3.0.7 (unreleased, only available trough CVS) does this and you could still use Squid as caching proxy, but Privoxy's intercepting mode is rather new and you would probably be the second tester ... Fabian -- http://www.fabiankeil.de/
Re: Squid 2.6 transparent proxy with pf
Fabian Keil <[EMAIL PROTECTED]> wrote: > Dominik Zalewski <[EMAIL PROTECTED]> wrote: > > > On Thursday 21 December 2006 15:04, Peter N. M. Hansteen wrote: > > > Dominik Zalewski <[EMAIL PROTECTED]> writes: > > > > I have OpenBSD 4.0 firewall and I would like to redirect all > > > > outgoing http requests to my squid web proxy. > > > > > > Daniel Hartmeier wrote about this a while back, his article can be > > > found at http://www.benzedrine.cx/transquid.html > > > > In this article squid is running on the same machine as OpenBSD > > firewall. In my case I have squid running on different machine > > connected to LAN interface. My question is can redirect traffic on > > $int_if to another machine connected to the same interface? Does this > > rule is corrrect ? > I believe Squid's intercepting mode relies on PF's DIOCNATLOOK > ioctl to get an idea what the real destination was. You can safely ignore my posting. According to Daniel's article Squid can use the host header as well and even does it by default. Fabian -- http://www.fabiankeil.de/
Re: Squid -> Privoxy -> Tor
Peter_APIIT <[EMAIL PROTECTED]> wrote: > I configure Privoxy and Tor first but Why when i try Privoxy with Tor, it > say No such domain and Error 404 is displayed ? Maybe because your Privoxy version is out of date and Tor isn't running. Did you miss the FAQ? http://www.privoxy.org/faq/misc.html#TOR > My configuration for Privoxy and Tor is as below : > > /etc/privoxy/conf > Quote: > configdir /etc/privoxy/conf > logdir /var/log/privoxy > logfile logfile > listen-address 172.16.10.1:8118 > toggle 1 > buffer_limit 4096 > forward-socks4a / 127.0.0.1:9050 . Is that the complete file? > /etc/torrc > Quote: > SocketListenAddress 127.0.0.1 That's not a valid option. You probably meant SocksListenAddress. Fabian
Re: Is it possible to run named not in chroot?
On Tue, Jun 28, 2005 at 12:53:41AM -0500, Rene Rivera wrote: > The man page is wrong. It says: > >When invoked without arguments, named will fork into two >processes for privilege separation.chroot() to >/var/named,read the default configuration file >/var/named/etc/named.conf, read any initial data, and lis- >ten for queries. > > But it took me a good hour after I posted my question, after already > trying for 2 hours, to figure out that what it really means is: > >When invoked without the "-t" argument... No arguments implies there is no -t option. There is also a -c option to read a configuration file specified on the command line, and it says where the configuration is read from if you omit that. If you had invoked it with the -v option, it would've printed the version number and exited. So what it really means is what it actually says, and I can't construe it to be incorrect in any way. Being frustrated, missing information or not linking information in other parts of the page, and not understanding the implications of what's written doesn't make the man page wrong. There's plenty of incorrect information out there in manual pages, but not this bit of this man page. -- Adam Fabian <[EMAIL PROTECTED]>
Re: Is it possible to run named not in chroot?
On Tue, Jun 28, 2005 at 11:42:57AM -0500, Rene Rivera wrote: > ability to multi-mount filesystems. Instead of using the chroot > sledgehammer. The version integrated with OpenBSD is probably better, particularly on OpenBSD. If you can't get around the chroot problem with symbolic links, or chrooting into /export, I believe it's pretty easy to compile BIND from the distributor's sources on OpenBSD. -- Adam Fabian <[EMAIL PROTECTED]>
Re: Hidden "restore" space on laptop drives
On Tue, Jul 05, 2005 at 08:31:31AM +1000, Rod.. Whitworth wrote: > I was able to do some work on a desktop drive a while back from an IBM > desktop box and I had no luck working out how to get to the missing > space to back it up. Mrs Google got lots of hits but if there was a > signal in there I didn't hear it due to all the noise. > > Does anybody here know how the space is hidden and how to unhide/rehide > it so as to do what I want? There's a flag in the standard (ha-ha) x86 partition table that allows you to hide the partition. Aside from that, it's a matter of having tools that allow you to do what you want to do. A BSD disklabel need pay no particular respect to the BIOS, and once you have the raw sector numbers of the partition, you can dd the data anywhere you want. It shouldn't be too wasteful, because they typically compress the data and don't partition more space than they have to. But in all likelihood, there's a FAT or FAT32 filesystem, and whatever lame restore program they have looks at the third primary partition, or whatever, assumes it's going to find a FAT filesystem and possibly a Symantec Ghost image fo the OS partition as shipped, or some other files (necessarily split into 2 GB pieces on a FAT filesystem) to restore the dsik. Intelligent guesswork + disk powertools that do what you tell them to do and don't ask questions. You should probably image the *whole* disk before you do anything. -- Adam Fabian <[EMAIL PROTECTED]>
Re: Building READMEs
On Tue, Jul 05, 2005 at 06:49:40PM +0200, viq wrote: > something else is/was. VMWare... I trade 8 hours and possible reboot > for no reboot and 13 hours ;P So i was hoping for a way to do it on > linux, but if you say it's much more effort than it's worth... Though > i'm still somewhat tempted to give it a go. Someone mentioned VMWare. It's not a bad idea. You could export the filesystem read/write via NFS, mount it in the virtual machine running OpenBSD (bochs and qemu are free alternatives to vmware), and make the readmes there. Granted, harddisks generate plenty of heat, if that's your problem. You could do it all in the virtual machine, tar them up, and drop them in place on the 188 MHz machine if you need to avoid running the HD so much. -- Adam Fabian <[EMAIL PROTECTED]>
Re: Building READMEs
On Wed, Jul 06, 2005 at 08:40:52AM +0200, viq wrote: > ok, NOW i'm baffled - it finished building them without a problem - > which makes me think the problem before was not with hardware... Mostly, problems that manifest inconsistently are indicative of hardware problems, except in complex interactions between badly designed pieces of software. -- Adam Fabian <[EMAIL PROTECTED]>
Possible to completely/reliably backup/dump a live filesystem?
Does OpenBSD provide any facilities similar to FreeBSD's ufs (or maybe it's ufs2 only, not sure off of the top of my head) filesystem snapshots, or any other facilite for complete, reliable backups of live filesystems? I'll piggyback another quick question, seeing as it also has something to do with 'live files.' Are there any circumstances under which an update to a system file are not written to disk, if the filesystem is in use? Well, I assume the file could be locked in some way, for modification. I suppose my real question is, say, for instance, with the recent zlib patch, do you have to go single-user to make absolutely sure that the library is updated on disk? -- Adam Fabian <[EMAIL PROTECTED]>
Re: make release - bfd/mybfd.h - no such file
On Sat, Jul 09, 2005 at 09:14:21AM +0100, Jonas Melian wrote: > What happens is that 'Building a Release' is in a different point > (5.4) and it seems that it doesn't have anything to do with the > previous point. When it depends on the previous point (5.3.5) for > build the release. That confuses a little. And why I have seen, I > haven't been the unique one. The bottom of section 5.4 expressly states that it is not the definitive reference for release building, but release(8) is. In all cases, the manual pages are authoritative and all other documentation is supplementary. -- Adam Fabian <[EMAIL PROTECTED]>
Can't make 3.7-stable release (tries to exceed capacity of /dev/svnd0a?)
il mem = 175558656 (171444K) using 2464 buffers containing 10092544 bytes (9856K) of memory mainbus0 (root) bios0 at mainbus0: AT/286+(78) BIOS, date 05/12/99, BIOS32 rev. 0 @ 0xfb170 apm0 at bios0: Power Management spec V1.2 apm0: AC on, battery charge unknown pcibios0 at bios0: rev 2.1 @ 0xf/0xb5f0 pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfddc0/96 (4 entries) pcibios0: PCI Exclusive IRQs: 9 10 11 pcibios0: PCI Interrupt Router at 000:31:0 ("Intel 82371SB ISA" rev 0x00) pcibios0: PCI bus #1 is the last bus bios0: ROM list: 0xc/0x8000 0xc8000/0x2000! cpu0 at mainbus0 pci0 at mainbus0 bus 0: configuration mode 1 (no bios) pchb0 at pci0 dev 0 function 0 "Intel 82810-DC100" rev 0x02: rng active, 6Kb/sec vga1 at pci0 dev 1 function 0 "Intel 82810-DC100 Graphics" rev 0x02: aperture at 0xe000, size 0x400 wsdisplay0 at vga1: console (80x25, vt100 emulation) wsdisplay0: screen 1-5 added (80x25, vt100 emulation) ppb0 at pci0 dev 30 function 0 "Intel 82801AA Hub-to-PCI" rev 0x01 pci1 at ppb0 bus 1 sis0 at pci1 dev 2 function 0 "NS DP83815 10/100" rev 0x00: DP83815C, irq 9, add ress 00:a0:cc:74:6d:98 nsphyter0 at sis0 phy 0: DP83815 10/100 PHY, rev. 1 ichpcib0 at pci0 dev 31 function 0 "Intel 82801AA LPC" rev 0x01 pciide0 at pci0 dev 31 function 1 "Intel 82801AA IDE" rev 0x01: DMA, channel 0 w ired to compatibility, channel 1 wired to compatibility wd0 at pciide0 channel 0 drive 0: wd0: 16-sector PIO, LBA, 9787MB, 20044080 sectors wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2 atapiscsi0 at pciide0 channel 1 drive 0 scsibus0 at atapiscsi0: 2 targets cd0 at scsibus0 targ 0 lun 0: SCSI0 5/cdrom removable cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2 uhci0 at pci0 dev 31 function 2 "Intel 82801AA USB" rev 0x01: irq 10 usb0 at uhci0: USB revision 1.0 uhub0 at usb0 uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered auich0 at pci0 dev 31 function 5 "Intel 82801AA AC97" rev 0x01: irq 9, ICH AC97 ac97: codec id 0x41445340 (Analog Devices AD1881) ac97: codec features headphone, Analog Devices Phat Stereo audio0 at auich0 "Intel 82801AA Modem" rev 0x01 at pci0 dev 31 function 6 not configured isa0 at ichpcib0 isadma0 at isa0 pckbc0 at isa0 port 0x60/5 pckbd0 at pckbc0 (kbd slot) pckbc0: using irq 1 for kbd slot wskbd0 at pckbd0 (mux 1 ignored for console): console keyboard, using wsdisplay0 pmsi0 at pckbc0 (aux slot) pckbc0: using irq 12 for aux slot wsmouse0 at pmsi0 mux 0 pcppi0 at isa0 port 0x61 midi0 at pcppi0: sysbeep0 at pcppi0 lpt0 at isa0 port 0x378/4 irq 7 lm0 at isa0 port 0x290/8: W83627HF npx0 at isa0 port 0xf0/16: using exception 16 pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo pckbc0: using irq 1 for kbd slot wskbd0 at pckbd0 (mux 1 ignored for console): console keyboard, using wsdisplay0 pmsi0 at pckbc0 (aux slot) pckbc0: using irq 12 for aux slot wsmouse0 at pmsi0 mux 0 pcppi0 at isa0 port 0x61 midi0 at pcppi0: sysbeep0 at pcppi0 lpt0 at isa0 port 0x378/4 irq 7 lm0 at isa0 port 0x290/8: W83627HF npx0 at isa0 port 0xf0/16: using exception 16 pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo pccom1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo fdc0 at isa0 port 0x3f0/6 irq 6 drq 2 fd0 at fdc0 drive 0: density unknown biomask ed65 netmask ef65 ttymask ffe7 pctr: 686-class user-level performance counters enabled mtrr: Pentium Pro MTRR support dkcsum: wd0 matched BIOS disk 80 root on wd0a rootdev=0x0 rrootdev=0x300 rawdev=0x302 uid 0 on /mnt: file system full -- Adam Fabian <[EMAIL PROTECTED]>
Re: Can't make 3.7-stable release (tries to exceed capacity of /dev/svnd0a?)
On Mon, Jul 11, 2005 at 11:48:49AM -0500, Chris wrote: > On Mon, 11 Jul 2005, Adam Fabian wrote: > > >I've tried building an OpenBSD release from the 3.7-stable branch a > > Ummm - maybe I don't understand but, how can you make a RELEASE from > STABLE? Isnt STABLE following the patch branch? And RELEASE is jsut that > - what's on the CD? Perhaps it's not supported. I built a 3.5-stable release after about 16 updates, and it's a mite more convenient than doing a fresh install then applying 16 patches, though. ;) -- Adam Fabian <[EMAIL PROTECTED]>
Re: Can't make 3.7-stable release (tries to exceed capacity of /dev/svnd0a?)
On Mon, Jul 11, 2005 at 01:24:01PM -0400, Jason Crawford wrote: > from different sources if you so choose. The problem the OP is having > was caused by one of the stable patches to the 3.7 kernel, making it > just too big to fit on a floppy, which has been talked about in at > least one previous thread. ::blushes.:: I suppose I should've found that. Thanks for the help, though! -- Adam Fabian <[EMAIL PROTECTED]>
OpenBGP compare prefix from other peer
Hi all, i have following configuration: Upstream A [RA] [RC] [RB] --- Upstream B EBGP: RA - Upstream A RB - Upstream B Upstream A has 100% full internet routing table Upstream B has 70% internet routing table. on RA and RB: fib-update no and have default route to their respective EBGP peering RC has default route to RB, I want to keep kernel routing table as minimal as possible. How do i distribute routes from RA to RC and update kernel routing table if there is no route from RB? on RC i want to something like this: deny from RA deny from RB allow from RA if there's no route from RB So RC only contain 30% internet routing table. (RA and RB has 30% differences) Is it possible? Nowadays 30% of full internet routing table are 90K prefixes. Is there any significant differences looking up 300K than 90K routing table? Thanks, Leo
tcp window scale in ISP
Hi all, As an internet service provider, we have bgp peering with customers. they also have bgp peering with other isp. the problem is if they use tcp window scaling and have different path for incoming and outgoing connection. they only use our connection for incoming traffic. how do pf handle this kind of traffic? should i disable pf? thanks
bgpctl reload, refuse to load configuration
Hi misc, After fixing error in bgpd.conf (OpenBSD 4.6), bgpctl reload, refuse to load new configuration. from /var/log/messages: Jan 27 06:55:43 acbgp bgpd[31029]: /etc/bgpd.conf:114: rib "Adj-RIB-In" allready exists. Jan 27 06:55:43 acbgp bgpd[31029]: /etc/bgpd.conf:114: rib "Loc-RIB" allready exists. line 114 is the end of file. you can not load new configuration without kill bgpd process. below is portion of bgpd.conf # global configuration AS $our_as router-id xx.xx.xx.xx fib-update no neighbor $dist_peer { remote-as $our_as announceall descr "Dist" } there are several neighbor configuration, but all configured in the same way. the difference is in the $dist_peer macro. It happened in all bgp router, be it IBGP or EBGP. Is there a way to reload new configuration (after fixing error) without bringing down bgpd? thanks.
pf: anchor not honoring quick
Hello list, I have the following pf.conf: anchor quick { pass } block # pfctl -sr anchor quick all { pass all flags S/SA } block drop all Because of the 'quick' i assumed, that 'block' is never reached, but it is since 6.2. man pf.conf(5) states: "If the anchor itself is marked with the quick option, ruleset evaluation will terminate when the anchor is exited if the packet is matched by any rule within the anchor." I tested with fresh installs of 6.1, 6.2, 6.3 and current via vmd and 6.1 does in fact behave as i would accept (that is, all packets pass). From 6.2 on however, all packets are dropped. Do i misread the manpage somehow? Regards, Fabian