Re: Can I undo OpenBSD GPT partition table and recover my data? was: Triple booting Windows/Debian/OpenBSD?
On Thu, 3 Nov 2022 at 20:50, Manuel Giraud wrote: [For some reasons your message got into spam and is not even displayed on the mail archive] > > Ottavio Caruso writes: > > [...] > > > So I officially joined the club of idiots who don't back up their > > partition table. > > And hopefully, you have it backup on this mailing list. Both > screenshots are big for a list and useless (you probably already created > a GPT so what you see is a fresh EFI sys and openbsd area). > > But if what you sent before (from debian) is correct, you have all the > numbers you need: that is what you should reproduce with fdisk to > retrieve your 654264320 sectors of FAT32. And then, make a backup. Thanks for that. The solution was under my nose but I couldn't see it. -- Ottavio Caruso A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail?
Re: Documentation on OpenBSD's 3-process privsep model?
On 31/03/2021 04:46, Marc Espie wrote: On Tue, Mar 23, 2021 at 09:41:06AM +, Ottavio Caruso wrote: On 23/03/2021 05:53, misopolemiac wrote: I'd appreciate some pointers to documentation or minimal examples of the 3-process privilege separation model for OpenBSD's daemons. Internet searches pointed to skeleton examples at github.com/krwesterback/newd and github.com/krwesterback/newdctl, but those repos are now dead and it's unclear how authoritative they were in the first place. Blind leading the blind here, but I think a good starting point would be recent presentations by Marc Espie, who, I believe but I might be wrong, is the developer who worked the most on privsep. http://www.openbsd.org/events.html Definitely not at all. I haven't worked the most on privsep, by far. and the examples I've worked on are highly specific and probably not applicable to most of the base code. I was wrong then. My apologies. Still, it's worth giving a look at the events page. I have learnt a lot about OpenBSD going through all presentations and papers, despite understanding only 0.1% of the technical details. -- Ottavio Caruso
Re: Documentation on OpenBSD's 3-process privsep model?
On 23/03/2021 05:53, misopolemiac wrote: I'd appreciate some pointers to documentation or minimal examples of the 3-process privilege separation model for OpenBSD's daemons. Internet searches pointed to skeleton examples at github.com/krwesterback/newd and github.com/krwesterback/newdctl, but those repos are now dead and it's unclear how authoritative they were in the first place. Blind leading the blind here, but I think a good starting point would be recent presentations by Marc Espie, who, I believe but I might be wrong, is the developer who worked the most on privsep. http://www.openbsd.org/events.html -- Ottavio Caruso
Re: How to set ThinkPad battery charge thresholds?
On 09/03/2021 05:25, Subhaditya Nath wrote: And the actual work is done by something called the 'natacpi framework', which is implemented by the linux kernel itself. Which is what I said in my previous post. -- Ottavio Caruso A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail?
Re: How to set ThinkPad battery charge thresholds?
On 09/03/2021 04:53, s...@skolma.com wrote: perhaps as your name suguests you may be located in the Indian sub continent, and Mains Power may be intermittent.. God, how patronizing is that? -- Ottavio Caruso A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail?
Re: How to set ThinkPad battery charge thresholds?
On 08/03/2021 17:35, Jean-Pierre de Villiers wrote: Refer to sensorsd(8) and acpibat(4). Given those and related manual pages I'm relatively certain you should be able to achieve this. OpenBSD is well-known for its clear and extensive documentation so use this to your advantage. The apropos(1) utility is your best friend :). Your second and third best friends are the FAQ and the mailing list archives. I am working under the assumption that no proprietary blobs are necessary to accomplish your goal. Otherwise, I am afraid you are out of luck as OpenBSD does not and never will contain any such blobs. They are "black boxes" and thus cannot be trusted. Regards, JP On 21/03/08 07:05pm, Subhaditya Nath wrote: I have a Thinkpad E495 that has Battery Charge threshold support. i.e. it can be set such that the battery starts charging at a specified amount of charge (say, 70%) and automatically stops charging at a specified charge (say, 80%). This feature is also available on Linux by using TLP (made by linrunner, his website is linrunner.de) The problem is, I searched for this option in OpenBSD, but I couldn't find it. It is a very crucial functionality for me. So, if somebody can please tell me where I can set it, I would be very very thankful. (Pardon my bad english, it's not my first language) acpibat, as it stands, doesn't and cannot set/manipulate battery charge threshold levels. -- Ottavio Caruso A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail?
Re: How to set ThinkPad battery charge thresholds?
On 08/03/2021 13:35, Subhaditya Nath wrote: I have a Thinkpad E495 that has Battery Charge threshold support. i.e. it can be set such that the battery starts charging at a specified amount of charge (say, 70%) and automatically stops charging at a specified charge (say, 80%). This feature is also available on Linux by using TLP (made by linrunner, his website is linrunner.de) The problem is, I searched for this option in OpenBSD, but I couldn't find it. It is a very crucial functionality for me. So, if somebody can please tell me where I can set it, I would be very very thankful. (Pardon my bad english, it's not my first language) As far as I know, you can't achieve that in the BSD ecosystem. TLP uses a Linux kernel model (acpi-call-dkms). https://github.com/mkottman/acpi_call -- Ottavio Caruso A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail?
Deleting sysupgrade, was: sysupgrade failure logs
On 14/02/2021 23:44, Theo de Raadt wrote: When we get reports like this where people "touch the insides", both Florian and I regret that sysupgrade ever arrived in the system. We want to delete sysupgrade. If this is not just a provocative statement, +1 from me. I've never liked unattended, automatic, Debian-style system upgrades. A lot of things can go wrong. -- Ottavio Caruso
www.openbsd.org unreachable for a few days
Hi, I asked on Freenode#OpenBSD and apparently it's only me, but I haven't been able to access www.openbsd.org for a few days. There is nothing in my firewall/router that blocks OpenBSD.org. Ping, traceroute and telnet don't seem to access the site. Can anybody help? Diagnostics follow. $ telnet www.openbsd.org 443 Trying 129.128.5.194... telnet: Unable to connect to remote host: Connection timed out $ telnet www.openbsd.org 80 Trying 129.128.5.194... telnet: Unable to connect to remote host: Connection timed out $ host www.openbsd.org www.openbsd.org has address 129.128.5.194 $ ping 129.128.5.194 PING 129.128.5.194 (129.128.5.194) 56(84) bytes of data. ^C --- 129.128.5.194 ping statistics --- 31 packets transmitted, 0 received, 100% packet loss, time 30696ms $ traceroute 129.128.5.194 traceroute to 129.128.5.194 (129.128.5.194), 30 hops max, 60 byte packets 1 gateway (192.168.2.1) 0.879 ms 1.433 ms 2.591 ms 2 192.168.1.254 (192.168.1.254) 3.400 ms 6.013 ms 11.119 ms 3 host81-139-176-1.in-addr.btopenworld.com (81.139.176.1) 23.841 ms 24.279 ms 24.892 ms 4 217.32.25.94 (217.32.25.94) 26.975 ms 32.948 ms 33.224 ms 5 217.32.25.120 (217.32.25.120) 34.331 ms 34.815 ms 35.379 ms 6 31.55.185.228 (31.55.185.228) 36.239 ms 31.55.185.192 (31.55.185.192) 18.589 ms 31.55.185.208 (31.55.185.208) 23.081 ms 7 core1-hu0-16-0-6.colindale.ukcore.bt.net (213.121.192.16) 24.023 ms core2-hu0-12-0-5.colindale.ukcore.bt.net (195.99.127.122) 24.013 ms core1-hu0-16-0-7.colindale.ukcore.bt.net (213.121.192.18) 24.400 ms 8 109.159.252.138 (109.159.252.138) 25.195 ms core2-hu0-1-0-1-1.colindale.ukcore.bt.net (195.99.127.9) 26.188 ms core3-hu0-8-0-0.faraday.ukcore.bt.net (195.99.127.36) 27.082 ms 9 62.6.201.145 (62.6.201.145) 27.534 ms 166-49-209-194.gia.bt.net (166.49.209.194) 28.250 ms 62.6.201.145 (62.6.201.145) 33.835 ms 10 166-49-209-194.gia.bt.net (166.49.209.194) 34.201 ms 34.174 ms 34.132 ms 11 40ge1-3.core1.lon2.he.net (195.66.224.21) 35.068 ms 100ge4-1.core1.nyc4.he.net (72.52.92.166) 101.075 ms 86.105 ms 12 100ge4-1.core1.nyc4.he.net (72.52.92.166) 85.940 ms 87.165 ms 100ge14-1.core1.tor1.he.net (184.105.80.10) 97.811 ms 13 100ge6-1.core1.ywg1.he.net (184.105.64.102) 122.819 ms 100ge14-1.core1.tor1.he.net (184.105.80.10) 98.632 ms 99.697 ms 14 100ge6-1.core1.ywg1.he.net (184.105.64.102) 124.813 ms 100ge5-2.core1.yxe1.he.net (184.104.192.70) 138.323 ms 100ge6-1.core1.ywg1.he.net (184.105.64.102) 134.804 ms 15 100ge5-2.core1.yxe1.he.net (184.104.192.70) 137.811 ms 100ge11-2.core1.yeg1.he.net (72.52.92.61) 164.945 ms 163.780 ms 16 * 100ge11-2.core1.yeg1.he.net (72.52.92.61) 164.850 ms * 17 * * * 18 * * * 19 * * * 20 * * * 21 * * * 22 * * * 23 * * * 24 * * * 25 * * * 26 * * * 27 * * * 28 * * * 29 * * * -- Ottavio Caruso
Re: OpenBSD 6.8 (release) guest (qemu/kvm) on Linux 5.9 host (amd64) fails with protection fault trap
On 15/11/2020 18:20, Gabriel Garcia wrote: Hi, I would like to run OpenBSD as stated on the subject - I have been able, however, to run it successfully with "-cpu Opteron_G2-v1", but I would rather use "-cpu host" instead. Also note that on an Intel host, OpenBSD appears to work successfully on the same Linux base. Not sure if this answers your question, but this is how I boot OpenBSD 6.6 (...yes!) on kvm/qemu: #!/bin/sh qemu-system-x86_64 \ -drive if=virtio,file=/home/oc/VM/img/openbsd.image,index=0,media=disk \ -M q35,accel=kvm -m 250M -cpu host,-kvmclock-stable-bit -smp $(nproc) \ -nic user,hostfwd=tcp:127.0.0.1:5556-:22,model=virtio-net-pci \ -daemonize -display none -vga none \ -serial mon:telnet:127.0.0.1:,server,nowait \ -pidfile /home/oc/VM/pid/openbsd-pid telnet 127.0.0.1 (pay attention to "-kvmclock-stable-bit" otherwise it will crash into a ddb debug shell) -- Ottavio Caruso
Re: OpenBSD UEFI on QEMU emulator
On 24/10/2020 11:33, Kevin Shell wrote: On Sat, Oct 24, 2020 at 08:55:34AM +0100, Ottavio Caruso wrote: On 24/10/2020 02:27, Kevin Shell wrote: Why I keep received 2 copies email again? Please don't To or Cc me.:-) Because this is how old school mailing lists work. To: the OP and cc: the list, unless you use a 3rd party service like, for example, gmane.io. gmane.io is not very stable, some mails I posted thru it just disappered.:-) You can use nntp to read and smtp to send, which I what I do with some other mailing lists. -- Ottavio Caruso
Re: OpenBSD UEFI on QEMU emulator
On 24/10/2020 02:27, Kevin Shell wrote: Why I keep received 2 copies email again? Please don't To or Cc me. :-) Because this is how old school mailing lists work. To: the OP and cc: the list, unless you use a 3rd party service like, for example, gmane.io. Any decent mail client can be configured to remove or hide duplicates. -- Ottavio Caruso
Re: man tar
On 04/10/2020 16:05, Roderick wrote: We read there: """"" -f archive Filename where the archive is stored. Defaults to /dev/rst0. If set to hyphen (‘-’) standard output is used. See also the TAPE environment variable. """""" Well, hyphen (‘-’) may also mean stdin as expected, but it seems not to be mentioned/insinuated on the man page. Interesting. Recent versions of tar(1) on {Free,Net}BSD stipulate: -f file, --file file Read the archive from or write the archive to the specified file. The filename can be - for standard input or standard output. The default varies by system; on FreeBSD, the default is /dev/sa0; on Linux, the default is /dev/st0. I assume it's stdin when compressing and stdout when expanding. Or maybe vice versa? -- Ottavio Caruso A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail?
Re: support new
On 01/10/2020 09:41, Ingo Schwarze wrote: Hi, Mischa wrote on Wed, Sep 30, 2020 at 11:10:27PM +0200: 0 C Netherlands P T Amsterdam Z 1083 HN O OpenBSD Amsterdam I A Barbara Strozzilaan 251 M service@openbsd.amsterdam U https://openbsd.amsterdam/ B X N Hosting OpenBSD VMs on dedicated vmm(4)/vmd(8) servers. Committed, thanks. Ingo BTW, for the non-initiated, what is this? -- Ottavio Caruso
Re: Web based document / spredsheet editor
On 22/09/2020 14:37, Martin Sukany wrote: Hi colleges, I need to set up some kind of collaborative environment (rich text docjuments, basic tables) — request is „something like google docs“. As I’m almost working in shell I have to say that I’m little bit lost in this area. Could you recommend me some web-based application (idealy something which is „easily“ deployed on OpenBSD)? If it wouldn’t have behind some of the ‚big frameworks‘, it would be great. Whichever web based "like Google docs" solution will require the latest/greatest version of Chrome/Firefox and probably will work 100% fine only on Windows/ChromeOS. Libreoffice is not web based but can work on remote repositories: https://help.libreoffice.org/6.3/en-US/text/shared/guide/cmis-remote-files-setup.html -- Ottavio Caruso
Re: How do you get different $PS1 for /bin/sh and /bin/ksh?
On 18/09/2020 09:01, Tom H wrote: On Thu, Sep 17, 2020 at 3:16 PM Ottavio Caruso wrote: On 17/09/2020 10:40, Tom H wrote: You've said that you're now sourcing "$HOME/.kshrc" if "SKSH_VERSION" exists. You could add the sourcing of "$HOME/.shrc" if "$SH_VERSION" exists. Or you could export ENV and use a case-esac of this kind: case "$0" in *ksh) ... PS1='\u@\h:\w\$ ' ;; *sh) ... PS1='${USER}@${HOST}:${PWD}\$ ' ;; esac This solves the problem. Thanks. You're welcome. But, out of curiosity, which option did you choose? TIA Ah sorry, I used the second option. I have this in .profile: export ENV="$HOME/.kshrc" and this in .kshrc: case "$0" in *ksh) PS1='\u@\h:\w\$ ' ;; *sh) PS1='${USER}@${HOST}:${PWD}\$ ' ;; esac On my NetBSD VM, sh and ksh are two different executables. ENV points to ~/.shrc which then sources ./.kshrc if KSH_VERSION = true I have though of replicating the same configuration over to OpenBSD but I might be looking for trouble. On a side note, there's no mention of startup files in sh(1) and I wonder why. -- Ottavio Caruso
Re: How do you get different $PS1 for /bin/sh and /bin/ksh?
On 17/09/2020 10:40, Tom H wrote: On Thu, Sep 17, 2020 at 9:33 AM Ottavio Caruso wrote: On 17/09/2020 00:58, Ashlen wrote: On 20/09/15 05:49PM, Ottavio Caruso wrote: Maybe it's just because OpenBSD sh is just ksh in disguise or there might be other reasons that I obviously don't know. Yep, you're right. They share the same inode. ls -li /bin/{,k}sh 77862 -r-xr-xr-x 3 root bin 613656 Sep 15 12:10 /bin/ksh 77862 -r-xr-xr-x 3 root bin 613656 Sep 15 12:10 /bin/sh sh(1) also attests to this. Thanks but I gave that for granted. My question was about not exporting PS1 to subshells. In theory, it shouldn't be exported but it does get exported if one uses ENV=.kshrc vs sourcing .kshrc. You've said that you're now sourcing "$HOME/.kshrc" if "SKSH_VERSION" exists. You could add the sourcing of "$HOME/.shrc" if "$SH_VERSION" exists. Or you could export ENV and use a case-esac of this kind: case "$0" in *ksh) ... PS1='\u@\h:\w\$ ' ;; *sh) ... PS1='${USER}@${HOST}:${PWD}\$ ' ;; esac This solves the problem. Thanks. -- Ottavio Caruso
Re: How do you get different $PS1 for /bin/sh and /bin/ksh?
On 17/09/2020 00:58, Ashlen wrote: On 20/09/15 05:49PM, Ottavio Caruso wrote: Maybe it's just because OpenBSD sh is just ksh in disguise or there might be other reasons that I obviously don't know. Yep, you're right. They share the same inode. ls -li /bin/{,k}sh 77862 -r-xr-xr-x 3 root bin 613656 Sep 15 12:10 /bin/ksh 77862 -r-xr-xr-x 3 root bin 613656 Sep 15 12:10 /bin/sh sh(1) also attests to this. Thanks but I gave that for granted. My question was about not exporting PS1 to subshells. In theory, it shouldn't be exported but it does get exported if one uses ENV=.kshrc vs sourcing .kshrc. -- Ottavio Caruso
Re: How do you get different $PS1 for /bin/sh and /bin/ksh?
On 15/09/2020 14:44, Vincenzo Nicosia wrote: On Tue, Sep 15, 2020 at 02:08:16PM +0100, Ottavio Caruso wrote: Hi, I have this in ~/.kshrc : PS1="\u@\h:\w\$ " which works fine in ksh: oc@OpenBSD:~$ However, if I open a sh subshell, I get: \u@OpenBSD:\w$ which is not very nice. The only hack I've found is to append this to ~/.profile: if [ -n "$KSH_VERSION" ]; then if [ -f "$HOME/.kshrc" ]; then . "$HOME/.kshrc" fi fi I wonder if there is a more elegant solution. Hi, the more elegant solution is to set ENV appropriately. ~/.profile is normally read only at login, while sub-shells will source whatever file is specified in ENV. This is what I had and it generated the undesired prompt in sh. You probably mean "interactive shells", not just sub shells. A sub shell could be child of a non login shell as well. With ENV=~/.khsrc, PS1 is propagated over to sub shells, whether it is ksh or sh, whereas just sourcing ./.khsrc will not export PS1. I don't know why this is. It doesn't make sense to me. Maybe it's just because OpenBSD sh is just ksh in disguise or there might be other reasons that I obviously don't know. -- Ottavio Caruso
How do you get different $PS1 for /bin/sh and /bin/ksh?
Hi, I have this in ~/.kshrc : PS1="\u@\h:\w\$ " which works fine in ksh: oc@OpenBSD:~$ However, if I open a sh subshell, I get: \u@OpenBSD:\w$ which is not very nice. The only hack I've found is to append this to ~/.profile: if [ -n "$KSH_VERSION" ]; then if [ -f "$HOME/.kshrc" ]; then . "$HOME/.kshrc" fi fi I wonder if there is a more elegant solution. -- Ottavio Caruso
Re: Can I boot without GPU ("headless")?
On 28/08/2020 20:27, Henry W. Peterson wrote: Could I be booting the system had I said yes (without actually using the port, again, I would use ssh)? If so, can I change this after installation? If not, is there anything I can do to be able to boot without the graphics card? Thank you. Not 100% sure if this answers you question, but I boot a qemu instance of OpenBSD/amd64 6.6 with serial console enabled: -daemonize -display none -nodefaults \ -serial mon:telnet:127.0.0.1:,server,nowait \ and vga driver disabled: - vga none -nodefaults \ And then I have this in boot.conf $ cat /etc/boot.conf stty com0 9600 set tty com0 and ttys: $ grep tty00 /etc/ttys tty00 "/usr/libexec/getty std.9600" vt220on secure I can then access the VM via either telnet (to the virtualized serial console) or ssh. -- Ottavio Caruso
Re: TLS stall ftp or pkg_add
On Sat, 18 Jul 2020 at 20:01, Kevin Chadwick wrote: > > Has anyone else noticed stalls when using a https link in /etc/installurl. In a qemu guest in user mode networking, which is notoriously not very efficient: oc@OpenBSD:~$ uname -sr OpenBSD 6.6 oc@OpenBSD:~$ cat /etc/installurl https://cdn.openbsd.org/pub/OpenBSD oc@OpenBSD:~$ doas pkg_add bzip2 quirks-3.187 signed on 2020-05-19T14:41:48Z bzip2-1.0.8: ok No stalls here. -- Ottavio Caruso
Re: Shell account service providers
On Thu, 16 Jul 2020 at 02:56, Wesley wrote: > > > > Ibsen S Ripsbusker wrote: > > Are there services that sell managed OpenBSD shell accounts? > > I mean a service similar to sdf.org. > > Try google with keywords "online unix terminal for shell scripting", you > will find a lot results. I struggle to see how this is relevant to the OP's question. -- Ottavio Caruso
Re: Cleaning system's old ibraries/files after update to next -release or -current
On Tue, 14 Jul 2020 at 13:44, Ingo Schwarze wrote: > > Hi, > > Martin wrote on Tue, Jul 14, 2020 at 11:11:34AM +: > > > After system update I found lots of 'old' libraries versions > > and possibly binaries from previous releases. > > > > Does anybody know an automated method to remove it after update? > > For instance previous libs before update to -current. > > If you need to ask, just don't remove them. Those files eat no bread, > and in some situations, some of the libs may still be in use. > What about if one compiles ports? If OpenBSD is anything similar to NetBSD, on the latter having multiple libs might cause build breakages. -- Ottavio Caruso
Re: ls -R bug?
On Sat, 4 Jul 2020 at 19:59, Richard Ipsum wrote: > > Hi, > > Output of ls -R between OpenBSD and GNU coreutils seems to differ, > OpenBSD ls -R will apparently list "hidden" directories like .git, > whereas GNU coreutils will not, is this expected behaviour or a bug? > Funny, because this seems to validate what you are reporting: oc@OpenBSD:~$ ls -R oc-backup test ./.local/share: xorg ./.local/share/xorg: Xorg.0.log Xorg.0.log.old ./oc-backup: docs mbox ./oc-backup/docs: bgpd.confman-todo patch.patch root-mail bug oc-mail robots.txt sudo.log ./test: dmesg fstab index.html uyiuyi filefstab.dos ls.ps file.bakfstab.tropenbsd-tips-wip file.orig fstab.unix test.wav However: oc@OpenBSD:~$ mkdir .hidden oc@OpenBSD:~$ touch .hidden/test-file oc@OpenBSD:~$ ls -R It looks like "ls -R" is showing some hidden directories but not all. -- Ottavio Caruso
Re: ssh X forwarding and google-chrome
On Thu, 2 Jul 2020 at 15:33, Gregory Edigarov wrote: > > Hello, everybody > > does anybody know if there is any tricks? > > In my office pc (currently linux) I have google-chrome installed, and I > absolutely need to access it from home. > > "ssh -Y google-chrome" just shows an empty and blank window, > no menu, no address bar. > May be there is some command line flags I am not aware of? Can you not just "ssh -Y" into your machine and then launch Chrome from the command line? At least, you'd get some debug info. -- Ottavio Caruso
Re: armv7 on Asus Chromebook C100P
On Sun, 28 Jun 2020 at 18:29, Ian Darwin wrote: > > Has anybody installed OpenBSD on these chromebooks? Asus sold a lot of > them, and they are losing Google's support next month so there should > be a lot available cheaply if you just want something to travel with > for email/web/chat. > It will most likely not work because: https://archlinuxarm.org/platforms/armv7/rockchip/asus-chromebook-flip-c100p The hardware is locked so that you can only boot the Chrome kernel (unless somebody knows a workaround). Even a Linux distro will be a problem, because the userspace will have to be compatible with the kernel. Back in 2012, I struggled to install Slackware ARM on a similar Chromebook and then I gave up (there might be traces of it on the Slackware-arm mailing list archives). -- Ottavio Caruso
What does the "#n" after "GENERIC.MP" stand for?
Hi, Out of curiosity: ~$ uname -r 6.6 ~$ uname -v GENERIC.MP#0 ~$ sysctl kern.osversion kern.osversion=GENERIC.MP#0 This was GENERIC.MP#7 before I ran syspatch and rebooted. I can't find a reference to this notation. I thought it could have been the patch version number, but it's obviously not so. Looking on: https://dmesgd.nycbug.org/index.cgi?do=index&fts=OpenBSD it appears machines running -current have a higher #number. -- Ottavio Caruso
How do I get the man page for a package I haven't installed yet?
Hi, Unless I've got it all wrong, <https://man.openbsd.org/> will only display man pages for programs and commands in base. Is there a way to display the man page for a package/port I haven't installed and/or downloaded yet? (This assumes I haven't downloaded the ports cvs tree). Thanks -- Ottavio Caruso A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail?
Re: Disabling OpenBSD Login Prompt
On Wed, 10 Jun 2020 at 10:03, Valdrin MUJA wrote: > > Hi Misc, > > I want to disable OpenBSD Login prompt at startup -and also after logging > out-. Because I want to run my external program instead of ksh. There is an > login prompt also in my program and I want to use it. > What do you mean by "login prompt"? Maybe the MOTD? You need to login in your system, right? Unless your program is a shell (and registered in /etc/shells), you won't be able to log in. https://man.openbsd.org/shells.5 https://man.openbsd.org/login.1 -- Ottavio Caruso
Re: OpenBSD Readonly File System
On Tue, 9 Jun 2020 at 08:59, Vertigo Altair wrote: > > Hi Misc, > I have a firewall device and I'm using OpenBSD on it. There is an > electricity problem where the device runs. Therefore, I have to run the > "fsck -y" command regularly at startup due to the electricity problem. Isn't it just easier to buy a UPS? -- Ottavio Caruso
Re: How do I get a list of the files of only installed packages?
On Mon, 8 Jun 2020 at 11:31, Stuart Henderson wrote: > > On 2020-06-08, Ottavio Caruso wrote: > > I probably didn't make myself clear and I apologize. I'd like to have > > a list of files for just one package, and only if that package has > > been installed. If not installed, it should tell me it hasn't been > > installed or just provide no output, a bit like pkg_info behaves on > > NetBSD. > > pkg_* tools use /etc/installurl if present. This can be overridden by > setting PKG_PATH in the environment: > > $ env PKG_PATH= pkg_info -f somepkg Thanks for the hint. Actually: $ env PKG_PATH= pkg_info -L somepkg (-L instead of -f) does the job for me. -- Ottavio Caruso
Re: How do I get a list of the files of only installed packages?
On Sun, 7 Jun 2020 at 22:26, Udo Zorn wrote: > > On Sun, Jun 07, 2020 at 10:04:53PM +0100, Ottavio Caruso wrote: > > On Sun, 7 Jun 2020 at 21:37, Daniel Jakots wrote: > > > > > > On Sun, 7 Jun 2020 21:11:57 +0100, Ottavio Caruso > > > wrote: > > > > > > > Hi, > > > > > > > > "pkg_info -L PACKAGE-NAME" > > > > > > > > will give me a list of all the files within each package, regardless > > > > of whether the package is installed or not. > > > > > > > > How can I restrict the output to only installed packages, making it > > > > fail if the package is not installed? > > > > > > > > I could do: > > > > > > > > "pkg_info -f PACKAGE-NAME " > > > > > > > > but that would not give me full pathnames. > > > > > > > > I've looked at the pkg_info man page but I couldn't find a clue. > > > > > > > > Thanks. > > > > > > > > > > A "creative" solution: > > > $ cat -- /var/db/pkg/*/+CONTENTS > > > > > > for free, you get for each file its size, its timestamp, and > > > its checksum! ;) > > > > Well no, because that would give results for all packages, not each of > > them; no full path and extra garble. > > > > I'd have to think of a shell script. > > > > -- > > Ottavio Caruso > > > > How about this? > > $ pkg_info -z | xargs pkg_info -L I probably didn't make myself clear and I apologize. I'd like to have a list of files for just one package, and only if that package has been installed. If not installed, it should tell me it hasn't been installed or just provide no output, a bit like pkg_info behaves on NetBSD. -- Ottavio Caruso
Re: How do I get a list of the files of only installed packages?
On Sun, 7 Jun 2020 at 21:37, Daniel Jakots wrote: > > On Sun, 7 Jun 2020 21:11:57 +0100, Ottavio Caruso > wrote: > > > Hi, > > > > "pkg_info -L PACKAGE-NAME" > > > > will give me a list of all the files within each package, regardless > > of whether the package is installed or not. > > > > How can I restrict the output to only installed packages, making it > > fail if the package is not installed? > > > > I could do: > > > > "pkg_info -f PACKAGE-NAME " > > > > but that would not give me full pathnames. > > > > I've looked at the pkg_info man page but I couldn't find a clue. > > > > Thanks. > > > > A "creative" solution: > $ cat -- /var/db/pkg/*/+CONTENTS > > for free, you get for each file its size, its timestamp, and > its checksum! ;) Well no, because that would give results for all packages, not each of them; no full path and extra garble. I'd have to think of a shell script. -- Ottavio Caruso
Re: How do I get a list of the files of only installed packages?
On Sun, 7 Jun 2020 at 21:11, Ottavio Caruso wrote: > > Hi, > > "pkg_info -L PACKAGE-NAME" > > will give me a list of all the files within each package, regardless > of whether the package is installed or not. > > How can I restrict the output to only installed packages, making it > fail if the package is not installed? > > I could do: > > "pkg_info -f PACKAGE-NAME " > Correction: "pkg_info -f" will also show me the packing list of remote packages, so that is not an option either. -- Ottavio Caruso
How do I get a list of the files of only installed packages?
Hi, "pkg_info -L PACKAGE-NAME" will give me a list of all the files within each package, regardless of whether the package is installed or not. How can I restrict the output to only installed packages, making it fail if the package is not installed? I could do: "pkg_info -f PACKAGE-NAME " but that would not give me full pathnames. I've looked at the pkg_info man page but I couldn't find a clue. Thanks. -- Ottavio Caruso
Re: Article OpenBSD: Not Free Not Fuctional and Definetly Not Secure and BSD, the truth blog
On Thu, 28 May 2020 at 12:27, infoomatic wrote: > > I just don't get it why some people put so much energy into bashing a > free product instead of just ignoring it if they really hate it. The > time would have been better spent on supporting/improving OpenBSD or > another project. You can say the same for 99.9% of all open source/free software: because they are free, in the public eye and easy to access, they attract more attention than products you have to pay a fortune for. Who criticises a k$ software with no source attached? This is the downside of "given enough eyeballs, all bugs are shallow". -- Ottavio Caruso
Re: OPenBSD 6.7 as a Q35 KVM guest
On Wed, 20 May 2020 at 08:34, Carlos Lopez wrote: > > Hi all, > > I just set up an OpenBSD 6.7 kvm guest on an RHEL8.2 server and selected q35 > instead of pc as a machine type. Everything seems to be working fine, except > for the network interfaces (virtio interfaces). They don't work. > > On the other hand, if I modify q35 by pc, everything works correctly. Do I > have to change any parameter or option in OpenBSD to use q35 as a machine > type, or is it simply not supported? This is probably a question for the qemu-discuss mailing list. How were you able to install OpenBSD if the interfaces were not working? Any relevant bits in dmesg? Output of ifconfig? I haven't tried 6.7 yet, but I can boot 6.6 fine with: qemu-system-x86_64 \ -drive if=virtio,file=/home/oc/VM/img/openbsd.image,index=0,media=disk \ -M q35,accel=kvm -m 250M -cpu host -smp $(nproc) \ -nic user,model=virtio-net-pci -- Ottavio Caruso
Re: upgrade 6.6 -> 6.7
On Tue, 19 May 2020 at 17:39, infoomatic wrote: > > Hi, > > just for info: Upgrading from 6.6 to 6.7 worked without flaws on my > OpenBSD VMs on Linux/KVM and FreeBSD/bhyve hypervisors! 6.7 feels faster > and snappier! Thanks to you all for your hard work! You might want to share how you did it. bsd.rd, sysupgrade, manual upgrade? -- Ottavio Caruso
Re: Why isn't src included with OpenBSD? (documentation)
On Tue, 19 May 2020 at 13:31, Marc Espie wrote: > > On Mon, May 18, 2020 at 08:43:19PM +0100, Ottavio Caruso wrote: > > Some of these documents have a proprietary licence attached to it and > > I believe it's due to the 1994 AT&T settlement. There are third party > > collections (like this: https://github.com/sergev/4.4BSD-Lite2) but > > I'm not sure if one could import them all in the source tree or in the > > ports tree without violating some copyright here and there. > > If the README.md is accurate, that could be imported in the ports tree, > but there would be a lot of work to extract useful stuff from there. > > Looks like a standard 4-clauses old-style BSD licence. > > I've had a look, and it is very strange, some of the PSD documents have > been converted to pdf, BUT not all of them. That's because of the legal proviso, as below. > > There are also no actual releases, so you'd have to pull a specific tag > from github, always hasardous... Not sure if it's safe import from that project, as it lacks all the legal proviso, like this for example: https://svnweb.freebsd.org/base/head/share/doc/psd/title/Title?revision=307807&view=co&pathrev=307807 As long as I know, the FreeBSD SVN has all the PSD, SMM and USD source tree that can be used legally. How one makes an OpenBSD ports from that, I don't know: https://svnweb.freebsd.org/base/head/share/doc/ -- Ottavio Caruso
Re: Why isn't src included with OpenBSD? (documentation)
On Mon, 18 May 2020 at 18:07, Andras Farkas wrote: > > Not sure whether to post this on misc@ or tech@, so trying misc@ first: > > Why isn't src included on OpenBSD, perhaps as an install fileset? > Lots of documentation is unavailable outside of the /usr/src tree. > > For example, today I had a server mishap which had me using fsck_ffs > after. I needed to figure out what > PARTIALLY TRUNCATED INODE I= > meant. > I saw in fsck_ffs.8 > https://man.openbsd.org/fsck_ffs.8 > that the answers could be found in > Fsck_ffs - The UNIX File System Check Program > This is perfectly fine. Not every piece of information belongs in a > man page. Man pages are the right format for some sorts of info, and > absolutely the wrong format for some other sorts. > BUT: I looked and couldn't find it, and ended up using > https://docs.freebsd.org/44doc/smm/03.fsck/paper.pdf > which is where I found my answer. > Only after I already solved the problem did I find that the mentioned > file exists here: > https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sbin/fsck_ffs/SMM.doc/ > This is a situation I occasionally run into, where useful > documentation isn't included with OpenBSD, nor is available on > OpenBSD's website (FAQ, etc). It's occasional, but it's frustrating > every time. > > Not only are the USD, PSD, and SMM missing, but other bits of info > often are, too. For example, I first learnt vi a few years ago, back > when I was first learning Unix, with these files: > https://cvsweb.openbsd.org/src/usr.bin/vi/docs/tutorial/ > Without them, or if I didn't find them, I'd have had a much more > difficult time learning vi. > > People too young to have grown up with Unix need this sort of > documentation. We can't live on man pages alone. > I believe you are referring to the historic 4.4 BSD lite documents. These are interesting for their historical value, and in some cases (for example vi and the lpd tutorials) are somewhat still relevant. Some of these documents have a proprietary licence attached to it and I believe it's due to the 1994 AT&T settlement. There are third party collections (like this: https://github.com/sergev/4.4BSD-Lite2) but I'm not sure if one could import them all in the source tree or in the ports tree without violating some copyright here and there. -- Ottavio Caruso
Re: OpenBSD insecurity rumors from isopenbsdsecu.re
On Tue, 12 May 2020 at 09:47, wrote: > > Is not systemd one of such backdoors? Does it include any interesting > "features" except so called "init system"? 1) You're asking in the wrong place 2) It's off topic 3) If you need to ask, it means you don't have a clue. It's ok to ask, but don't make sweeping statements if you don't have a clue 4) Learn how to quote a message. -- Ottavio Caruso
Re: OpenBSD insecurity rumors from isopenbsdsecu.re
On Tue, 12 May 2020 at 02:13, wrote: > > Linux GNU software has hardly visible NSA backdoors If you have the technical skills to back this argument up, please look in the "Linux GNU software" source, find the backdoors and report back. -- Ottavio Caruso
Re: one-character expansion in shell
On Wed, 6 May 2020 at 14:25, Rudolf Sykora wrote: > > Hello list, > > > is this an expected behaviour? > > odin$ ls v?k* > ls: v?k*: No such file or directory > odin$ ls v??k* > výkres.1.pdfvýkres.2.pdfvýkres.5.pdfvýkres.8.pdf > výkres.10.pdf výkres.3.pdfvýkres.6.pdfvýkres.9.pdf > výkres.11.pdf výkres.4.pdfvýkres.7.pdf > odin$ locale > LANG= > LC_COLLATE="C" > LC_CTYPE=en_US.UTF-8 > LC_MONETARY="C" > LC_NUMERIC="C" > LC_TIME="C" > LC_MESSAGES="C" > LC_ALL= > > > It seems I have to use double '??' to mach a single character. > > Thanks for comments! Weird. I can reproduce this on OpenBSD 6.6 + ksh: oc@OpenBSD:~/tt$ ls výkres.1.pdfvýkres.2.pdfvýkres.4.pdfvýkres.6.pdfvýkres.8.pdf výkres.10.pdf výkres.3.pdfvýkres.5.pdfvýkres.7.pdfvýkres.9.pdf oc@OpenBSD:~/tt$ ls v?k* ls: v?k*: No such file or directory oc@OpenBSD:~/tt$ locale LANG=en_GB.UTF-8 LC_COLLATE="en_GB.UTF-8" LC_CTYPE="en_GB.UTF-8" LC_MONETARY="en_GB.UTF-8" LC_NUMERIC="en_GB.UTF-8" LC_TIME="en_GB.UTF-8" LC_MESSAGES="en_GB.UTF-8" LC_ALL= But it works on Debian Stretch + bash: oc@e130:~/t$ ls výkres.10.pdf výkres.2.pdf výkres.5.pdf výkres.8.pdf výkres.11.pdf výkres.3.pdf výkres.6.pdf výkres.9.pdf výkres.1.pdf výkres.4.pdf výkres.7.pdf oc@e130:~/t$ ls v?k* výkres.10.pdf výkres.2.pdf výkres.5.pdf výkres.8.pdf výkres.11.pdf výkres.3.pdf výkres.6.pdf výkres.9.pdf výkres.1.pdf výkres.4.pdf výkres.7.pdf oc@e130:~/t$ locale LANG=en_GB.UTF-8 LANGUAGE= LC_CTYPE="en_GB.UTF-8" LC_NUMERIC="en_GB.UTF-8" LC_TIME="en_GB.UTF-8" LC_COLLATE="en_GB.UTF-8" LC_MONETARY="en_GB.UTF-8" LC_MESSAGES="en_GB.UTF-8" LC_PAPER="en_GB.UTF-8" LC_NAME="en_GB.UTF-8" LC_ADDRESS="en_GB.UTF-8" LC_TELEPHONE="en_GB.UTF-8" LC_MEASUREMENT="en_GB.UTF-8" LC_IDENTIFICATION="en_GB.UTF-8" LC_ALL= -- Ottavio Caruso
GNU+Linux corporate takeover, was: Wine for OpenBSD?
On Tue, 14 Apr 2020 at 12:06, Oddmund G. wrote: > Since the ongoing corporate takeover of GNU+Linux, GNU, whether we like them or not, have not been and will not be taken over by "corporate", as long as Stallman is alive. As for Linux, it is not an OS but just a kernel. The only distros that has been taken over by "corporate" are Red Hat (but it was annoyingly corporate-friendly even before it was bought by IBM) and SuSE. The remaining have not been taken over by "corporate" if they wanted to. Cheap digs don't usually get the facts right. -- Ottavio Caruso
Re: Wine for OpenBSD?
On Sun, 12 Apr 2020 at 08:24, slackwaree wrote: > > You don't want wine anyway. That is the shining example of badly written > software which sucked 15 years ago the same way it does today. T Provided Wine is now broken on most modern OSes that only ship with 64-bit binaries, there are tons of reasons why Wine is still relevant. There are gazillions of abandonware (badly) written for old versions of Windows (Win 3.* up to XP) that don't even run properly on Windows 10 but run beautifully on Wine. I have to thank Wine for getting my amateur licence because I had to run a multiple question trainer written circa 2006. Not to mention countless old electrical/electronic software that nobody is bothered porting to 64-bit *nix. -- Ottavio Caruso
Re: problems setting up PORTS_PRIVSEP
On Wed, 25 Mar 2020 at 11:19, Moises Simon wrote: > > Hi misc, > > I'm trying to set the ports system to use PORT_PRIVSEP > according to bsd.port.mk(5) and > https://www.openbsd.org/faq/ports/ports.html#PortsConfig > > but I'm getting the following error: > > sirius$ make fetch > mkdir /usr/obj/ports: Permission denied at > /usr/ports/infrastructure/bin/portlock line 53. *** Error 255 in > /usr/ports/mystuff/x11/dmenu (/usr/ports/infrastructure/mk/bsd.port.mk:2557 > 'fetch': @lock=dmenu-4.9; export _LOCKS_HELD="... > > even after doing make fix-permissions. I'm not seens something. > > cat /etc/mk.conf > SUDO=doas > CLEANDEPENDS=Yes > PORTS_PRIVSEP=Yes > WRKOBJDIR=/usr/obj/ports > DISTDIR=/usr/ports/distfiles > PACKAGE_REPOSITORY=/usr/ports/packages > > cat /etc/doas.conf > permit nopass msv cmd touch > permit nopass setenv { TRUSTED_PKG_PATH TERM } msv cmd pkg_add > permit nopass setenv { TERM } msv cmd pkg_delete > > permit keepenv nopass msv as _pbuild > permit keepenv nopass msv as _pfetch > > permit msv as root > Hi, have you given a look at this tutorial: https://dataswamp.org/~solene/2020-01-11-privsep.html -- Ottavio Caruso
Re: Hardening browser
On Wed, 4 Mar 2020 at 01:06, wrote: > > Hi, > in the following message: > https://marc.info/?l=openbsd-misc&m=158110613210895&w=2 > Theo discourages to use unveil instead of chroot. > I asked if he suggests the same for the browser but he asked that chroot > is onlye for *root*. > Then what should I do to hardening the most exposed piece of code that > we use everyday ? > Now I'm using unveil+chrome... > Thank you. Probably not what you were looking for but, back in the days when I was ultra paranoid about my web browsing, I used to use stripped down live usb installations of Linux distros (DSL was one of them that I remember). I ignore if OpenBSD comes with such a solution out the box, but I'm sure it wouldn't be difficult to make your own read-only install. Then, you could either reboot from it or run it through an emulator. -- Ottavio Caruso
Re: Web documentation available offline by default?
On Mon, 2 Mar 2020 at 14:18, Peter N. M. Hansteen wrote: > > On Mon, Mar 02, 2020 at 07:03:25AM -0700, Theo de Raadt wrote: > > > If you find a way to do that in a way that does not break and require > > > manual > > > labor after each change to the source files, I'm sure your contributing > > > the code back to the project would be appreciated. > > > > I'll say it again, no thanks. > > > > Any proposal here requires us to do something. We don't want to do this. > > I was thinking of the probably quite unlikely event that somebody who wants > this > comes up with an actually reproducible way that could be turned into an > otherwise > unremarkable make target. > > The mention of a "BSD specialist" certification had me thinking that possibly > somebody aiming for that status would have been able to think along those > lines > with proper encouragement, if nothing else to automate away an otherwise > tedious > task. The "BSD specialist" is just an entry-level certification and doesn't assume that the candidate has the tools and the skills to actually contribute code to upstream (incidentally, I have submitted bug reports and small patches to NetBSD and that was it). For the sake of clarity: I won't propose or submit any changes on this issue, as this is clearly not welcome. Amen to that and let's move on. -- Ottavio Caruso
Re: Web documentation available offline by default?
On Fri, 28 Feb 2020 at 18:14, Luke A. Call wrote: > > Another option I found helpful once is to use wget to download the > FAQs' content to a local copy (unless that puts too much load on the server), > then have a simple local shell alias to view it with links or w3m. > (At the time, it was a quick way for me, to preserve the content > in case I wanted it while offline, or if things like X weren't working.) > There are probably pros & cons of doing that, vs. CVS -- maybe making a > CVS copy is actually cleaner & simpler for this, and for updating it. > > I can fish out my old wget line for that, if it is of interest and not > considered harmful. It's also a pity the the faq are not available in a single html or pdf format. This would be handy for those who, like me, are studying for the BSD Specialist certification. Having a single document makes it easier to search for a specific command. There's a one-page text file on the ftp server but this is quite old (it doesn't even mention doas). -- Ottavio Caruso
Re: Web documentation available offline by default?
On Fri, 28 Feb 2020 at 06:24, Ingo Schwarze wrote: > > Hi Frank, > > Frank Beuth wrote on Fri, Feb 28, 2020 at 04:22:27AM +: > > > Is the web documentation (FAQ etc) included in the base system by > > default anywhere, > > No it isn't. > [...] > > We don't want to lose the valued contributions of those developers > who actually spend all the work maintaining the FAQ or make their > work any harder than it is now. Warning: beginner here. What about having good old plain text obsd-faq.txt <https://ftp.openbsd.org/pub/OpenBSD/doc/obsd-faq.txt> mirrored in base system? Or maybe it's there but I could't find it: oc@OpenBSD:~$ find /usr/share/ -iname *faq.txt* oc@OpenBSD:~$ -- Ottavio Caruso
Re: strange dmesg
On 08/02/2020 10:28, whistlez...@riseup.net wrote: Hi, I have some strange output from dmesg, what could be ? At the follwoing link I've posted some screenshots: https://postimg.cc/gallery/1o4wsaw74/ Thank you All I can think of is filesystem corruption. -- Ottavio Caruso
Re: Catastrophic
On Mon, 27 Jan 2020 at 13:59, Justin Noor wrote: > > Hello community, > > I'm looking for any advice on how to troubleshoot some strange and > catastrophic behavior on my OpenBSD machine. Seemingly out of nowhere, it > started freezing to the extent that only a forced shutdown (holding down > the power button) gets me out of it. I suspect it's some kind of hardware > failure, but I'm not 100% sure. It crashes when xenodm is running. > Especially with firefox--it crashes instantly. If I disable xenodm it runs > fine. I am unable to send any log files or anything. I had to send this > email from a different machine. I can take pictures of log files and > transfer the information, but I'm not sure where to start. Any feedback > would be greatly appreciated. You should have old copies of messages in /var/log: oc@OpenBSD:~$ ls /var/log/messages* /var/log/messages /var/log/messages.1.gz /var/log/messages.0.gz /var/log/messages.2.gz -- Ottavio Caruso
Re: ksh complete_command for commands with "-" in name
On Fri, 17 Jan 2020 at 22:03, Uwe Werler wrote: > > Hi misc, > > I use heavily the feature to set command completion in ksh. Unfortunately > this doesn't work for commands with "-" (like ssh-add, salt-call etc.) in > command name because the parameter name for the array is invalid. I'm not sure if I'm getting what you're saying. I have a barebone plain-vanilla OpenBSD 6.6 installation and I have ksh as my login shell. I can do command and file completion with [TAB] on any commands with a hyphen (pkg-config, ssh-add, ssh-agent, ssh-keygen, ssh-keyscan and so on). -- Ottavio Caruso
"no _STA method" 128 times in dmesg?
Hi, I'm running OpenBSD 6.5/amd64 in a qemu VM (host is Linux Debian). I see multiple lines of "no _STA method" in dmesg. (Full log: https://termbin.com/5ccz) I've asked the qemu developers on their irc channel what it might mean and they said it's ACPI related but they can't determine exactly what it is about. qemu-system-x86_64 -drive if=ide,file=/home/oc/VM/img/openbsd.image \ -M q35,accel=kvm -m 400M -cpu host -smp $(nproc) \ -net user,hostfwd=tcp::-:22 -net nic -nographic This is the command I use to boot OpenBSD: It's probably harmless but I'd like to have your opinion about it. Thanks -- Ottavio Caruso