OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

2 Pages V   1 2 >  
Reply to this topicStart new topic
> Dualbooting Pdaxii & Openbsd, It (kinda) works!
ZDevil
post Aug 15 2007, 04:37 AM
Post #1





Group: Members
Posts: 2,003
Joined: 16-April 04
From: the Netherlands && /dev/null
Member No.: 2,882



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

Go to the top of the page
 
+Quote Post
HoloVector
post Aug 15 2007, 06:59 AM
Post #2





Group: Members
Posts: 474
Joined: 22-March 06
From: Winnipeg, Canada
Member No.: 9,420



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?
Go to the top of the page
 
+Quote Post
mathemajikian
post Aug 15 2007, 03:27 PM
Post #3





Group: Members
Posts: 304
Joined: 8-July 06
From: United Kingdom for now....
Member No.: 10,349



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
Go to the top of the page
 
+Quote Post
ZDevil
post Aug 15 2007, 04:58 PM
Post #4





Group: Members
Posts: 2,003
Joined: 16-April 04
From: the Netherlands && /dev/null
Member No.: 2,882



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 )
Go to the top of the page
 
+Quote Post
ZDevil
post Aug 15 2007, 06:00 PM
Post #5





Group: Members
Posts: 2,003
Joined: 16-April 04
From: the Netherlands && /dev/null
Member No.: 2,882



[UPDATED]

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):

QUOTE
#!/bin/sh

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

get_dev_pcmcia()
{
while read SOCKET CLASS DRIVER INSTANCE DEVS MAJOR MINOR;
do
    echo $DEVS
done
}
get_dev_pcmcia_slot()
{
    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`
fi
if [ "$RW_MTD_LINE" = "" ]; then
    RW_MTD=""
    RW_MTDBLK=""
    RW_MTD_SIZE=0
else
    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=/dev/mtd/$RW_MTD_NO
        RW_MTDBLK=/dev/mtdblock/$RW_MTD_NO
    else
        RW_MTD=/dev/mtd$RW_MTD_NO
        RW_MTDBLK=/dev/mtdblock$RW_MTD_NO
    fi

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

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
else
    mount -t tmpfs -o size=12m none /dev/shm
fi

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
fi

#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
                ./zboot
        fi
        echo "Booting pdaXrom"
fi

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

rc=$?
if [ "$rc" = "0" ]; then
    success "$STRING"
else
    failure "$STRING"
fi
msg

else
### 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.
USE IT AT YOUR OWN RISK! DON'T BLAME ME IF IT BRICKS YOUR BUDDY Z. wink.gif

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:
CODE
  mkdir /bsd

-- Copy zboot and zbsdmod.o into this directory:
CODE
   cd /WHEREEVER/YOUR/OBSD/FILES/ARE
   cp zboot zbsdmod.o /bsd



Reboot. And then you'll see your glutton dog enjoy both penguin and puffyfish meat ... laugh.gif

This post has been edited by ZDevil: Aug 15 2007, 07:24 PM
Attached File(s)
Attached File  rc.rofilesys.txt ( 5.61K ) Number of downloads: 31
 
Go to the top of the page
 
+Quote Post
ZDevil
post Aug 15 2007, 06:22 PM
Post #6





Group: Members
Posts: 2,003
Joined: 16-April 04
From: the Netherlands && /dev/null
Member No.: 2,882



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
Go to the top of the page
 
+Quote Post
Capn_Fish
post Aug 15 2007, 06:44 PM
Post #7





Group: Members
Posts: 2,350
Joined: 30-July 06
Member No.: 10,575



I can probably do it for r198, but that's not what you want, is it? Does this even work on r198?
Go to the top of the page
 
+Quote Post
ZDevil
post Aug 15 2007, 06:48 PM
Post #8





Group: Members
Posts: 2,003
Joined: 16-April 04
From: the Netherlands && /dev/null
Member No.: 2,882



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
Go to the top of the page
 
+Quote Post
ZDevil
post Aug 21 2007, 03:23 AM
Post #9





Group: Members
Posts: 2,003
Joined: 16-April 04
From: the Netherlands && /dev/null
Member No.: 2,882



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.
Go to the top of the page
 
+Quote Post
climber
post Aug 21 2007, 03:40 AM
Post #10





Group: Members
Posts: 193
Joined: 21-November 05
Member No.: 8,574



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!?

Regards
Climber
Go to the top of the page
 
+Quote Post
ZDevil
post Aug 21 2007, 03:52 AM
Post #11





Group: Members
Posts: 2,003
Joined: 16-April 04
From: the Netherlands && /dev/null
Member No.: 2,882



There you go: http://www.oesf.org/forums/index.php?act=S...t=0#entry129173 smile.gif
Go to the top of the page
 
+Quote Post
climber
post Aug 21 2007, 04:30 AM
Post #12





Group: Members
Posts: 193
Joined: 21-November 05
Member No.: 8,574



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)!?

Regards
climber
Go to the top of the page
 
+Quote Post
ZDevil
post Aug 21 2007, 04:41 AM
Post #13





Group: Members
Posts: 2,003
Joined: 16-April 04
From: the Netherlands && /dev/null
Member No.: 2,882



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
Go to the top of the page
 
+Quote Post
climber
post Aug 21 2007, 05:03 AM
Post #14





Group: Members
Posts: 193
Joined: 21-November 05
Member No.: 8,574



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?

climber
Go to the top of the page
 
+Quote Post
ZDevil
post Aug 21 2007, 05:09 AM
Post #15





Group: Members
Posts: 2,003
Joined: 16-April 04
From: the Netherlands && /dev/null
Member No.: 2,882



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: http://www.oesf.org/forums/index.php?showtopic=23959

Have fun!
Go to the top of the page
 
+Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 24th October 2014 - 02:24 AM