Saturday, November 28, 2009

eXtreme uPdating

I had that machine sitting in my living room which was once a media player, but is now (after I implemented VDR recording playback on my satellite STB :-) ) only used for playing back the recordings of my i4l-vbox answering machine. It was still running 10.3.
Now, having read that 10.3 was out of service, I decided to finally kill it.
So how to do that with style? Well, update it!

I removed the 10.3 repos and added the 11.0 repos. (Does anybody still remember how slow package management actually was back then? It was horrible!) I did not trust the old zypper to already having implemented a proper "zypper dup", so I updated with the YaST FACTORY module.
At first, YaST FACTORY updater refused to do a 10.3=>11.0 update. Well, edit the SuSE-release file and voila - it thinks it's a 11.0=>11.0 update.
Only a few Package conflicts (I had lots of stuff installed, including self-built RPMs and Packman packages) and thus half an hour waiting for the resolver, then I found out, that the packaging had switched from bzip2 to lzma at that time, so yast could not really install anything, but updating rpm manually behind YaST's back solved that. About four hours later (this is a lowly Toshiba Tecra with P3-1000 and 256MB RAM), I had 11.0 on the machine.

To my big disappointment, everything was still working!
Ok, so remove the 11.0 repos, add the 11.1... and zypper dup you go. Now I did not even have to patch SuSE-release...
Again, a few hours later (zypper was faster on 11.0, but not as fast as today), I had an 11.1 on the machine. And still, everything was working well, there even was still KDE3 on it.

I had intended to kill the machine, so I was not satisfied.
Remove 11.1 repos, add 11.2, zypper dup....
Yes! Finally, the X server did not produce a picture on my LCD TV (which is pretty picky about the VGA input signal, but did work before) anymore. Strike! But it was easily fixed: I just removed xorg.conf and at least had a 800x600 KDE4 Desktop. Installing sax2 (it had become lost in some conflicts, which I generally solved by "remove everything") and calling it fixed that up also.

What was actually a pity is, that no attempt had been made to import the KDE3 config (I had a few custom mime types etc, and now will have to reconfigure everything from scratch), but apart from that, the only thing I had to do was remove the kdm from KDE3 which was still installed and use the KDE4 kdm, so that logout and shutdown etc. properly work.

All in all it was pretty impressive, and I thought by myself "that's like the stories the debian users always tell about upgrades".

...and even though I wanted to, I will probably not get to do a fresh installation of 11.2, since all my updates went so well ;)

But what I found out in the end was, that KDE4 is really no longer usable on such a machine. Everything was very slow and sluggish, even with eye candy turned off as much as possible. But for the projected use of this box, XFCE will do just fine.

Tuesday, November 24, 2009

USB Boot Enabler

Since a few(?) releases, you can simply "dd" your openSUSE ISO-file onto an USB stick and boot from that, which is pretty cool and which I use a lot.
But recently, I came across a machine that simply does not boot from the USB stick. No matter what settings I tried in the BIOS - no boot. I believe it will only boot from internal hdd, internal CDROM or internal floppy and via PXE.
Instead of just burning the ISO onto a CD and using that (that would have been too easy, wouldn't it?), i booted an old rescue system I had still lying around on CD and found out, that the BIOS actually does enumerate the USB stick on boot, at least it shows up in /sys/firmware/edd and /dev/disk/by-id/edd-int13_dev81, so I wondered how to boot from it.

The answer was easy: Just copy what the openSUSE CD does for "boot from local harddrive". It's actually very easy (/tmp/x is the root directory for the ISO)
mkdir -p /tmp/x/isolinux
cp /usr/share/syslinux/isolinux.bin /tmp/x/isolinux/

Then create a /tmp/x/isolinux/isolinux.cfg file, with the following content:
say ***********************************************
say seife's USB boot enabler
say enter 0,1,2,3 for disk 0-3
say disk 0 is usually your local built-in harddrive
say disk 1 is probably your USB stick
say ***********************************************
label 0
localboot 0x80
label 1
localboot 0x81
label 2
localboot 0x82
label 3
localboot 0x83
default 0
prompt 1
timeout 0

That's it!
Create an ISO from it with:
genisoimage -o /tmp/sys.iso \
-b isolinux/isolinux.bin -c isolinux/boot.cat \
-no-emul-boot -boot-load-size 4 \
-boot-info-table \
/tmp/x

And burn onto a CD. Voila, your USB boot enabler is ready!

Now I only need to find a small credit-card size CD-R blank somewhere ;)

And maybe Steffen Winterfeldt puts something like that as a hidden option into the default openSUSE ISOs. It would be quite useful IMHO.

Sunday, October 11, 2009

Morons

Holy cow.
After seeing how those boycottnovell *peep*s interpreted my last post, I'm pretty sure that they are also fans of those "the moon landing was staged in hollywood" conspiracy theories...

Boys, if you want to get your facts right:
It's pretty normal for someone to get a new job after almost 9 years. Especially if the old job was 400km away from home and family and the new one is 9km away.
Of course I had already written that, but obviosly you are not good at reading.

Monday, October 05, 2009

New Challenges

Some of you might have already noticed it: I'm no longer working for SUSE.
To avoid any misunderstanding: It was my very own decision to leave, and it was not an easy one.
I was almost 9 years at SUSE in Nürnberg, which is 400km away from home and my family. Now I moved to a job closer to home: less than 10km.
I'll still be doing linux development, in the embedded area, which is a pretty exciting and interesting opportunity for me. My machines will of course still run openSUSE, and so there's no doubt that I will have to fix the occasional bug from time to time...

Now I only need to find out how to change that @opensuse email address so that it points to a valid mailbox again... ;)

Monday, August 10, 2009

Using PAN/NAP instead of rfcomm/ppd

I finally got a new mobile phone - one that not only supports rfcomm ("serial port" via bluetooth) but also the "PAN Network Access Point" profile - which allows a computer to connect to the internet easily, without many extra layers like PPP etc.

It's actually quite easy to use. (Note: I'm doing all that on recent openSUSE Factory, but I am pretty sure that it would work just as good on plain 11.1)

It is very handy to have the bluez-test package installed, many of the tools I am using are in that package.
First, we need to create a connection to the phone, exchange PIN numbers etc. I use bluetooth-applet from the gnome-bluetooth package (or the one from bluez-gnome) for that, it's just the best maintained tool for the task, even if you are a KDE guy like I am, I'd highly recommend it.

Now we need to find out the phones Bluetooth-Address (bdaddr):

seife@stoetzler:~> test-discovery
[ 00:24:EF:xx:xx:xx ]
Name = seife C510
Paired = 1
LegacyPairing = 1
Alias = seife C510
Address = 00:24:EF:xx:xx:xx
RSSI = -54
Class = 0x5a0204
Icon = phone

The hex number after "Address" is the bdaddr of your device.

Now we can create a network device:
seife@stoetzler:~> test-network 00:24:EF:xx:xx:xx nap
Connected /org/bluez/16833/hci0/dev_00_24_EF_XX_XX_XX to 00:24:EF:xx:xx:xx
Press CTRL-C to disconnect


Now you should have a bnep0 network interface and can (as root) either run dhcpcd directly on it, or create a config file "ifcfg-bnep0" in /etc/sysconfig/network like this:
BOOTPROTO='dhcp'
NAME='pand network device'
STARTMODE='auto'
USERCONTROL='no'

and then call "ifup-dhcp bnep0".

Two things to consider:
First, if your system is using NetworkManager, you don't get DNS addresses into resolv.conv. See this post for details. I now have
NETCONFIG_DNS_POLICY="STATIC_FALLBACK ppp0 bnep0 NetworkManager"

in my /etc/sysconfig/network/config

Second, test-network will terminate the connection after 1000 seconds (it is only a test tool), but it is easy to fix, just copy it to ~/bin/my-test-network (or whatever name you like) and apply the following trivial diff:
--- /usr/bin/test-network
+++ ~/bin/my-test-network
@@ -35,9 +35,10 @@
print "Press CTRL-C to disconnect"

try:
- time.sleep(1000)
- print "Terminating connection"
+ while 1:
+ time.sleep(1000)
except:
pass

+print "Terminating connection"
network.Disconnect()


I'm not a python wizard, so I'm pretty sure you can do better, but it works well for me.

Monday, July 06, 2009

U-Boot hacking -or- The dbox2 can boot from disk!

Thanks to a kind donator, I now own a Nokia dbox2 with IDE interface. (For those that don't know - the dbox2 is a settop box designed for german paytv 10 years ago in a way that its bootloader would only run signed software. A limitation that was put aside by some cool hackers early in this century. Nowadays it usually runs Linux on its 66MHz powerpc CPU, 32MB RAM and 8MB FLASH ROM. Later some cool guys designed an IDE interface that plugs into the memory expansion slot)

The main use of such an IDE interface for most people is to use the box as a video recorder. However, I am already doing this via the ethernet port, wich is more practical for me than a built in disk.

I would have deemed it much more useful if I was able to boot from the IDE drive, since that would make it much easier to try out new experimental code without needing to upgrade the FLASH image all the time (having the known working version in FLASH as a fallback is mandatory for good WAF).

So I pondered the problem and found out, that people had already implemented basic support for the IDE interface in U-Boot (which is used as a "second stage" bootloader), and it could already access and read the disk.

Unfortunately, U-Boot needs to be in FLASH, and this U-Boot would then only boot from disk.

So I have been hacking on making U-Boot actually read multiple boot command lines (and and option which one to boot as default) from a config file in the /var/ partition of the FLASH which makes it pretty easy to switch the device we boot from. It is now actually similar to the boot process of the Tripledragon.

The only thing that's missing now is a driver for the front panel keys, so that you can change the selection on the fly without using a serial console. That's coming next, after the summer vacation ;)

Wednesday, July 01, 2009

Back from Linuxtag 2009

I finally managed to upload my slides to the openSUSE Wiki's Linuxtag 2009 page (I actually had nothing to do with openSUSE this year, but somebody had already listed me on that page and it's actually pretty handy to host the slides there). I also uploaded it to the Linuxtag site, but after experiencing really abysmal organisation this year, I doubt that it will appear anywhere there.

The talk was not that exciting in my point of view - "Netbooks" are, in the end, a pretty boring topic to talk about - but the attending crowd seemed to like it, so apparently it was at least entertaining ;)

The event itself was better than what I had expected from the organisation flaws, I did talk to some embedded people and made many interesting contacts, e.g. with beagleboard guys, peple from the openembedded project and of course the cool hackers from coreboot.

So after a disappointing start, Linuxtag 2009 finally ended pretty successfully for me.