Friday, January 2, 2009

Say hello to Sara Romero

My second daughter Sara was born past tuesday at 8:00 AM with 2.98kg of weight. I haven't had until now any minute to rest because a baby and a child take all your time, but now I've found some peaceful minutes to post.

Here is a picture of Sara, the quality is not good because I captured it with my cellular phone. Happy new year, it seems I'll be really busy from now on.

Saturday, December 13, 2008

git: pushing to update remote branch refs

These past days I've been working on my hobby project xbps (xtraeme's build package system), which will be a package manager for GNU/Linux (not ready yet!). I'm handling the repository with the git VCS (Version Control System) because it gives me just what I want: performance, disconnected mode, etc, etc; also creating branches is cheap, you should be using them!

Back to the point that I was thinking for this post... I wanted to commit some experimental changes to test them before merging into master and I created a new branch; tested the changes, merged them into the master branch again, removed the now unused experimental branch and pushed the changes to the remote repo. After pushing the changes, the remote repo still showed up that the branch that I had just removed was still there... why's that?

Of course the answer was that you have to update the refs in remote, otherwise it doesn't know what changes you did locally! in short, to push your branch in remote repo:

$ git push origin branch

and to remove your local and remote branch (once merged into master or other branch):

$ git push origin :branch

Knowing this surely will help me in the future! I have still to learn a lot about it.

Sunday, December 7, 2008

Booting Linux with 2048 bytes per sector USB flash devices

For some days I've been wanting to try a Linux distribution on my Nocturno computer (Pentium 4 3GHz, 1GB DDR2-667 RAM, 750GB in a RAID5 Array with an Areca ARC-1210 PCI-e RAID card), because I wanted something that is really stable and fast to make it a file server. The problem with that machine is that it doesn't have a CD/DVD-ROM drive, so my choices for installing are via Network or USB.

I've never bothered to do a full network installation (via TFTP with NFS root or such), and therefore I used the USB method. I own a Creative ZEN Stone with 1GB Flash device, that I used for this. The problem is that for some time now, some USB flash devices now use a 2048 Bytes per sector, instead of the common 512 bytes per sector; this device is one of them.

Once important issue with this layout is that GNU Grub (legacy) and ISOLINUX do not support these drives by default. For ISOLINUX it seems that the only way to make them work is to modify the source code, as specified by its Author; for GNU Grub perhaps there's a patch, but I haven't investigated enough.

Now you might be thinking, how do you boot a live system from these devices then? good question. The solution seems to come from the fact that these devices share a common detail with CD/DVD-ROM drives, they all use this layout. So simply using dd(1) to copy an ISO 9660 image directly into the device, works.

To verify this, I tried with Fedora 10, OpenSuse 11.0 and a custom NetBSD LiveCD built by my own application mklivecd(8). It's important that dd(1) reads and writes blocks of exactly 2048 bytes. In short, if you want to boot from USB on any of these drives, use something like:

$ dd if=/iso9660-image.iso of=/dev/sdd bs=2048

The image must be written into the whole device, and not a partition on it; just treat those USB flash drives as if they were CD/DVD-ROM discs.

Friday, December 5, 2008

mkisofs(8) and HEAD

For reasons that I cannot remember, I needed to make a basic livecd from NetBSD -current to test some behaviour with the new modules style. Interestingly this triggered a problem with the bootloader not finding the modules at its standard path: /stand/arch/version/modules.

On HEAD for a while now, the GENERIC kernel hasn't built in the file systems by default; instead they are provided as modules and NetBSD's bootloader autoloads the required one. That works very fine currently for ffs, but not for ISO 9660 images built with mkisofs(8) with default options!

The root of the problem comes from the ISO 9660 level: by default mkisofs(8) uses level 1 and it only allows 8.3 file names (8 + 3 for the extension), as well as only a single dot in between; a leading dot is not allowed either. Also internally the ISO 9660 file system, converts all dots to underscores, so with default modules path (/stand/i386/5.99.4/modules), the bootloader is not able to find the module and the livecd is not able to mount the root file system.

After looking at makefs(8) I've found that to build the installcd, the allow-multidot option is required, as well as ISO level 2. Knowing this I've looked at the mkisofs(8) manpage and there's an option for exactly specify the ISO level; NOTE: if using mkisofs(8) you should only use -iso-level 2 exactly, don't use any other, it won't work.

In summary, if you want to build an ISO image with mkisofs(8) for booting NetBSD, now it's required to use the following options: -allow-multidot -iso-level 2.

Fixed ld@cac and null/overlay/umap modules

Between yesterday and today I fixed two problems on NetBSD. The former is still reproducable in the netbsd-5 branch (and HEAD as well), because AFAIK nobody submitted a ticket yet; the latter only applies to HEAD.

The first problem was introduced by myself some months ago, when I added support for JMicron and Intel RAID to ataraid(4). A did an extensive review before submitting the patch, but sometimes you always fail to catch an error... after all I'm a stupid human. Anyway, yesterday it took me 30 seconds to found it, because more or less I'm familiar with this code.

Info: http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=40099

The second problem is triggered every time that you use mount_nullfs(8), mount_overlay(8) or mount_umapfs(8), so I think it's important. The problem was that (again!) those missing symbols that the module requires are not there and some path in the code is causing a NULL pointer dereference. I've submitted a quick patch to fix them.

Info: http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=40110

Wednesday, December 3, 2008

compat_linux32 module broke my NetBSD!

I wanted to build the latest GNOME package available from pkgsrc for NetBSD, and I started removing all previous old packages to start with a clean set of new ones. All fine until Perl-5.10.0 executed a test via its configure script and NetBSD tried to autoload some modules for binary compatibility, that resulted in a panic while loading the compat_linux32 module due to a bunch of missing symbols.

The list of missing symbols were related to the fact that the module was missing to build some additional files from compat/linux, as well as symbols provided by the compat_netbsd32 module.

I still think that something is not working fine in how the kernel is handling those missing symbols, because IMHO, they should be treated as errors and not warnings!

Anyway I contributed a patch that fixed all issues, so that I can continue building GNOME again:

http://mail-index.netbsd.org/netbsd-bugs/2008/12/03/msg007545.html


UPDATE

The patch has been applied by Andrew Doran and therefore problem has been fixed.

Tuesday, December 2, 2008

My lovely daughter: Leyre

This post is dedicated to my lovely and first daughter Leyre. She was born a Monday 21st in August of 2006. She's almost two years and half already! time has passed really fast since then...

Here are some pictures that I like so much that I wanted to share publicly. Of course she's very pretty and really clueful for its age; the pictures are from past summer, but I don't have recent enough ones with enough quality to put here right now.


Half Life 2 Mod: Black Mesa

So I was watching one of my favourites videogames related sites (3Djuegos.com) and I've found something that I've been really surprised with. A new video of a game called Black Mesa. After reading a bit on its page, I discovered that it's just a HL2 Mod!

The video is amazing, and it shows that this is more than a yet another Mod for Valve's Source engine. It seems that Black Mesa is a remake of the first Half Life, released in 1998. They are using the Source engine really at its max power, and added other cool features like cooperative multiplayer, etc. The Source engine is showing its age, but still I think it's one of the best 3D engines out there!

From what I read I don't know if it will be available for free, but surely the money will be well wasted. Here's the amazing video available from 3Djuegos.com and from Developer's site: http://www.blackmesasource.com/