Category: Someday you will need this

Lazy Reading for 2016/09/25


I manage to avoid a topic this week, really.  That’s good!

Who wants FUSE on DragonFly?


Tomohiro Kusumi is thinking about porting it.  Follow the whole thread for details.

Restarting pf


I may have mentioned this in part before, but Matthew Dillon has a brief script to reload pf when an interface IP changes.  I’m linking it here in case it’s useful in the future.

For VPS users, an ISO


Thanks to a reminder from IRC user ‘cgag’, I’ve put an uncompressed ISO image of DragonFly 4.6 up on the main site.  It’s linked on the download page, and should be available within 24 hours on the mirrors.  If you are buying service from a virtual host provider, and can install an operating system directly from a downloadable URL, this is for you.

Lazy Reading for 2016/07/24


Off-the-beaten-path links this week.  Strap in!

Your unrelated animated GIF of the week: Permanent Wink.

Reminder: move your Hammer cleanup


A useful tip: if your DragonFly machine isn’t usually on 24/7 (e.g. a laptop, not a server), you should move your Hammer cleanup from 3 AM to sometime when the computer is normally on.

UEFI booting and manual installation


karu.pruun shares a story of manually installing DragonFly on a UEFI-booting machine.  In this case, it’s a Macbook, though there’s other non-fruit UEFI machines out there?

Two tips for video and audio


That’s one tip per subject, really.  If you need to set up a ‘video’ group for xorg, here’s the one-liner to do so.  If PulseAudio annoys you, which is not uncommon, ‘chmod -x /usr/local/bin/pulseaudio’ and it’ll go away.

Reminder: sometimes VESA is better


This is limited to some users of specific Intel video chipsets, but: if you get odd screen artifacts in X, the ‘vesa’ driver may work just fine for you.  Or turn acceleration off.  Or set ‘drm.i915.enable_execlists=0’ according to zrj on #dragonflybsd.

(Updated to reflect all the answers in the thread and elsewhere.)

Don’t forget tuning(7)


If you didn’t already know about it, you will find this useful: DragonFly has a tuning(7) man page, about getting the best performance from your system.  Matthew Dillon recently updated the man page with some tips about SSD setup.

When a mouse isn’t a mouse


There are USB devices out there that are sort of like a mouse, as in they work as a pointing device, but they don’t show up as a mouse device.  For example, the PowerMate USB Multimedia Controller.  It’s possible to pipe the events from this or similar ‘weird’ devices to sysmouse, and use it the way you’d expect, with this fix from user tautology.

The rescue undo


Did you know there’s a rescue image, created with crunchgen, in DragonFly?  If your system can boot to single-user mode, you can use it to at least manipulate data on disk – it includes mined as a simple small editor.  (Since vi assumes /usr is mountable.)  This rescue image now includes undo, so you can back out changes on a Hammer volume.

Mounting as non-root


Read this email thread for how to mount devices (e.g. USB drives) in DragonFly when you aren’t root.

Remember: join the ‘video’ group for direct rendering


If you get “libGL error: failed to open drm device: Permission denied” when using direct rendering, make sure to add your user id to the ‘video’ group.

TeX, clisp, and DragonFly


DragonFly versions of TeX have been available for some time now.  However, Nelson Beebe, who is part of the TeX project, is having trouble building some related binaries – asymptote and clisp.  He could use help from anyone interested, to match up with this summer’s release of TeX 2016.

Acceleration for Skylake users


If you are on the Skylake series of processors, and also running xorg on DragonFly, pick ‘uxa’ video acceleration.  Andrew Slaughter found this made a significant different in visual quality.

NFS tuning tips


If you’re on DragonFly, or maybe even if you aren’t, and you are using NFS, here’s some tips on how to wring the best performance out of it.

Lazy Reading for 2016/04/10


I’ve finally used up my Lazy Reading links backlog!

Your sort-of off-topic link of the week: Michael W. Lucas’s fiction is, for a short time, part of a larger book bundle which is available for less than the price of buying it all individually.  Buy now if you want a deal/lots of fiction to read.

 

 

Many, many network connections


I keep posting about Sepherosa Ziehau’s work on sustaining extremely high traffic loads in DragonFly.  Now I’m posting about a tool to create that load: kq_sendrecv.  It creates tens of thousands of TCP connections, without creating a process for each, and uses kqueue, as you might guess from the name.  This may be useful if you really want to tax another system.

Lazy Reading for 2016/03/27


This is actually overflow completely from previous weeks.  I am not sure how I am ending up so far ahead on these but not the Saturday BSD items.  As long as it shows up on the expected day, I suppose it works out.

Your kinda-unrelated item for the week: Butterfly Stomp, Michael W. Lucas’s free short story.  He writes fiction when he’s not writing BSD books.

 

 

garbage[18]: Pixel C, Raspberry Pi 3


Garbage 18 is out, and talks about the hardware in the title – and also goes into tethering between Android and OpenBSD, which I am sure someone will find immediately useful.

disklabel64 tips


If you find yourself using gpt and disklabel64 for a new disk, and aren’t quite sure what order to type everything in to create a disk slice, why not crib from Tim Darby’s notes?  (note that the archive has added some line breaks to it.)

Default shells and library changes


I see this bite people irregularly over the years: if your default shell on login can’t run, what do you do?  I’ve seen it happen because of a missing /usr/lib, and it can happen with out-of-date library references, too.   There’s several different ways to deal with it:

That last one may be useful if your dports setup gets mangled, somehow – though ‘pkg upgrade’ has always worked for me.

Anyone want to add some extattr functions?


It would help with Burp, which is being ported to a number of BSDs.

Debugging tips


If you’re building from dports, and you want to include debugging information, you’ll want to put ‘WITH_DEBUG=yes’ in /etc/make.conf.  Note that this affects anything you build at that point, including world, which you’d want to rebuild anyway.

Checking HAMMER volumes for health


If you are looking to validate the data on your HAMMER volume, there’s several ways to do so, with one common-sense caveat.

DragonFly and Digital Ocean


For those of you looking to rent a place to run DragonFly, Nuno Antunes has very helpfully written out his procedure for installing DragonFly on a Digital Ocean ‘droplet’.

In Other BSDs for 2015/11/21


Another week where there’s so much to link to, it overflows into next week.

Typing into top


Imre Vadász fixed top so that hitting ‘c’ filters displayed processes by command name.  I am mentioning this not because it’s a huge change, but because I forget about all the interactive elements that are possible with top.

Running with clang


If you are using clang with DragonFly, and you want to always run the newest version, you can set options in compilers.conf, and use ‘clangnext‘.

Getting rid of CPUHOT messages


If for some reason you are seeing messages about your CPU overheating – and you know it is not, there’s a solution.  Disable coretemp messages.

Note that if your CPU is actually overheating, turning these messages off won’t help.  Don’t want anyone to be surprised when their computer melts…

Lazy Reading for 2015/08/23


This is the week for entertainment, not deep thought.

 

Speeding up your DragonFly boot


If you are sure you don’t need to look at your boot menu for very long in DragonFly, you can make it zip by quickly.

NYCBUG: Precision Time Protocol


NYCBUG is having a chronologically appropriate speaker: Steven Kreuzer, talking about the Precision Time Protocol.  It’s 6:45 PM (EDT) tonight, at the Stone Creek Bar & Lounge in New York City.

Building only one compiler


DragonFly builds two compilers by default.  If you weren’t interesting in building both, there were switches to build only the default, like NO_GCC47.  This changed with every compiler update.

With the switch to GCC 5, the new switch is “NO_ALTCOMPILER”.  That will last through compiler changes.  I’m mentioning this now because sooner or later, you’ll want to gain back some time on a buildworld.

Periodic reports on DragonFly


I have had trouble with my daily/weekly periodic reports never making it to my GMail account.  Sascha Wildner pointed out to me that periodic.conf has its own answer already:

daily_output=”/var/log/daily.log”
daily_status_security_output=”/var/log/security.log”
weekly_output=”/var/log/weekly.log”
monthly_output=”/var/log/monthly.log”

… and newsyslog is already set to take care of them.  There’s more in the periodic.conf man page.

 

New wireless documentation


John Marino’s written an extensive page about wireless and DragonFly, on dragonflybsd.org.

In Other BSDs for 2015/03/28


It’s been a quiet week in BSD-land, at least in terms of me finding links.

Keymap details


If you’re looking to change your DragonFly system’s keymapping to support a non-US character set, use this users@ post from Adolf Augustin as a cheat sheet to make all the right changes.

New locking and synchronization docs


Matthew Dillon has rewritten the Locking and Synchronization documentation for DragonFly.  Keep this in mind the next time you say “Which lock should I use for this new software/ported software?”  There’s also locking(9).

A PHP upgrade note


The other day, I updated some packages using pkg.  The default version of PHP went from 5.4 to 5.6.  I ended up doing what /usr/dports/UPGRADING says and making a list of all PHP packages on my system, before removing PHP and its dependencies.  I then reinstalled the packages that used PHP, bringing the needed packages back in at the right version.  pkg 1.4 didn’t handle the transition cleanly, unfortunately.  I also had to specify mod_php56 because pkg was trying to get the 5.4 version despite it not being default.

None of these are insurmountable problems, but it never hurts to be forewarned.  pkg 1.5 is on the horizon and may have an easier time with sorting these types of dependency/version changes.  This may apply to FreeBSD in addition to DragonFly.

HDMI sound trick


If you have a HDMI-connected monitor, but no sound, this trick about increasing available memory may help.

Really turning off Sendmail


This bites many people sooner or later: you think you’ve turned sendmail off, but it still gets opened up on your system.  The answer: sendmail_enable=”NONE”.

(It should support sendmail_enable=”NOPE”.)

DragonFly and Git


DragonFly is the only BSD, I think, to switch fully to Git for version control, and Matthew Dillon wrote up how DragonFly uses Git.

Slider, Hammer, and how to


John Marino has written up an extensive how-to for slider, the history tool for Hammer filesystems, including screenshots.

Don’t forget moused


For whatever reason, I’ve seen several people in the last week or so have mouse problems on install, and they were often solved by running moused.  So, there’s your little reminder.

sshlockout in DragonFly


Matthew Dillon’s added a sshlockout utility, to temporarily block SSH traffic from repeated brute force SSH login attempts.  It’s been mentioned before, but it’s in the system now.  It’s been refashioned to work with pf.

Posted by     Categories: DragonFly, Someday you will need this     0 Comments

Slider, for Hammer


John Marino has created something very useful: a graphical tool for Hammer file history.  It’s called ‘Slider’, and it uses curses to work in a terminal.  It shows historic versions of files and can restore those old versions as needed.  This was already possible in Hammer, of course, but it required a sequence of commands that were not straight-forward.  I’ve been slow enough posting it that version 2.0 is already out, offering a way to see files that no longer exist, but are still in history.  (i.e. deleted some time ago)  ‘Time Machine’ sounds like the best name, but that seems to be taken.

A tip for Hammer disks and history


One way to keep file history on an very active Hammer disk from eating up all the space: more snapshots.  This may seem counterproductive, but disk pruning eliminates historical data between snapshots, so you can keep older data at the cost of some temporal accuracy.

Swapcache and improving performance


From a question about mixing in a SSD and a very slow disk: swapcache can make things better, though I suggest other crazy arrangements.

dports without X11


If you really, really want to make sure you aren’t pulling in any parts of X when installing dports, and you’re building from source, there’s a few options you can set to keep X11 off your system.  You can even go farther.

In Other BSDs for 2014/12/13


Get ready for some reading.

Installworld, no matter what


It’s possible, if you are several releases (years) behind, to end up with a DragonFly system that can’t compile and install the current release, due to incremental changes over time.  It’s rare, but it could happen now between, say, version 3.4 and 4.0.  The usual solution would be to incrementally upgrade in order, which is a lot of building and updating.  The alternative is the new installworld-force option from Matthew Dillon that forces a new set of binaries into place.  Use as a last resort.

The Varialus page


This page, Varialus et Anisoptera, set up by… I’m not sure of the real name but it’s ‘varialus’ on IRC – has a detailed description of the DragonFly install process and installation of MATE, plus extra notes.  I always find these sorts of cheatsheets entertaining.

LDAP and DragonFly


Predrag Punosevac posted his writeup of using LDAP and DragonFly, which I’m noting here for the next person that needs LDAP authentication.

For DragonFly/nginx users


If you are running DragonFly, and also using nginx, the so_reuseport option will give you a significant speed boost.  I’ve mentioned it before, but not this directly.

Posted by     Categories: DragonFly, Someday you will need this     2 Comments

Special procedure to update pkg 1.3.6


It seems pkg 1.3.6 was slightly scrambled.  If you happen to have built and installed it, John Marino has special instructions on how to update to 1.3.7.  If you are on DragonFly 3.8, you can follow those instructions now, and if you are on 3.9, that repo should be ready for an update in the next few days.

New kernel and new target


You should perform a full world and kernel install if on master.

Several people (including me) have been getting bit by a problem: when performing an installworld with a changed kernel, the vn kernel module is loaded, but it was built by the previous kernel and may cause problems when it doesn’t match up.

To fix that, vn is now built in, instead of being a separate module.  The rescue initrd (which is what is being mounted when it has this problem) is now installed via a ‘make rescue‘ command that can wait until a successful installworld and reboot.

iwn trick: ifconfig wlan0 -ht


If you have a DragonFly system with an iwn wireless chipset, and you are having trouble connecting and running in the 5Ghz part of the spectrum only, here’s a tip: the -ht switch may fix it.

Improvements for qemu


While Matthew Dillon was testing the new up-to-256-processor support for DragonFly, he added a few sysctls, one of which helps qemu performance when emulating a lot of processors.  I note it here in case it’s helpful to someone else.

How to keep Hammer empty


A note for everyone: use Hammer default on a very busy filesystem, and you will eat a lot of disk space since all file changes are recorded.  (I’ve done this to myself a few times.)  Francois Tigeot has a list of tips on how to keep that from happening.

Hammer and buffers


Are you running a Hammer filesystem on a low-memory system?  You may get some warnings.  It’s possible to tweak some settings to accommodate it, or just deal.

Books discounted at O’Reilly


O’Reilly is running a 50% off special on a variety of books on electronics, with coupon code WKECTRC.  I’m posting it now because it only lasts for this week.

Update: another offer just popped up in my email – 50% off various “web performance and operations” books with the code CFVLTY4.

Posted by     Categories: Books, Someday you will need this     0 Comments

Building with the system OpenSSL


If you’re building ports, it will treat OpenSSL as a dependency and bring in whatever version is available.  If perhaps you want to use the version of OpenSSL installed as part of your base system, Robin Hahling has the answer for how.  (This probably works on FreeBSD too.)

locking(9) man page added


Thanks to Markus Pfeiffer, there is now a locking(9) man page for use the next time you say, “Which is the right lock to use?”   Something I see almost monthly.

In Other BSDs for 2014/05/10


Short week, cause I’m on the road…

Posted by     Categories: BSD, Someday you will need this     2 Comments

LibreSSL gets started


Remember the joke I and probably a zillion others made about OpenOpenSSL?  It’s happening, except it’s called LibreSSL. (thanks, Tomáš Bodžár)

Posted by     Categories: BSD, Someday you will need this     3 Comments

GUI images for DragonFly 3.6 sort of


If you noticed the lack of a GUI DVD image for the 3.6 release of DragonFly, I posted a followup note on the users@ list that talks about the steps to get X installed.  It’s not much work, with pkg set up.

Backing up Hammer to non-Hammer volumes


Hammer’s ability to stream to remote disks is great, but what if you have storage that uses some other file system?  Antonio Huete Jimenez put together a shell script that will dump out the contents of a Hammer PFS, for upload to whatever.  Read the README for the details.

pfi and authorized_keys support


pfi, the automated installer that nobody knows about, now supports installing an authorized_keys file as part of an install.  Credit goes to Alex Hornung for adding the functionality.

Did I mention new USB?


There’s been periodic commits updating the USB4BSD support in DragonFly; I haven’t been linking to them because they are generally incremental. However, it’s good to (re?)mention just how you can build DragonFly with that new USB support.

Time zone changes


Recent updates to tzcode apparently fixed a long-standing time zone bug in DragonFly.  POSIX says the America/New_York timezone is picked as default if nothing else has been selected.  That didn’t happen in DragonFly – until recently.  If your timezone seemed to suddenly jump to U.S. Eastern time, that’s because you never picked before.

32-bit DragonFly 3.7 and dports


There are no binary packages built for dports, on DragonFly 3.7, for 32-bit machines, at this time.  Pierre Abbat found this out.  You can build from source, of course, or just use 3.6 packages.  Don’t forget -DBATCH to avoid getting asked for build options when building from source.

Trackpad support summary


I didn’t post this before, and should have: Matthew Dillon posted a summary of all the trackpad improvements he added, and how to make use of the various features.

Hal, dbus, and VMWare tip. Also pkg locking


Warren Postma found that hal and dbus caused a crash in VMWare for DragonFly.  The answer is to use moused, not dbus.

Also, if you want to keep a custom or just older package from dports on your system, as karu.pruun did, ‘pkg lock’ is the answer.

Lazy Reading for 2014/01/12


There’s a lot this week, so let’s get started:

Git Reference.  Not that there isn’t a lot of other documentation out there, but much of what you find is people asking specific questions rather than explanations of procedure.  (via)

Movie Code.  At least most of these are using legit code, even if it’s often the wrong application.  It’s been worse.  (See ‘state of the art video’ item)  (via)

Unix: 14 things to do or stop doing in 2014.  These tips are actually useful and contain no buzzwords.

TrewGrip, another item in my quest for interesting keyboards I don’t use.

4043 bytes to recreate a mid-80s IBM PC.  There are less bytes of data in the program than there were transistors in the CPU that it emulates.  It can run MS Flight Simulator.  It was for the International Obfuscated C Code Contest, which should surprise you not at all.  (via)

The World’s Most Pimped-Out ZX81.  I don’t think it can run Doom, though.

The Unix Shell’s Humble If.  For once, an article that doesn’t just pretend bash is the only shell that exists.  (via)

Unix Shell RPG Tutorial.  It’s exactly what that combination of words means.  (via)

Scientists tell their favorite jokes.

Best programmer jokes, found here where there’s more.

I find these animations slightly hypnotizing.  (via)

Technology used to suck even when it was cutting-edge, and we’ll still feel that way in the future.  (via)

How did we end up with a centralized Internet?

Software in 2014.  The summary is: server side is great, client is not.  (via)

Able to be turn on, and that is it.  Sci-fi movies ignore where technology comes from.

True Nuke Puke Story.  My mine coworkers once did something similar to a copier repairman; got him so worried about going underground that he had a panic attack when he had to step on the hoist.  We had to get a new repairman.

Your unrelated link of the week: BIG ENDING FACES!  (via)

RTL8191SE support


‘M M’ had trouble with his “Realtek RTL8191SE Wireless LAN 802.11n PCI-E NIC” on DragonFly some time ago.  He was able to get it working, and he documented the somewhat convoluted procedure here.

Tracking the bleeding edge of DragonFly


If you want to track the bleeding edge of DragonFly, which is currently version 3.7, I happened to describe it in a reply to Filippo Moretti, on users@.  Long-time users will know this/do this already, but it’s worth repeating just because new users may not realize how easy it is.

Posted by     Categories: DragonFly, Someday you will need this     0 Comments

My DragonFly 3.6 upgrade adventure


Here’s how my upgrade from DragonFly 3.4 to 3.6 for this server went.

The system install went normally.  I rebooted before performing ‘make upgrade’, as noted in UPGRADING and elsewhere.

I already have dports installed, so a binary upgrade should be possible.  I had heard of people with older version of pkg, having trouble getting it to notice upgrades.  I rebuilt pkg, and ran ‘pkg upgrade’.  A number of the updates coredumped.  Here’s one example:

[156/160] Upgrading gtk2 from 2.24.19 to 2.24.19_2...Segmentation fault 
(core dumped)

After the upgrade, I had two problems: PHP wasn’t working for the website, and some programs would segfault.

The random segfault was fixable by forcing a binary upgrade of all packages.  Since there were some programs on the system that were still new enough that the version number was the same as on the remote repository, pkg didn’t upgrade them.  Those packages were linked against old versions of system libraries that predated the locale changes in DragonFly 3.6, so they’d crash.  Forcing the update for all packages fixed the issue.

The other problem, PHP on the web server, is not new to me.  The binary package for PHP does not include the module for Apache.  The solution is to build from source with that option selected.  I understand that pkg is destined to support (some?) port options in the future.  There’s also an immediate workaround for locking it.

However, the port would not build because of a security issue.  The binary package installed without any warning.  This, I am told, will change to pkg giving you the option to install if you are aware of the security problem, and whether it really affects you.  (which is just what I want, yay!)

Anyway, other than the system changes biting me because I didn’t realize some packages weren’t updated, it went very quickly.  That is the reason for binary updates through pkg, or at least a major one.

Lazy Reading for 2013/12/22


Still quiet out there, but I found some good reading.

PHP functions originally named for string length and sorting.  Yeesh.  (via)

A great old-timey game programming hack.  There’s an initial speed hack in this story, and then there’s another clever trick to fix memory corruption.  (via)

My hardest bug.  This was a pretty fiendish problem.  (via)

Gitdown: don’t commit when drunk.  I’ve done that.  Actually will use an Arduino-based breathalyzer.  (via)

Another Perl One-Liners review.

Zeno of Elea, a game.  It’s based on a classic… (via)

Vim plugins you should know about.  From that One-Liners author.

Speaking of Perl, here’s a Larry Wall interview.  An old-school hacker – he wrote patch, too.

Moonpig: a billing system that doesn’t suck.  An in-depth review of system design.  More Perl, too.

Three Books You Should Read…  Mostly BSD content.

How to use Tor wrong, in multiple ways.  It’s not for petty crimes, and it’s not any use when you’re using it from a monitored network.  (via)

Your unrelated comics link of the week: Cookie Puss.