Showing posts with label computers. Show all posts
Showing posts with label computers. Show all posts

10 May 2015

Fedora 21 + djbdns

I've been using djbdns for a long time on many different platforms. It's secure, fast, and cryptic. You could even call it peculiar or eccentric if you like. It was a perfect match for OpenBSD, but that's a story for another day. It's too easy on Ubuntu, since it's available through apt-get, so that doesn't need a discussion at all. Today, we're here to talk about Fedora.

I have a shiny, new installation of Fedora Server 21. I picked some package groups that sounded interesting for my purposes but intentionally did not select DNS because I didn't want BIND on my server. (Remember, secure is the goal.)

As often as I've installed it, I still check the directions, since it's always best to follow along very specifically when DJB says to do something. Step 1 is for local documentation, so I skip that. Step 2 is download, but I already have it. Step 3, extract. Step 4, compile (using the fix for the Linux bug as described). Step 5, install. Easy! But first, make sure you installed daemontools and ucspi-tcp. Whoops. No harm, no foul, just go install those.

Unfortunately, neither of those compiles. Luckily I've seen that before. It's a quick replacement in one file for each package.

daemontools
/package/admin/daemontools-0.76/src/error.h
  • - extern int errno;
    + #include
ucspi-tcp
ucspi-tcp-0.88/error.h
  • - extern int errno;
    + #include

I then return to the first page to pick which specific application I want to configure. In my case, it's often external cache. I note at the top "These instructions assume that you have already installed daemontools and djbdns, and that svscan is already running." It seems logical to check first: `ps auxw | grep svcscan` What's that? It's not running?!

I check the install script in the package which leads me to /package/admin/daemontools/package/run which has:

if test -r /etc/inittab
then
  /command/setlock /etc/inittab package/run.inittab
else
  /command/setlock /etc/rc.local package/run.rclocal
fi
Sure enough, /etc/inittab exists:
# inittab is no longer used.
#
# ADDING CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.

Well that's not good. Fedora 21 uses systemd. <sigh> DJB checks for the file; Fedora includes the unused file; svcscan thus fails to start.

I could probably modify /package/admin/daemontools-0.76/package/run.inittab to check for some text in /etc/inittab, but that hardly seems good either. Who know what text will be in there in the future or in another language, or ...

Putting it into /etc/rc.local isn't the systemd way anyway. It also didn't work. Probably because I don't have csh which is what was added to rc.local using that method. I would wager that DJB would say Fedora is doing things wrong; it used to work fine; they broke it; not his fault.

I can't really argue with that, but I still want it to work. My guess is installing csh with sudo yum install csh is probably the quickest fix. I'll call that "the end" as I delve into systemd for the first time to see if I can get that working.


Update: This! I now have svscan running from systemd.

06 April 2015

VirtualBox Host key

I'm using Ubuntu 14.04.2 LTS with the latest patches available.  I spun up a virtual machine in VirtualBox 4.3.10 and quickly became annoyed that common key combinations popped up messages, some of which offered to shutdown or reboot my guest OS.

I found the Preferences, Input, Virtual Machine, Host Key Combination setting pretty easily and changed it from the default Right Ctrl to Left Ctrl + Left Shift, considering it's far more rare for me to press two modifiers at the same time, other than Ctrl-Alt perhaps.

No soap.  The Right Ctrl stayed as the modifier!  I thought maybe I had to try turning it off and on again.  Maybe exit VirtualBox entirely?  Still nothing.  Every time, the preference would reset back to the default.

I even found the configuration file ~/.VirtualBox/VirtualBox.xml on my system, though the new default is ~/.config/VirtualBox/VirtualBox.xml but it was not obvious what I might want to change the value to.

<ExtraDataItem name="GUI/Input/HostKeyCombination" value="65508"/>


Then I found a bug report!

Comment 1 had my answer:
  1. Open VBox "Preferences..." / Input page / Virtual Machine tab.
  2. Change the shortcut for "Host Key Combination" in embedded-editor of the shortcut table and (!) press Enter (or Return) key while this shortcut embedded-editor is opened. GUI applying shortcut changes only in that case as this is the default Qt behavior. If you simple press OK button instead your change will be discarded.
 Fix is part of VBox 4.3.14

28 February 2015

Ubuntu changed my clock to UTC

I dual boot my computer between Ubuntu and Windows 7. After my upgrade from Ubuntu 12.04 LTS to 14.04 LTS, I noticed that my clock was wrong in Windows. It was obvious that my hardware clock had been on EST and got switched to UTC during the upgrade. The worst part, I think, is that I even remember getting asked during the upgrade what time zone to set the hardware clock to. I guess the default changed, since my result was different.

I knew there had to be a way to fix it, and a quick search showed me the answer. Ubuntu hardware clock correction

14 December 2014

Convert YouTube video to mp3 audio

My YouTube downloaders broke a while ago. I came across this site while trying to find something that works today. Lucky for me, I only wanted audio today (to make an alarm ringtone for my phone). It does all the work. There's nothing to download (other than your mp3) and nothing to install. Just paste in the URL and let it convert.

http://www.youtube-mp3.org/

18 April 2012

Ubuntu 12.04 Precise Beta 2 failure on VMWare

I saw a post from Ubuntu on Facebook that was asking for beta testers. I didn't officially sign up, but I did download http://cdimage.ubuntu.com/ubuntu-server/daily/20120417/precise-server-amd64.iso to test on a VMWare ESXi embedded cluster running 3.5.0 build 110271

The system booted from the ISO, and I proceeded through the keyboard selection and network settings. Then there was nothing. The system didn't lock up; pressing Alt-F2 got me to a working terminal.

The installation screen looked like this:


The log on Alt-F4 showed this:


I'll try again as well as search for other images to see if one works better than the one I downloaded.

Update: When I set up the VM, I didn't select the correct switch, so DHCP failed. During the install, I changed the switch and let it retry the network configuration. It succeeded then asked for the hostname. I just repeated those steps and have the same purple screen with no more activity. Having the correct network switch selected before network configuration allowed the install to complete normally. I call that a bug.