Openbsd On Whole Disk Sl-c3000
Openbsd On Whole Disk Sl-c3000
Jan 18 2006, 03:52 AM
Joined: 6-July 04
Member No.: 3,928
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.
The actual link to the archive is http://zaurus.daemons.gr/openbsd
Installing OpenBSD on the WHOLE disk of an SL-C3000
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...
Device Boot Start End Blocks Id System
/dev/hda1 1 204 102784+ 83 Linux
/dev/hda2 205 1020 411264 83 Linux
/dev/hda3 1021 7936 3485664 c FAT32
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.
iv. Load the kernel module to allow OpenBSD to boot using..
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)
*Maintenance Step, On subsequent OpenBSD releases updating the initrd.bin*
When a new OpenBSD version is released for the Zaurus (or a snapshot) if you decide to install that release it is probably wise to update zbsdmod.o and zboot located in the flash of the Zaurus.
To achieve this update perform the following steps.
i. Copy zbsdmod.o and zboot to a storage card.
ii. Enter Emergency Linux as described earlier in this document.
iii. Enter the following commands..
mount -t jffs2 /dev/mtdblock2 /mnt/flashroot
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
This is a trivial work and simply borrows a kernel and an initrd from other
The initrd is a simple modification of the one developed for OpenZaurus 3.5.3
and originally was used to implement pivot_root. I have used this image
because it is simple, provides card initialisation for the Microdrive and is
The Kernel is built from the PDAXROM Kernel sources and includes a patch to
ide-cs necessary to be compatible with the pcmcia config contained within the
initrd.bin. Note that use of an alternate kernel is possible, however, it
needs to have the ide-cs patch applied to it.
Also note that the Kernel and Initrd functionality do not carry any
functionality into the OpenBSD environment once booted so there will be
limited necessity to modify these once installed.
The only possible exception of this is when a new version of zboot or
zbsdmod.o is created by the OpenBSD project. The process for updating these
modules on flash is described within this document.
Final acknowledgements go to the OpenBSD team for this porting effort and
particularly Dale Rahn and Uwe Stuhler.
|Lo-Fi Version||Time is now: 24th March 2017 - 10:03 PM|