Help - Search - Members - Calendar
Full Version: Dualbooting Pdaxii & Openbsd
OESF Forums > Archived Forums > Distros, Development, and Model Specific Forums > Zaurus Distro Support and Discussion > pdaXrom
After exploring for a while with dinorex, i've succeeded in setting up a dualbooting environment for pdaXii (5.4.8 Sally on NAND) and OpenBSD 4.2 beta (on my internal Extreme III 16GB CF):

Here is how it plays: smile.gif
(Sorry for the poor quality of the pics tongue.gif )

1. First load the pdaXii (5.4.8) kernel. Then answer the question if i want to boot into OpenBSD or pdaX.

2. Booting up pdaX. Everything is fine.

3. After reboot, choose OpenBSD this time. There is a warning message, but again everything is fine. OpenBSD 4.2 starts to boot ...

4. OpenBSD 4.2 underway

5. Mission accomplished! laugh.gif

Whoa! So, in theory, I could have pdaXii13 Akita with a full upgrade on my 4GB SD and OpenBSD 4.2 on the MD of my 3200? Nice Work!

What magic is needed to be done in order to get this working?
QUOTE(ZDevil @ Aug 15 2007, 12:37 PM)
2. Booting up pdaX. Everything is fine.

I'm glad to see that the script I wrote to dual-boot Cacko and OpenBSD could be used to dual-boot pdaXrom and OpenBSD smile.gif

Dual-Boot Cacko/OpenBSD
Actually I don't make much use of the cacko/openbsd dualboot script, except the small segment about choosing booting with obsd. rolleyes.gif But thanks, mathemajikian! Without your script i will still be getting nowhere. smile.gif
It's just a small tweak of /etc/rc.d/rc.rofilesys in pdaXii.
But for now I cannot extract the file as my 3200 is now compiling packages for OpenBSD 4.2 Beta at full tilt.
Could someone attach the original file in pdaXii so that I can post my how-to and the modified script? Thanks! [edit: got a backup; see the very next post below...]
(btw in the pictures i forgot to change the word "Cacko" in the boot script... tongue.gif )

Dualbooting pdaXii & OpenBSD: a mini how-to (for C3100/3200 only; do it at your own risk)

To set up a dualboot environment of pdaXii and OpenBSD, you have to do three things:

1. Flash pdaXii (in the usual flash "OK mode") & OpenBSD (in the emergency "D+B mode")
2. Modify /etc/rc.d/rc.rofilesys in pdaXii
3. Create a directory to hold the OpenBSD bootloader and kernel.


1. (I suppose you know how to do this. If not, you'd better stop here for your safety.)

2. Modify /etc/rc.d/rc.rofilesys in pdaXii
This is how I change the /etc/rc.d/rc.rofilesys in pdaXii (5.4.8)
(This also seems to work for other pre-Beta4 builds which uses the older bootloader, including Beta1 and Beta3, but YMMV):


export PATH=$PATH:/usr/bin:/bin:/sbin

    echo $DEVS
    grep "^$1" /var/lib/pcmcia/stab | get_dev_pcmcia

RW_MTD_LINE=`cat /proc/mtd | grep "home" | tail -n 1`
if [ "$RW_MTD_LINE" = "" ]; then
    RW_MTD_LINE=`cat /proc/mtd | grep "\<NAND\>.*\<2\>" | tail -n 1`
if [ "$RW_MTD_LINE" = "" ]; then
    RW_MTD_NO=`echo $RW_MTD_LINE | cut -d: -f1 | cut -dd -f2`
    RW_MTD_SIZE_HEX=`echo $RW_MTD_LINE | cut -d" " -f2`

    if [ -x /sbin/devfsd ]; then

    RW_MTD_SIZE=`dc 0x$RW_MTD_SIZE_HEX 1024 / p`
    initlog -s $"found $RW_MTD ${RW_MTD_SIZE}\"Kbyte\""

if [ "$ZAURUS_RESET" = "HARD" ]; then

if [ ! -x /sbin/devfsd ]; then
    mount -t tmpfs -o size=12m none /dev
    cd /
    tar xf /root/.dev_default.tar 2> /dev/null > /dev/null
    mkdir /dev/shm
    mount -t tmpfs -o size=12m none /dev/shm

STRING=$"Starting filesystem: "
msg -n $STRING

mount -o remount / 2> /dev/null > /dev/null

if [ $RW_MTD_SIZE -ne 0 ]; then
    /sbin/eraseall --j --q $RW_MTD 2> /dev/null > /dev/null
    mount -t jffs2 -o rw,noatime $RW_MTDBLK /home 2> /dev/null > /dev/null
    mkdir /home/root
    cd /
    tar --no-same-owner -xf /root/.home_default.tar 2> /dev/null > /dev/null

#OpenBSD Boot
if [ /bsd ]; then
        echo "Would you like to boot OpenBSD or pdaXrom (openbsd/pdaxrom)?"
        read acceptance
        if [ "$acceptance" != "pdaxrom" ]; then
                echo "Booting OpenBSD"
                cardmgr -o >/dev/null 2>&1    #<-- This line is necessary, or the bootloader won't be able to find /bsd on the internal CF/MD.#
                cd /bsd
                /sbin/insmod /bsd/zbsdmod.o
        echo "Booting pdaXrom"

mkdir /dev/shm/tmp
mkdir /dev/shm/run
chmod 4777 /var/tmp
chmod 777 /tmp
touch /var/run/utmp
cd /
tar --no-same-owner -xf /root/.var_default.tar 2> /dev/null > /dev/null
touch /var/log/lastlog

if [ "$rc" = "0" ]; then
    success "$STRING"
    failure "$STRING"

### SW Reset !

Probably this is just a quick and dirty trick. I suppose there is a better way of doing that.
Anyway here is the full script.

Two small notes:
-- In case OpenBSD fails to load for some reason, in the bootloader prompt (i.e., boot>), simply type reboot and the system will boot into pdaX.
-- You don't actually have to type "openbsd" to answer the boot question. Just a [ENTER] will do. wink.gif

3. Create a directory to hold the OpenBSD bootloader and kernel.
-- Create a new directory under pdaXii:
  mkdir /bsd

-- Copy zboot and zbsdmod.o into this directory:
   cp zboot zbsdmod.o /bsd

Reboot. And then you'll see your glutton dog enjoy both penguin and puffyfish meat ... laugh.gif
Right, i forgot to mention that pdaXrom seems to lack the kernel module for FFS filesystem support, so for now pdaX won't be able to "see" the FFS partitions where OpenBSD lives.
Can someone provide this small piece, please? smile.gif
I can probably do it for r198, but that's not what you want, is it? Does this even work on r198?
I guess, technically speaking, dualbooting is also possible for the post-Beta4 builds, provided that there is a fully functional uboot which can easily let user choose which distro to boot.

I'm afraid the kernel module for r198 won't work for pdaXii/Beta1/Beta3.

It's beyond my intelligence to make one. Any help out there? smile.gif
So has anyone tried this solution so far?

I am also thinking of experimenting with tribooting:
cacko ==> NAND
openbsd ==> internal MD/CF
pdaXii ==> SD

But now the key is: is it possible to run pdaXii full off SD?
I will go about working out a trick if it's possible.
At the moment I have no time but I will try it later!

You mentioned that you have build in a 16GB CF card in you Zaurus instead of the Microdrive. That's very interesting but I'm not so familiar with the hardware of my zaurus.

Did you made pictures of the different steps of putting the microdrive out of the zaurus and putting the CF in. This would be greate and maybe more zaurus users would give them a chance. I too :-)
I saw your pictures on your side and they are really good but for doing this it should be more steps between.

I'm not sure whether I saw a configurations document of the different steps you did to get the CF work!?

There you go: smile.gif
Yeah, this is what I wished to see :-)

Do you have also a document how to get the CF work inside the zaurus. I would guess that I do my partitions and formatting inside the flash modus of the different roms (for example pdaXii13 or pdaXrom)!?

I don't quite get what you meant by "how to get the CF work in side the zaurus".
If you are talking about formatting and partitioning, it's all done by the OpenBSD installation process (i.e. the very first few steps).
pdaXii Sally lives entirely in NAND, and won't touch the internal MD/CF at all during installation. smile.gif
Yes, I'm talking about the formatting and partitioning! Sorry for the bad statement.

Ok, that looks fine! If the hardware exchange is successful the other steps should be easy going.

Could you find out anything negative since you have the CF inside the zaurus? Do any scripts which the zaurus needs for booting or configurations complain about that the microdrive is gone?

No, the CF runs very well. I think one very nice feature of OpenBSD is that it consistently does filesystem checking after rebooting as a result of hanging/freezing (which does not happen often), which may help protecting the card itself.

And of course speedwise and powerwise, the CF beats the original MD hands down.

There is a recent thread discussing wearing of cards:

Have fun!
QUOTE(ZDevil @ Aug 21 2007, 06:09 AM)
No, the CF runs very well.  I think one very nice feature of OpenBSD is that it consistently does filesystem checking after rebooting as a result of hanging/freezing (which does not happen often), which may help protecting the card itself.

And of course speedwise and powerwise, the CF beats the original MD hands down.

There is a recent thread discussing wearing of cards:

Have fun!

Just a quick question : Why would I want to dual book pdaxii adn openbsd? smile.gif What value added is it?
I can probably do it for r198, but that's not what you want, is it? Does this even work on r198?

OpenBSD requires that linux have some kernel modules, wich doesn't avalible in kernel 2.6
QUOTE(portalgod @ Aug 25 2007, 08:52 PM)
Just a quick question  : Why would I want to dual book pdaxii adn openbsd?  smile.gif  What value added is it?

Simple: just not to waste the NAND flash area.
Honestly, pdaXrom does run faster, but I feel safer and more secure with openbsd.
And I've grown so tired of running the cottage-industry-way of packaging and building (a dependency and patching hell).
Look at my feed(s) and see how >200 working packages (and it keeps growing every day...) have been built on board in a week. It's no rocket science; everyone can do that easily .
For now the only tradeoffs are: SD write support (this is important!), bluetooth RFCOMM (i use wifi only), xrandr (though I feel perfectly comfortable with landscape mode only -- just because recently I've got a 6-inch screen e-ink book reader for RSS news and books and documents smile.gif )
You say that openbsd is on your cf card with pdax on nand. Is there a reason that this can only happen on 3x00 machines and not the c1000?
Precisely. The whole system takes much more space than the 128MB NAND flash.
That's the main reason why I swapped the original microdrive with a fast CF (a 4gb and even 8gb card is darn cheap now wink.gif ) to make things run as smoothly as on NAND (speed, power consumption, no startup spinning, etc). smile.gif
Just wanna add:
The default installation of OpenBSD gives you everything: the base system, X (xorg 7.2), a complete toolchain, and a complete man page set.

So perhaps one possibilitiy is to split up the files and put them in different partitions on different media (NAND & SD, for example). I guess this is possible, because the distribution set comes as several standalone package tarballs (you can take a look at the download locations of obsd).
The biggest trouble is up to now OpenBSD has no SD write support (a big pity, truly). But it is hoped that the final 4.2 will get SD write support, and then i am quite sure many seasoned hackers here will come up with the workarounds.
I think that after some months in the dust Ill try to make this setup smile.gif looks cool!

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.