Power notes, booting notes

Two links I yoinked from conversation in EFNet #dragonflybsd: there’s a “powersave” power management page on dragonflybsd.org that for some reason wasn’t linked in the main documentation page. I fixed that, and you may want to look at it and change your mwait settings, or look at the corepower(4) module. (From ivadasz’s comments; thanks!)

There’s also an older page on DragonFly and grub2 that may be interesting to anyone looking to boot. (From aly’s comments; thanks!)

File deprecation and DragonFly upgrades

On your next DragonFly upgrade, watch the end of your ‘make upgrade’ output. You may have some deprecated files, especially if your system has been upgraded through several releases.

= You have 11 now deprecated files.
= Once you are sure that none of your third party (ports or local)
= software are still using them, rerun with REMOVE_DEPRECATED set.

The now-deprecated files will be listed just before this warning. They aren’t removed automatically in case there’s installed software still linking to them. If you are running only dports software, and are up to date with all of it, you are probably fine to remove these files:

make -DREMOVE_DEPRECATED upgrade

If you have software you compiled yourself some time ago, it may have linked to these old files. One way to search for that would be to use find to find all executable files that are in particular directories, and then use ldd to see what shared libraries are used by each executable:

find /usr/local/bin /usr/local/sbin -type f -perm +a+x -print -exec ldd {} \; 

… and then grep for the names of the deprecated files. You’ll get a bunch of “not a dynamic executable” errors when you do this because it’s a rough example I did for this post, but you can always pipe the stdout of the command to a file and review later. If you do turn up any executables linked to the deprecated files – recompile!

(If you have a better find string or strategy, please comment.)

Lazy Reading for 2018/12/23

Merry almost Christmas!  I hope you like reading, because I’m linking to some large collections of text.

Lazy Reading for 2018/12/02

It’s a classic Lazy Reading this week – some deep dives, some history, some stuff that will take a while to explore.  Enjoy!

In Other BSDs for 2018/11/17

Still lots of BSD stuff happening.

Fetching DragonFly src over https

If you happen to be using DragonFly from a network location that only allows http/https as outbound traffic, you won’t be able to update /usr/src using defaults.  /usr/Makefile pulls DragonFly source using a git:// URL.

The fix is to use the read-only Github mirror.  You can set origin manually or just change GITHOST in /usr/Makefile (or GITURL_SRC if you are on DragonFly-master) to “https://github.com/DragonFlyBSD/DragonFlyBSD”.

(Guess what I did today?  Updated to note it’s different on -master.  Thanks tuxillo for reminding me of this whole thing.)

Lazy Reading for 2018/10/14

A good, oddball week.

Your unrelated comics link of the week: Draculagate, a book funded by Kickstarter.  Watch the video.

 

DragonFly, Cygwin, and PuTTY

To add to my ongoing slow fiddle with DragonFly: I’ve noted how to install in Hyper-V, and how to use Cygwin to connect to run X.  Here’s another step: if you are using PuTTY/Pageant, as I am, and want to connect, Cygwin/X needs to be told to listen on TCP.  Find your /usr/bin/startxwin file in Cygwin and change serverargs to:

serverargs=”-listen tcp”

And then in PuTTY, under Connection -> Session -> X11, check “Enable X11 forwarding”, set X display location to “:0.0”, and locate your .Xauthority file.  It will be in your user’s Cygwin home directory.  (tips found here)

plink can be used to create shortcuts – open an xterm directly into your DragonFly VM from your Windows desktop, for instance, with a shortcut that runs ‘plink <sessionname> xterm’.

If you are running a slightly newer version of Windows and aren’t trying to accommodate a ‘legacy’ PuTTY install, using Windows Subsystem for Linux may work better; I have not yet tried.

DragonFly on Hyper-V, locally

For the future edification of others: I mentioned I installed DragonFly under Hyper-V on a Windows 10 laptop.  I wanted to be able to open a terminal on DragonFly while in my Windows environment.  I have that now; here’s what I did:

  • Installed DragonFly in Hyper-V (see my prior install notes)
  • Installed xorg on DragonFly.  (pkg install xorg)
  • Installed Cygwin/X on Windows 10 – specifically, the xauth, xorg, xterm, xclock, cygutils-x11, and openssh packages.
  • In DragonFly, set these items in /etc/ssh/sshd_config :
    • X11Forwarding Yes
    • X11DisplayOffset 0
    • XAuthLocation /usr/local/bin/xauth
  • Run XWin Server on Windows 10.
  • Run CygWin64 Terminal on Windows 10
    • export DISPLAY=:0.0
    • ssh -Y (address of DragonFly host)
    • Once logged in, type ‘xterm’.

At this point, a terminal window should pop up on your Windows machine, showing your DragonFly username@hostname as the prompt.  You are set!

Next steps – getting this working with PuTTY, Pageant, and Plink.

Hyper-V and DragonFly

I tried Hyper-V, and of course, I had to install a virtual DragonFly system.  Sascha Wildner very helpfully pointed out that DragonFly on Hyper-V requires a legacy network adapter and a gen-1 image type; both changes you can make during initial setup.  I’m noting it here for the benefit of future people walking down the same path.

Note: pick ‘legacy BIOS’ during the actual DragonFly install, too.