Jeff Duntemann's Contrapositive Diary Rotating Header Image


Lazarus, Stay Where You Are!

…because when you came forth, you stepped on my bootloader.

I’ve tried to like Lazarus. I’ve tried for years. I can only assume that (as also evidenced by its similarly screwy cousin, Kylix) there is something in the Linux platform that makes Pascal compilers go a little bit whacko.

A few days ago I installed the KDE Fedora Spin in a new partition on my Linux box. It’s been a good education in the Plasma desktop. Plasma is all very blue and cold looking (way too blue for me, in fact, though the default wallpaper is striking) but unlike my first taste or two of KDE 4, it actually works.

So I started installing the software I’m familiar with to begin using it, and somewhere down the list was Lazarus, the Delphi-ish GUI front end for FreePascal. The package available from Fedora was V0.9.28.2, which is considerably newer than the one I have installed on Ubuntu Lucid, and only a little older than the one you can get from the project Web site. After it downloaded and installed all of its enormous pile of stuff, it asked me to restart Linux. I did.

And grub failed to run.

All I got was a blinking text cursor in the upper-left corner of the screen. This is the first time I’ve ever seen grub fail, apart from the well-known habit of Windows to overwrite grub with its own bootloader. (This is why Windows goes in first, if you’re going to have it at all.) I booted the Ubuntu 11.04 live CD I’d burned a few days after it was released, just to see if my MBR had been damaged. As best I could tell it had not, but I’m not good enough at grub’s internals to really be able to tell what was wrong with the software itself. Since I had plenty of free space on the 750 GB drive, I just installed Ubuntu on yet another partition, hoping that its update of grub would put things right. And it did.

So why would installing a compiler and an IDE mess up the OS bootloader? (Anybody?) I don’t have a lot of clues. The copy of Lazarus I installed looks like it works as well as Lazarus ever does, so I can’t assume that something in the installer or the package glitched and overwrote something unrelated. None of the other partitions on the disk were affected, as best I can tell. I’m tempted to install Lazarus under Ubuntu, to see if it will stomp on Ubuntu’s copy of grub as well…but that will happen another day, when I’m not as busy and not so grouchy.

Fedora Spin: KDE Desktop

Sometime back I ran into a concept called Fedora Spins, which are customized Fedora installs with different desktops (KDE, LXDE, XFCE) or a slant in some direction like security, graphics, or games. I downloaded the KDE Spin ISO earlier today, burned it to CD, and this evening (having burned out on ebooks) took it for a…ride. I had 300 GB of free space on my Linux box, so there was no reason not to, and I’d like to get a little better at the KDE Plasma desktop.

Some reactions:

  • The Fedora partitioner is very good. I did a manual partition operation, and created a new 60 GB partition for Fedora, and a 12 GB swap partition. It helps to know a little bit about partitioners generally, but overall it was intuitive and gave me no trouble.
  • For some reason, Fedora installs grub with grub’s hiddenmenu option enabled. (It’s conceivable that I accidentally chose that somehow, but I don’t recall being asked.) This means that at boot time, grub’s menu isn’t displayed, and the system boots directly into Fedora. (The system already has Ubuntu Lucid and Windows XP on it.) You can get the boot menu by pressing F10 during grub’s timeout period, but otherwise you aren’t presented with an OS menu at all.
  • Fedora recognized the existence of my XP partition, but didn’t know what it was. In grub’s menu, XP is therefore listed as “Other.” However, if you select it, grub boots it just fine.
  • Fedora has a GUI bootloader configuration utility that allows selection of the timeout value and the default OS. However, the utility’s sole window does not have a Save or Apply button. You can make changes, but closing the utility throws them away. Wow. This is a bug, and not a brand-new one.
  • Unlike Ubuntu, Fedora does not automatically add the initial user account to the sudoers list. So try to do anything rootish like editing grub’s config file gives you that inane message “jduntemann is not in the sudoers list. This incident will be reported.”
  • Adding yourself to the sudoers list is seriously unintuive, but the best way is probably to use the visudo command, which opens a vi edit window with the sudoers list ready to change. Add USERNAME ALL=(ALL) ALL to the end of the file and save; it’s done. Details here.
  • Fixing grub requires editing the grub.conf file and commenting out the hiddenmenu option. While I was there, I also changed the description of the XP partition from “Other” to “Windows XP.”
  • A 2.8 GHz Dell SX280 does not have sufficient graphics chops to run Plasma’s desktop effects. I wanted to see just how slow they were, but within seconds of enabling desktop effects, Fedora disabled them again. I knew that the SX280 wouldn’t run them well from my online research (it’s one reason I’m getting a more powerful Linux box shortly) but I didn’t know the system would simply refuse to run the effects against my wishes. Interestingly, Ubuntu’s GNOME desktop effects subsystem works on the same machine.

Overall, getting to a usable configuration with Fedora is a lot more screwing around than with Ubuntu. But once done, it works well. More as I experience it.

Odd Lots

  • Ubuntu 11.04 Natty Narwhal is out, and hardly anybody’s even mentioned it. Could it be that nobody’s really upgrading every six months anymore? (My workaday Linux system is still running 10.04.) I’m not bullish on Unity, and may reconsider Kubuntu when I set up a GX620-based Linux box in coming weeks.
  • The formidable Al Williams has a three-part series on DDJ explaining how to use the visual tool App Inventor to create Android apps. I have not used App Inventor yet, but Al’s analysis of the challenges of using it (and of visual metaphors for programming generally) are worth reading. Part 1. Part 2. Part 3.
  • John Scalzi has written a brand new Fuzzies novel. (Not furries, Fuzzies–tiny aliens created by H. Beam Piper.) Scalzi’s good–this one could be fun. I’ve read all the Fuzzies books (by Piper and others) and truly only like Little Fuzzy (the original) and Fuzzy Bones by William Tuning. Fuzzy Sapiens is so-so, and Fuzzies and Other People is so awful that Piper chose not to submit it for publication after he wrote it in 1962. It was found in a box after he committed suicide in 1964, and not published until the late 1980s.
  • Interestingly, most of Piper’s copyrights were not renewed, and a great deal of his work (including Little Fuzzy) is now in the public domain. Go to the “P” author page on Project Gutenberg and scroll down.
  • I heard years ago that armadillos are the only other mammalian species that contracts leprosy, but now there’s evidence that virtually all human cases of the disease (which is vanishingly rare these days) were contracted from them. (Thanks to Pete Albrecht for the link.)
  • Illinois is banning trans fats in its schools (with a notable exception for doughnuts, how healthy!) but does anyone dare remind them that there is absolutely no trans fat in unhydrogenated lard? In terms of monounsaturated fat (the good fat) lard comes out better than butter, and both are far better than the vegetable oil spreads we call margarine. Funny how the more animal fat I eat, the more animal fat (my own!) that I lose. (Thanks to Pete Albrecht for the Illinois link.)
  • And the much-reviled Dr. Eades makes the point that Mediterranean people who supposedly take all their foods as olive oil are actually doing a lot of their cooking in animal fats, especially lard. (They export the olive oil to people like us, who think it’s healthier.)
  • This gets an award for something. I’m still not sure what.

Restoring Grub with Rescatux

If a task has to be done often enough, sooner or later somebody will automate it. And so it happened with a very common task that I’m glad I didn’t have to do the hard way: Restore Grub to the MBR after a Windows reinstall overwrote it.

Windows does not play nice with Linux the way Linux plays nice with Windows. When you install Linux on a hard drive that already contains a bootable Windows partition, Linux adds the Windows instance to the Grub bootloader menu, allowing you to choose which OS to boot on startup. On the other hand, when you install Windows to a hard drive that already contains a bootable Linux partition, Windows ignores the Linux partition and puts its own bootloader link into the master boot record (MBR.) At startup, the system boots straight into Windows. Linux is still there, but you don’t get to choose to boot into it at startup.

Getting Grub back into the MBR after a Windows reinstall isn’t hideously difficult, but it’s a bit of picky terminal work done from a LiveCD. The trick is knowing how. The canonical description of how to do it is borderline incoherent, including advice like “This method apparently no longer works. Use with caution (if at all.)” The information is all there, but you have to dig a little to make sense of it. (Being a Linux geek helps a great deal.)

There’s now an easier way that I wasn’t aware of the last time I had to reinstall Windows on a dual-boot system: The Rescatux LiveCD. It’s a Debian instance with some scripting added that puts up a wizard and automatically detects installed bootable partitions. It then rebuilds the Grub bootloader menu and points the MBR back to Grub.

A couple of cautions:

  • The wizard is fairly terse. Don’t expect a great deal of handholding. If you don’t have any prior experience with Grub, read the documentation on the Web site. Then read it again.
  • Give the wizard time to work at each step. When you click the OK button, the options reappear immediately, but when there’s some disk access to be done, the script goes off to work and doesn’t give you any indication that it’s working. It doesn’t take more than a few seconds. Be patient.

I failed to be patient the first time I ran Rescatux, and clicked something once too often. (I’m still not entirely sure what.) When I booted the system again, Grub ran and Ubuntu was listed, but this time Windows was missing. There’s some rough justice in that, I guess, but I need to get into Windows just as surely as I need to get into Ubuntu. So I rebooted back into Rescatux and ran the wizard again, giving it enough time to finish each step. Another reboot, and Windows was back in the Grub bootloader menu.

Supposedly Rescatux works with both Grub 2 (the current version) and “Legacy Grub,” V0.97. My system uses Grub 2, and thus I didn’t test its dealings with older Grub versions.

It’s still a little rough, but it saved me a certain amount of eye-crossing terminal work this afternoon, and that’s always a good thing. Be careful and read the doc before you begin, but having said that, I do recommend it.

The MacSlow Cairo Clock Black Border Problem

CairoClockProblem.pngI’m slowly coming out from under something very like bronchitis, but I wanted to get this item posted because I see nothing about it online: When Mac Slow’s excellent Cairo Clock is installed under Ubuntu with all the desktop defaults, it does not overlay itself on the background correctly. (See screen shot at left.) This was initially a head scratcher for me, because the very same version of Cairo Clock (0.3.4) works perfectly under Ubuntu 10.4.

What I didn’t realize is that in the process of tweaking Lucid Lynx this spring (before I installed Cairo Clock) I changed the Visual Effects option from None to Normal. The clock requires something in the GNOME desktop visual effects mechanism, and when I changed Visual Effects to Normal instead of None, it worked as expected, clipping to the clock face with a nice transparent drop shadow.

The option is in the System | Preferences | Appearance dialog, under the Visual Effects tab.

Nothing more than that, and not a big deal. I’m posting it in case some other Ubuntu noob has the same problem and can’t figure it out. If I can save some poor guy an hour and some hair this easily, I will.

Daywander (10/10/10/10:10 10!)

What were you doing today at ten after ten? Over here, Carol and I had just left the garage on our trip down the mountain to go to church, and she was swapping in a new mix CD I had made to the 4Runner’s 6-CD changer. Not very cosmic, except in the sense that it was life proceeding as usual and well. Sure, my back still hurts (and for some reason, more than usual today) but Carol is by my side and my dogs are always happy to see me.

Better still, we went over to Wal-Mart after church and I found a species of dry-roasted peanuts without MSG, thanks to Jen Rosenau’s suggestion. They’re a little odd and not quite the dry roasted peanuts I’m used to, but tasty, albeit a little bit sweet. And lord knows, they’re cheap.

Ubuntu V10.10, Maverick Meerkat, was released today at 10:10 (I think; that’s the legend at least) South African time. I torrented it down earlier today in sixteen minutes flat, and will install it in the day or so. (I may try tonight if I don’t run out of steam.) It’s not a big-deal release, and I’m installing it immediately on its release to test if installing a Ubuntu version on Day 1 is less wise than waiting a month or two, as I’ve generally done in the past. I’m going to try Wubi this time, and will report in detail when it’s in and working.

I guess the best news of all is that I counted some Geigers today for the very first time. My radiation test sample is a 1950s aviation panel meter with radium paint on the scale and the pointer. After trying a number of transformers in the last two weeks I hit the jackpot with an old Merit A-2924 interstage transformer, which has the most extreme impedence ratio of anything in my formidable junkpile: 125 : 100,000 ohms. Alas, the spark gap only took the charge on the caps to about 550V. I swapped in a 1N4007 silicon rectifier diode instead of the spark gap and the charge went up to 900V without any trouble, using the pushbutton interrupter. The Geiger tube I have gives a loud signal into high-impedence headphones at 900V, but the volume goes down steadily and becomes inaudible under about 720V. This bodes ill for the notion of a steampunk Geiger counter (they didn’t have 1N4007s in 1900) but it was way cool to finally hear some clicks coming off the tube.

The interesting thing is that I get no reading at all from the 0A2WA gas rectifier tube, which was “salted” by a smidge of Kypton-85 in 1962. Half-life is 10.7 years; divide something in half four and a half times, and there isn’t really much of anything left.

There’s much more to try, and I’ll continue the series after I do some of that trying. But all in all, today was a very good day. I give it…a 10.

Odd Lots

  • It keeps a very low profile somehow, but this NOAA site is the first place I go when I want to see what a hurricane is doing. We’re a little short of hurricanes this year, but I’m good with that.
  • This is what a pharmacy sign looks like in some parts of Europe. Thanks to Terry Dullmaier (in Germany) for the link. Terry didn’t know if the middle neon part goes off to indicate that the pharmacy is closed. Anybody?
  • I’ve discovered a great little free clock app for Linux, called the Cairo Clock. It can run in 24-hour mode and is skinnable, with about two dozen different skins available, some of them pretty weird. The skin I like is called Radium, and it (by choice) has a negative weirdness factor: It looks like an old wristwatch I got from my grandfather when I was a kid, which had radium paint on the hands and hour points. The second hand actually ticks forward and then falls back a little, as second hands driven by mechanical escapements used to do. I’d run it on Windows if I could.
  • From the No-Models-Were-X-Rayed-To-Produce-This-Calendar Department: The now-famous X-Ray pinup calendar floated as a promo by EIZO was a fake, albeit a mighty impressive one.
  • Bill Higgins put me on to NNDB, which is a biography site and useful for that alone…but take some time to poke at their mapping mechanism, which plots connections between significant people both living and dead. Cool factor 11 out of 10; making the maps useful probably takes more practice than I’ve been able to give it so far–and you must keep in mind that every relationship charted is somebody’s opinion of something.
  • There is a natural bridge on the Moon. (And I thought Straight Wall was impressive!) Thanks to Darrin Chandler for the link.
  • Numbers may be hard to grasp; precision and scale are even harder. This animation may help a little. (Thanks to Chuck Ott for the link.)
  • I don’t care how silly an idea it is. These guys get points for…something.

Odd Lots

Insight Is Gone From Ubuntu…

…and in fact from everything else based on Debian. Not six months after I saw Assembly Language Step By Step, Third Edition hit the shelves, the Debian team decided to pull the Insight debugger package from their seminal Linux distribution, on which Ubuntu, Kubuntu, Mint, and several others are based. Come Ubuntu 10.04 Lucid Lynx at the end of this past April, and suddenly people reading my book can’t work through the examples, because the software that I used in those examples (for single-stepping and examining registers and memory) is no longer available for their version of the OS.

This isn’t new news, and I’ve been trying to figure out how to finesse the problem ever since I heard about it mid-May. I got a number of queries this past week, suggesting that I had better get on it. (This is why you haven’t seen much from me in recent days.) Assuming at first that Insight had been dropped just to keep the distro CD-size, I tried to install it under Lucid from Software Center (not found), next a deb package, and finally from source, but nothing worked quite right. As the months have passed and more and more people are installing Lucid, I’m getting more and more mail about this. It’s a serious problem: A lot of the skill of assembly programming lies in debugging at the instruction level, and much of the tutorial depends on being able to run a debugger. Insight was that debugger. It’s GUI-based, rather than purely textual, and I think it’s a great deal easier to grasp, especially for newcomers.

So why didn’t I just use gdb?

Um…I did. Or at least I thought I did. Insight is an odd case. Most people assume (as I did) that it works the same way that Nemiver, KDbg, and DDD work, as independent front ends for gdb, passing textual commands to gdb and getting textual data back for display. Not so: Insight is gdb, and therein lies (in my opinion) most of the problem. What Insight’s originators did was take the gdb source code and add a built-in GUI, using Tcl/Tk. In effect, they forked gdb and produced a new custom version that contains all of gdb (at least gdb as of 2007) plus a windowing visual wrapper.

That in itself is unorthodox but not necessarily damaging, though forking something as fundamental as gdb should not be done lightly. Still, if you do it, you have to do it well, and I’m seeing indications that Insight isn’t nearly as clean a product as it should be. The Debian team spoke tersely; see the bug report and resolution here: “RoQA; insane packaging; unmaintained; low popcon.” (Yes, I read “popcorn” at first too.) More details may be found here. (Warning! DDG: Deep Debian Geekery.)

Quick translation:

  • RoQA means “Request of Quality Assurance”; basically, Debian’s QA team decided that the package was too broken to keep in the Debian distribution and requested that it be removed.
  • Two release candidate (RC) bugs were reported by the Debian team to Insight’s maintainer, but no one there responded. This is odd, because the maintainer is none other than Red Hat.
  • An NMU is a non-maintainer upload, which is when a package is sent to the distro team by someone other than the package maintainer of record. It is often a sign that the maintainer has abandoned the package, especially if the maintainer never acknowledges the third-party fix.
  • “Low popcon” is a reference to Debian’s unique “popularity contest” system for gaging how much individual distro packages are being used. Insight got 36 votes, which, in browsing the rest of the stats, seems low but not fatally low.

The real problem is that “insane packaging” issue. Insight contains embedded copies of software that is maintained by others and would be better linked in as libraries. The embedded bits “age” with respect to the current release of the OS and its libraries, eventually getting out of sync to the point that the package will not understand the current system well enough to function correctly. Tcl and Tk are either part of or easily installable to any Linux distro there is; you do not have to cut’n’paste them into your program source. With old software copied into its sources the package may build correctly, but might not necessarily run.

That said, the right way to approach the problem may be no more complex than taking the most recent release of Insight and making a proper Debian package out of it. The version I used last year in Karmic Koala goes back to 2007, and that’s the version pulled from Debian. The July 2009 release may be better. I’ve read enough on building Debian packages to know that I’m not the guy to do it, but I hope that somebody with better Debian chops will eventually try it, so that we can tell if Insight was just wounded, or if it’s really and quite sincerely dead.

In the meantime, the best fix appears to be falling back to Ubuntu 9.10. More here as I learn it.

Odd Lots

  • Please read this short article by Mark Shuttleworth. I’ve been saying this for years, but he’s a lot more famous than I am: Tribalism makes you stupid. It also means that you are owned, and are not a free man or woman.
  • The Insight debugger front end for gdb has been removed from all Debian-based Linux distributions, and is not present in Ubuntu 10.4. The Debian package for Insight has been criticized as “insane” and unmaintained, and I’m curious: Has anyone here used it in recent releases of Fedora or OpenSuse?
  • Autodesk founder John Walker has an interesting free Web toy for Greasemonkey, which attempts to spot “media trigger words” and alert you when weaselspeak is being attempted. (Thanks to Jason Kaczor for the tipoff.)
  • Oh, no! It’s the Pluto Effect for dinosaurs! Triceratops is actually an immature Torosaurus!
  • Man, turn your head for ten minutes and there’s a whole new kind of punk out there. But this one I may actually like: Dieselpunk. Think Art Deco urban fantasy, with the cultural clock set at 1920-1945. This might include the first Indiana Jones movie, and certainly one of my personal favorites, The Rocketeer. Lessee, we still need Musketpunk, for gritty urban fantasy in 1780 Philadelphia. Ben Franklin with tattoos. Could work, no?
  • Don’t be drinkin’ Diet Mountain Dew while reading this site. Trust me.
  • There is an entire news site devoted to good news. Perky people like me and Flo read it every day now.
  • Sheesh. What’s wrong with “Hi! Is this seat taken?” (Wait, no, that was the 70s. And purely analog.)
  • I don’t think I posted a link to this back in April, but I should have. There’s a rectangle of this identical cloth hanging on my workshop wall as framed art. Pray without ceasing, even when you’re soldering up a regenerative receiver.