I have done as promised and created an initrd.bin that folks can use for whole disk installs of OpenBSD.

OK, the details of the project... there is a lengthy readme.txt file included and you MUST read it but the most important highlight is DON'T use this if you don't want your WHOLE Z to be BSD only. Also DON'T use it if you are paniccy about your ability to restore your Z (including repartitioning the hard drive back).

Here is the readme.txt file from the archive... I have blanked out an important region so that people don't skip reading it when they download the installation.

This is ONLY for whole disk OpenBSD installs... if you aren't prepared to lose the entire contents of your Zaurus including the ability to boot into Qtopia/pdaXrom or whatever you have installed then do NOT proceed.

Furthermore, it is possible to recover the Zaurus into the original state but it isn't trivial. I include a good working copy of fdisk for the Zaurus (without the bugs that show false paritition entries) that may be used to repartition your disks before installing a default distribution and for your reference the original partition table of an SL-C3000 looks like this...

Complete instructions for recovery of the Zaurus to original state may be obtained from the www.oesf.org forums, please familiarise yourself with these and be confident that you can follow these instructions before you proceed.

If you have read all this so far then the files within this archive should be renamed as follows before proceeding. <BLANKED OUT, READ THE README FROM THE DISTRIBUTION ARCHIVE>

Note for Step 3 you will need to have copies of the zbsdmod.o and bsd.rd from the OpenBSD distribution that you wish to use. The versions installed on the initrd.bin are from the 16 January 2006 snapshot.

*Step 1, complete the flash installation process*

This will put a Linux kernel onto the SL-C3000 that is patched to allow us to see the boot process.

It will also replace the flash based root filesystem with one that initialises the Microdrive and then starts the OpenBSD boot sequence using the module zbsdmod.o and the boot program zboot from the /bsd directory on flash.

If the boot sequence fails for any reason you will be given a busybox shell that you may use to correct script based errors.

Note that this small version of Linux is not running an SD Manager and only runs cardmgr -o (run and terminate) to initialise the Microdrive so if you wish to copy files to the flash partition you may wish to consider using the Emergency boot Linux as described in the next steps.

*Step 2, Entering the Emergency boot Linux (required to install)*

i. Remove power and battery from the SL-C3000.ii. Leaving the Battery Cover OFF, return the battery cover lock to the LOCKED position.

At this point examine the battery compartment. On the edge that is closest to Zaurus Logo are a set of slots where the battery cover 'keys into' when closed.

If you look at the slot that sits almost exactly vertically central of the whole Zaurus (not the compartment) you will notice that there is a reset button. Do NOT press it just yet.

iii. Open the unit so the screen is at right angles to the base unit and sit the unit on the back of the screen so that the keyboard is accessible with one hand and the base of the unit is accessible with the other.

iv. Hold down D+B on the keyboard and whilst these keys are held depress the reset button using the stylus.

v. Release the D+B keys and within a few seconds the unit should start to boot into Emergency Linux.

If this sequence fails then double check that the Batter Lock is in the LOCKED position.

vi. Connect power now if you haven't already done so!

*Step 3, Installing OpenBSD from the Emergency boot Linux.*

i. Log into Emergency Linux using the username root (no password)

ii. Place zbsdmod.o and bsd.rd onto a storage card (from the OpenBSD distribution).

Emergency Linux is running an SD Manager/Card Manager and automounter for storage cards so you need only insert the card for it to become accessible.

iii. Insert the storage card and change to directory /mnt/card for SD or /mnt/cf for a CF card using the cd command. i.e.

cd /mnt/card

iv. Load the kernel module to allow OpenBSD to boot using..

insmod zbsdmod.o

v. Start the installation process by copying bsd.rd to the zboot proc entry.

cp bsd.rd /proc/zboot

Installation should now start and you should proceed as per the OpenBSD instructions, however, you may now say YES to using the whole disk for OpenBSD.

Don't forget to resize wd0a and create yourself a small swap partition though (I use 128Mb and consider that generous for the Z - you really don't want to use a Zaurus running OpenBSD if it is swapping anywhere near that much)

iv. Insert the storage card and copy the new versions of zboot and zbsdmod.o to this location as follows (if using a CF card then substitute the path /mnt/cf for /mnt/card).

cp /mnt/card/zbsdmod.o .cp /mnt/card/zboot .

v. Flag zboot as executable using..

chmod +x zboot

vi. Reboot the device using...

shutdown -r now

ACKNOWLEDGEMENTS

This is a trivial work and simply borrows a kernel and an initrd from otherprojects.

The initrd is a simple modification of the one developed for OpenZaurus 3.5.3and originally was used to implement pivot_root. I have used this imagebecause it is simple, provides card initialisation for the Microdrive and iskernel independent.

The Kernel is built from the PDAXROM Kernel sources and includes a patch toide-cs necessary to be compatible with the pcmcia config contained within theinitrd.bin. Note that use of an alternate kernel is possible, however, itneeds to have the ide-cs patch applied to it.

Also note that the Kernel and Initrd functionality do not carry anyfunctionality into the OpenBSD environment once booted so there will belimited necessity to modify these once installed.

The only possible exception of this is when a new version of zboot orzbsdmod.o is created by the OpenBSD project. The process for updating thesemodules on flash is described within this document.

Final acknowledgements go to the OpenBSD team for this porting effort andparticularly Dale Rahn and Uwe Stuhler.

I have space & bandwidth on a server that is up most of the time (it's a cheap user mode linux thing I keep around for stuff like this). If you can get it to my gmail (sequethin at gmail) then I'll upload it and post a link.

Group: Members
Posts: 92
Joined: 19-November 04
From: here or there.. it changes so often ;-)
Member No.: 5,525

QUOTE(iamasmith @ Jan 20 2006, 02:01 PM)

Anyone brave enough to try this yet?

i'm volunteer !

i've tested OpenBSD a few months ago and was quite happy with it but i lacked the "kdepim" suite. Now that i've bought a used sl-5500 i can play along with my sl-c3000! and i must admit that i find the openbsd solution the most interesting for me.

I've followed the readme.txt provided with obsd....zip, step by step (i've read it once before going through it). Here is what i've noticed :

QUOTE

readthereadme.4=zimage.bin.

>> i've named it zImage.bin (with uppercase 'i', don't know if it makes a difference for the system)

QUOTE

iv. Hold down D+B on the keyboard and whilst these keys are held depress the reset button using the stylus.

>> vi. must be made before iv. Z won't boot without current (tested twice).

>> wait 3 seconds before v.

QUOTE

v. Release the D+B keys and within a few seconds the unit should start to boot into Emergency Linux.

QUOTE

iii. Insert the storage card and change to directory /mnt/card for SD or /mnt/cf for a CF card using the cd command. i.e.

>> it does not work with CF card. (tested with Sandisk 32MB fat16 and Sandisk UII 1GB ext3 -- even if card inserted before boot)sd card is ok (inserted before or after boot does not matter -- it's correctly automounted).

QUOTE

v. Start the installation process by copying bsd.rd to the zboot proc entry.

cp bsd.rd /proc/bsd.rd

>> unable to open `/proc/bsd.rd': No such file or directory>> work with cp bsd.rd /proc/zboot (the comment was explicit enough)

maybe you should tell the user to put the battery, cover and locker back in place?! (just for completeness uh)

well after that it's up to OpenBSD instructions... creating filesystems is quite strange with this procedure because wd0a is pre-configured as full system without block-size and it won't work. The best is to delete 'a', create 'a' with 4.2BSD fs and / mount point and then create swap and apply.

Btw, if you are just starting out on this with the 3.9 Beta then you should also follow the instructions for updating zbsdmod and zboot since the ones present in the initrd.bin are from a previous snapshot.

Group: Members
Posts: 92
Joined: 19-November 04
From: here or there.. it changes so often ;-)
Member No.: 5,525

QUOTE(iamasmith @ Jan 30 2006, 06:35 PM)

Btw, if you are just starting out on this with the 3.9 Beta then you should also follow the instructions for updating zbsdmod and zboot since the ones present in the initrd.bin are from a previous snapshot.

ok, i've applied the "update instructions" and it worked fine. Well as far as i can tell, because i don't know anyway to check the zboot or zbsdmod.o

system is booting right away...

well startx does not work... d'oh EDIT : machdep.allowaperture was set to '0'. Well it needs to be set to '2' so that X will start on obsd. It should have been set by installation process as i've said i wanted to use X11 and i was then provided with calibrating interface. update /etc/sysctl.conf with machdep.allowaperture=2 and rebooting did the trick.

Oh and i had time to follow the startup process and i saw zboot is up to date

is what I read above true? this doesn't work with cf? I don't have a large enough sd card =/ grrr

No, you can use cf card to do this but you will need to mount it manually to use it.

lol, it's so long since I booted my 3000 into Linux I can't tell you the hda name of the CF card to give you the exact mount command and the 3000 is busy doing some rebuilds after I did a /usr/ports/infrastructure/build/out-of-date run on it recently

is what I read above true? this doesn't work with cf? I don't have a large enough sd card =/ grrr

No, you can use cf card to do this but you will need to mount it manually to use it.

lol, it's so long since I booted my 3000 into Linux I can't tell you the hda name of the CF card to give you the exact mount command and the 3000 is busy doing some rebuilds after I did a /usr/ports/infrastructure/build/out-of-date run on it recently

-Andy

Well I did this over the weekend and it works great so far! I had used the "whole disk" option before this hint and it sucked to get errors every time I booted and had the cf disk in. Thanks again for the great contributions (that reminds me, I need to implement those performance tweaks again )

Also a quick note... saturday (march 25?) snapshot seems stable so far... am I wrong or is this recent snapshot actually 3.9+ (i.e. it includes code beyond 3.9 stable, so if I put 3.9 stable on my z when my cd's come in I'd actually be going backward...)?

Also a quick note... saturday (march 25?) snapshot seems stable so far... am I wrong or is this recent snapshot actually 3.9+ (i.e. it includes code beyond 3.9 stable, so if I put 3.9 stable on my z when my cd's come in I'd actually be going backward...)?

That recent snapshot is 3.9-current so yes it contains additional work since 3.9-stable was snapshotted for CD distribution.

Incidentally you don't get all architectures on the CDs... I think Zaurus is one that you have to get from http/ftp but I congratulate you for buying it and sponsoring the project.