Skip to content

be_get_uuid: failed to get uuid property from BE root dataset user properties.

So, there's this old OpenSolaris 111b installation, desperately needing an upgrade. But pkg(5) (sic!) fails to complete:
# BE_PRINT_ERR=true pkg image-update -v
Retrieving catalog ''... 
Loading catalog cache ... 
Refreshing catalog 
Refreshing catalog 1/1 
Creating Plan 
be_get_uuid: failed to get uuid property from BE root dataset user properties.
pkg: image-update cannot be done on live image
This has been partly covered in #7877 and #8313 and apparently been fixed but on this very system a newer version of SUNWbeadm cannot be installed - for the very reason that pkg image-update is not working. Installing just SUNWbeadm was not possible either, because it'd clash with max_version in pkg:/entire.

So, where to go from here? Installing the whole OS from scratch would be the easiest choice, I suppose. But also the least interesting. Let's download a newer copy of beadm (or grab the scripts from a more current system), compile Python2.6 and try again, shall we? Stay tuned....

git: fatal: invalid reference: foo

Today, git barfed with:
$ git bisect start
fatal: invalid reference: b
Huh? What is "reference b", what is git trying to tell me here? Pondering on this a bit more I remembered that I once created a branch named "b". But that was quite some time ago and git branch -a did not show the branch either. And bit reset --hard did not help. Grrr. There was a patch floating around dealing with this issue, but AFAICT it "only" made the error message more verbose. So I felt lucky and did:
$ egrep -rl 'b$' .git | grep -v objects
And indeed, there were those old BISECT_* files, which must have been from an old git bisect run. Removing the .git/BISECT_* did the trick and now we're in the middle of yet another bisect - oh jolly :-\

Ischariot Pasadelski

Ich weiss zwar nicht, wer oder was hinter steckt, ich benutze diese Seite auch nicht. Interessant fand ich nur, dass sie als Beispieltext (!) unter "Autor, Titel und Beschreibung der Galerie" einen ganz besonderen Kuenstler nennen:
  [Author: Ischariot Pasadelski]
  [Gallery Title: Fluktuation 8]
  [Gallery Description: Die Arbeiten eines polnischen Action-Künstlers]

fluktuation 8

Removing (some) newlines

I wanted to consolidate certain lines in a file:
$ cat file.txt
 - foo (11)
    - bar 11

 - foo (15)
    - bar 15
The strings "aaa", "foo" and "bar" were kinda static, but not the numbers. I wanted something like this instead:
aaa013 - foo (11)    - bar 11
aaa015 - foo (15)    - bar 15
Sure, I can use tr(1) to remove all newlines:
$ tr -d '\n' < file.txt
aaa013 - foo (11)    - bar 11aaa015 - foo (15)    - bar 15
...but that's not exactly what I wanted. The following trick did help though:
$ sed 's/^aaa.*/&:/;s/foo.*/&:/' file.txt | perl -p -e "s/:\n//"
aaa013: - foo (11):    - bar 11

aaa015: - foo (15):    - bar 15
Since some strings were somewhat static, I added a colon (":") to the end of those strings. That way the Perl snippet had something to look for when replacing newlines ("\n", with a preceding colon) with nothing.

cp /dev/null

I am always puzzled when people do
  $ mv file.txt /dev/null
...and get away with it. Well, they shouldn't, because it won't work and /dev/null will get overwritten with a plain file. However, I was suprised to see that cp really works that way, when used with the proper options:
$ cp /dev/null /var/tmp/foo 
$ ls -l /var/tmp/foo 
-rw-r--r-- 1 root root 0 May 27 19:02 /var/tmp/foo

$ cp -R /dev/null /var/tmp/foo 
$ ls -l /var/tmp/foo 
crw-r--r-- 1 root root 1, 3 May 27 19:03 /var/tmp/foo

$ cp /tmp/file.txt /var/tmp/foo 
$ ls -l /var/tmp/foo 
crw-r--r-- 1 root root 1, 3 May 27 19:03 /var/tmp/foo

$ cp -R /tmp/file.txt /var/tmp/foo 
$ ls -l /var/tmp/foo 
crw-r--r-- 1 root root 1, 3 May 27 19:03 /var/tmp/foo
On my way to this adventure I stumbled across this, introducing a new "feature" in busybox:
        bool "Non-POSIX, but safer, copying to special nodes"
        default y
          With this option, "cp file symlink" will delete symlink
          and create a regular file. This does not conform to POSIX,
          but prevents a symlink attack.
          Similarly, "cp file device" will not send file's data
          to the device. (To do that, use "cat file >device")
Ouch :-(

gzip vs. bzip2 vs. pbzip2 vs. xz vs. lzma

Yes, another benchmark. And yes, YMMV - big time:
$ ls -lh file.tar
-rw-r--r-- 1 bob bob 80M May 27 12:36 file.tar

$ file.tar
### gzip/9c:    6 seconds / 48.700% smaller
### bzip2/9c:   44 seconds / 50.300% smaller
### pbzip2/9c:  22 seconds / 50.200% smaller
### xz/9c:      79 seconds / 53.400% smaller
### lzma/9c:    120 seconds / 53.200% smaller
### gzip/1c:    4 seconds / 46.200% smaller
### bzip2/1c:   30 seconds / 48.100% smaller
### pbzip2/1c:  15 seconds / 48.000% smaller
### xz/1c:      35 seconds / 51.100% smaller
### lzma/1c:    18 seconds / 49.700% smaller
### gzip/dc:    0 seconds
### bzip2/dc:   7 seconds
### pbzip2/dc:  4 seconds
### xz/dc:      4 seconds
### lzma/dc:    5 seconds
Versions used:

WindowsPE on USB

Oh boy, what a mess. It all started when I noticed that my Ideapad S10 engages its fan quite often - too often, for no apparent reason. Luckily IBM relased a BIOS update, mentioning (and hopefully fixing) exactly this behaviour. Of course, flashing the BIOS was only possible by running some Win32 application. Although this Ideapad S10 came with MS Windows preinstalled, it was running Ubuntu/10.04.2 now. This is where the fun begins...

There's WindowsPE, which is basically a minimal of a Windows operating system. In our case, WindowsXP should be sufficient. (I guess Windows98SE would do too, but let's not get cocky). There are different approaches how to roll your own, bootable WindowsPE image, the most prominent one seems to be BartPE. This is a good start and the ISO was indeed bootable (in a virtual machine) - but not when I copied it to a USB stick. Yes, I know grml can do it and grml boots an ISO9660 image just fine when copied to USB. But BartPE would not.

After trying several things, experimenting with Syslinux black magic and avoiding overly crude tutorials I finally came across PE2USB. However, pe2usb could only handle USB drives with less than 2GB. Even when I found such a thing and pe2usb completed w/o any errors, it just wouldn't boot.

But then there was another PE2USB version - which formatted the USB drive with NTFS instead. And indeed, with BartPE and this version of pe2usb (and manually copying AUTORUN.INF) the Ideapad S10 would finally boot off this USB stick - yay!

Luckily I had a machine with WindowsXP available that allowed me to do all this. Mounting the USB stick in Windows again, filling it with zeros (fsutil can't do this, right? And SDelete did some magic, but I had to quit it at 817%), I can now compress the USB disk's image and save it to be reused again when another BIOS update is calling :-)

StarMoney & Microsoft DAO

Mit was man sich alles so herumschlagen kann/muss:
   Zum Ausführen von StarMoney 5.9 wird eine aktuellere Version der 
   "Microsoft DAO (Data Access Objects) Komponenten" benötigt. 
Wie man im Forum nachlesen kann:
   "Die Ursache für die Meldung beim Start von StarMoney liegt am fehlerhaften bzw.
    fehlenden Eintrag für die DAO's in der Registry."
Nicht klar ist mir, warum das "einfach so" passiert, aber vielleicht will ich das auch gar nicht wissen. Der vorgeschlagene Fix hat auch hier geholfen:
  $ runas /user:Administrator cmd.exe
  # cd "%CommonProgramFiles%\Microsoft Shared\DAO"
  # regsvr32 dao360.dll
And magically it worked again :-\

Authentication tried for root with correct key but not from a permitted host

Syslog tells me, for every key-based SSH login attempt (OpenSSH_5.5p1 Debian-6):
Authentication tried for root with correct key but not from a permitted host (, ip=
Authentication tried for root with correct key but not from a permitted host (, ip=
Accepted publickey for root from port 53187 ssh2
pam_unix(sshd:session): session opened for user root by (uid=0)
Received disconnect from 11: disconnected by user
pam_unix(sshd:session): session closed for user root
Yet the login succeeds, despite these warnings. This has been posted on debian-security a while ago, but nobody replied. (or will be able to reply now). So, I wonder what's going on here...

Shell prompt with timestamps

I just needed a my shell prompt to display the current time, with a bit more precision than seconds, but I did not need all the nanoseconds GNU/date offered me:
  PS1='$(date +%H:%M:%S.%N | sed "s/.\{5\}$//") \u@\h$ '
Of course with bash-v3 there's HISTTIMEFORMAT, which will save timestamps to HISTFILE anyway, but this time I wanted it to be displayed as I typed.