[UPDATED][span style=\'font-size:12pt;line-height:100%\']
Dualbooting pdaXii & OpenBSD: a mini how-to (for C3100/3200 only; do it at your own risk)[/span]
*******************************************************************************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 pdaXiiThis is how I change the
/etc/rc.d/rc.rofilesys in pdaXii (5.4.
(This also seems to work for other pre-Beta4 builds which uses the older bootloader, including Beta1 and Beta3, but YMMV):
#!/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.
[span style=\'font-size:12pt;line-height:100%\']USE IT AT YOUR OWN RISK! DON'T BLAME ME IF IT BRICKS YOUR BUDDY Z. [/span]
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.
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:
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 ...