Developers’ Weblog

Sponsored by
HostEurope Logo

Developers’ Weblog

All 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 manifold-boot™ ISOs

06.06.2009 by tg@
Tags: grml

The official grml GNU/Linux ISOs will use the manifold-boot™ technology from The MirOS Project – development builds have already done so for a couple of days – starting at 2009.08 (the next scheduled formal release).

This basically means you will be able to

# dd if=grml-daily.iso of=/dev/sda [bs=…]
# dd if=/dev/cdrom of=/dev/sda [bs=…]

to create a bootable USB stick (or a Live HDD, CF/SD/MMC card, etc). MirOS CDs have been using this since approximately October 2007. Support for loading GNU GRUB2 instead of boot(8/i386) was a dozen-line patch adding some ifdefs to our source (upstream; the grml Git repo only contains the generated bootblocks) hacked on a lone evening. (Knowledge how to boot GNU GRUB was there, from boot(8/i386) “machine exec” support, already.)

Mikas Blog appears to contain more documentation on GRUB2 than the FSF’s pages…

mksh R38 released

31.05.2009 by tg@
Tags: bug mksh

The MirBSD Korn Shell R38b has been released. It adds portability to QNX 6.4, a built-in base64 decoder and encoder written in mksh itself, and most importantly fixes a regression introduced in R38 causing memory corruption.

This – and a lot more bugs – were discovered while porting Git (resp. running its test suite) for Michael Gebetsroither (grml).

Random musings, devised on the best place ever to think (the one in the house where there will be no computer, at most a telephone; insiders know where it is, afk): I wonder what ÆrieBSD will do regarding ports. Sure, granted as long as they don’t change their uname(1) away from OpenBSD (and retain Perl, gcc and the obsd perl espietools) they can continue using OpenBSD ports. But as soon as… we (bsiegert@ and I) know the pain, the autotools tricks, have an infrastructure in place to deal with it, etc. Of course, there is also pkgsrc®, but they aren’t exactly easy to deal with, and pretty over-engineered in most parts while lacking in others (even though they catch up in a few of these). I wonder…

Okay, The MirPorts Framework assumes Perl, most individual ports haven’t been tested with pcc, I have yet to see a constantly working pcc as well, and XFree86® (or Xenocara in /usr/X11R6, should work too) is depended upon for X11. But it should be easier, even if mksh and mirmake are required, than starting from scratch. Heck, even MidnightBSD would probably have jumped on the MirPorts wagon if they had not had such success with mports at that time already.

With another mksh release out, and the first feedback (actually a patch with explanation – naaina ported it to the newly released QNX 6.4, 10x) already in, I would like to request user feedback if mksh compiles okay for them, the regression test suite results, and if it does its job – especially on the more obscure platforms. Current plans for R36b are mere portability and bug fixes, and maybe some more of the Syllable, Plan 9 or Haiku issues touched if someone does it.

On the other hand, I'm really glad I get feedback, even patches from people I've never heard of beforehand, which even touch documentation as it should be. One had the luck of adding a feature that had been, independently, requested in IRC mere days beforehand. You're welcome ;)

Let me plug a link to the fine manual page mksh(1) or its PDF version.

Thanks to all users as well, we cracked the 100 in Debian popcon a few days ago (102), even though it's down a tad right now, to 94.

Plans are to get promoted to Arch Linux Community from AUR, included into Mac OSX, Minix, pkgsrc® (as bootstrap shell) and QNX by default, and the usual world domination in general. Hey, I'm fixing dietlibc bugs on Launchpad now, so low I've sunk, so gimme some rest.

The “openbsd” option (bsd.mod) is unable to boot 4.4OpenBSD, MirOS #10, bsd4grml 2009.05rc1.

It appears that the kernel gets a page fault trying to access its own .bss – but I didn’t really look into it. Any takers?

This is bad, I wanted to add this…

menuentry "bsd4grml from harddisk (ISO = grml_2009.05-rc1.iso)" {
        loopback        loop (hd0,1)/grml/grml_2009.05-rc1.iso
        openbsd         (loop)/boot/addons/bsd4grml/bsd.rd

… to the solution using GRUB2 for ISO loopback boot, which Zugschlus brought into practical use.

grml GNU/Linux, our recently-partner project from Austria (not Australia), will gain ISO images bootable by dd(1)ing to a USB stick (or CF/SD card, hard disc, ...) via the MirOS manifold-boot technology, in use since 10/2007 and developed for the self-installing boot blocks. With only a couple of ifdefs, the MirOS BSD/i386 was made into a which runs fine on GNU/Linux (with mksh, of course!) and produces a first stage boot sector capable of loading a GNU GRUB2 core.img image the same as boot(8/i386) has been able to for a while. (GNU GRUB-legacy stage2 images cannot be loaded that way because bootxx is limited to 65280 bytes of second stage loader – mostly because the bootloader itself is, too, and this enabled me to squeeze out a few more bytes there.)

To say it with Mika Prokop himself:

23:22⎜«mikap:#grml» mirabilos: und dein bootloader ist geil :)
23:29⎜«mikap:#grml» und ich finds saugeil dass ich ein bsd zum booten mit
     ⎜  grml hab, das muss ich dann gleich mal auf usb-stick installieren

<mika:#grml> mirabilos: because: per default i still want to use isolinux
   (unless grub2 is working better, and: i'm missing the f2, f3,... splashes
   from isolunux)
<mirabilos:#grml> yep, nimm isolinux
<mirabilos:#grml> mkisofs -b hat damit gar nix zu tun
<mirabilos:#grml> das ISO bootet grub, wenns von USB gebootet wird, isolinux,
   wenns von CD gebootet wird
<mika:#grml> mirabilos: and the *same* ISO boots isolinux by default then but
   can be 'dd if=grml.iso of=/dev/sdb'-ed?!
<mirabilos:#grml> yep
<mirabilos:#grml> MirBSD doing that for a couple of years
<mika:#grml> mirabilos: awesome, i still don't get it but this sounds awfull
<mirabilos:#grml> mika: ours can even be booted on i386 via both methods *and*
   on a sparc
<mika:#grml> mirabilos: WTF?
<mirabilos:#grml> yep
<mirabilos:#grml> before MirGRML was added, our live CDs were already DuaLive?
<mika:#grml> awesome
<mirabilos:#grml> i386 boot (from cd, hdd, usb, compactflash, sd) into either
   live or install mode + sparc boot (voa OpenBOOT) into install mode
<mika:#grml> mirabilos: pfuh *verbeuge_again* :)

Ich glaube, Mika mag meinen Bootloader ;)

For simplicity, getextent_cd9660(1) will also be added to the grml-live ISO build process, as its output is easier to parse than J�rg's isoinfo. (I definitively should add subdir support there, just haven't gotten around to do it yet...) It uses a UCB and a TNF header file and otherwise available under the MirOS Licence (of course), as are the bootblocks.

Solución al reto del script

16.05.2009 by tg@
Tags: mksh

asarch ha escrito un artículo acerca de cómo se usa la función isatty(3) de para verificar si un script tiene datos en stdin, quizas en "$@", o para imprimir su uso.

Para el soporte oficial del mksh eres bienvenido en su canal (en inglés, ya que no todos hablan el castellano) en #!/bin/mksh (sí, sí es un nombre válido XD) del Freenode PDPC (

Update: asarch ha corregido mi español... ¡gracias!

As before, I amended my WTF *.deb repository (link to the WTF repository overview page), this time by emulated m68k packages.

The mirmake package definitively needs upstream work, but I don’t even know off-hand what MACHINE and MACHINE_ARCH are correct for the Atari Falcon on m68k… need to peek at the other BSDs for that.

Rant: the Debian sendmail package sucks, I wonder how anyone can use it… I’ll go by scp(1)ing the configuration from MirBSD again…

MirOS-current Triforce snapshot on BT

26.04.2009 by tg@
Tags: news snapshot

The Ostara 2009 snapshot of MirOS BSD #10-current (DuaLive™ technology and MirGRML 2009.01 making a Triforce™ CD) is available on a couple of BitTorrent trackers, our usual tracker and a few others for diversity (and so that they do have some legal content).

It's also available for NetInstall on both architectures.

current snapshot delaying poll

23.04.2009 by tg@
Tags: snapshot

As I built a 2009-04-17 snapshot but haven't yet come to publish it, or especially create a DuaLive™ CD again, mostly due to real life jumping in or immense (more than usual) headaches, I wonder if I should build another one with the changes done afterwards in it. Comments?

perl and quoted-printable

22.04.2009 by tg@
Tags: snippet

While here anyway…

$ perl -pe 's/=(\n|[a-fA-F0-9]{2})/$1 eq "\n" ? "" : pack("C",hex($1))/eg'

Needed it once for SyGroup.

mksh $(…) evaluation bug

22.04.2009 by tg@
Tags: bug mksh

RedHat BZ#496791 is another example of a bug I documented better in the commitids 10049EF448F5F89A278 and 10049EF493039137B14 in mksh(1).

The gist is: $(…) are not parsed recursively but by a lexer hack, namely merely looking at matching parenthesēs; this needs to go away. Until then, this bug cannot be fixed.

And while at it, ((foo); bar) subshells need to be fixed so that they are not parsed as ((…)) arithmetic expression with a failure upon encountering a sole closing parenthesis.

The mksh plans list this.

All 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35

MirOS Logo