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

IPB

Welcome Guest ( Log In | Register )

> Openbsd On Whole Disk Sl-c3000
iamasmith
post Jan 18 2006, 03:52 AM
Post #1





Group: Members
Posts: 1,248
Joined: 6-July 04
Member No.: 3,928



Hi,

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.

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)

*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..

mkdir /mnt/flashroot
mount -t jffs2 /dev/mtdblock2 /mnt/flashroot
cd /mnt/flashroot/bsd

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 other
projects.

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
kernel independent.

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.
Go to the top of the page
 
+Quote Post
 
Start new topic
Replies
Sequethin
post Mar 22 2006, 10:56 AM
Post #2





Group: Members
Posts: 72
Joined: 12-December 04
Member No.: 5,903



is what I read above true? this doesn't work with cf? I don't have a large enough sd card =/ grrr
Go to the top of the page
 
+Quote Post
iamasmith
post Mar 24 2006, 05:33 AM
Post #3





Group: Members
Posts: 1,248
Joined: 6-July 04
Member No.: 3,928



QUOTE(Sequethin @ Mar 22 2006, 06:56 PM)
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 tongue.gif

-Andy
Go to the top of the page
 
+Quote Post

Posts in this topic
iamasmith   Openbsd On Whole Disk Sl-c3000   Jan 18 2006, 03:52 AM
Sequethin   I have space & bandwidth on a server that is u...   Jan 18 2006, 04:29 PM
anonuk   can this be used on a 3100?, i am itching to try b...   Jan 18 2006, 06:12 PM
DaemonsGR   I have ALOT of space on the company from Daemons.g...   Jan 19 2006, 12:58 AM
DaemonsGR   BTW as Im an OpenBSD since 2.8 I was thinking of m...   Jan 19 2006, 01:11 AM
iamasmith   QUOTE(DaemonsGR @ Jan 19 2006, 09:11 AM)BTW a...   Jan 19 2006, 12:22 PM
DaemonsGR   No prob BTW you dont have "little" sp...   Jan 19 2006, 01:35 PM
iamasmith   Anyone brave enough to try this yet?   Jan 20 2006, 06:01 AM
darkloran   QUOTE(iamasmith @ Jan 20 2006, 02:01 PM)Anyon...   Jan 30 2006, 10:10 AM
iamasmith   Thanks Loran, I will update the readme file soon, ...   Jan 30 2006, 10:35 AM
darkloran   QUOTE(iamasmith @ Jan 30 2006, 06:35 PM)Btw, ...   Jan 30 2006, 11:26 AM
Sequethin   is what I read above true? this doesn't work w...   Mar 22 2006, 10:56 AM
iamasmith   QUOTE(Sequethin @ Mar 22 2006, 06:56 PM)is wh...   Mar 24 2006, 05:33 AM
Sequethin   QUOTE(iamasmith @ Mar 24 2006, 09:33 AM)QUOTE...   Mar 29 2006, 07:38 AM
iamasmith   QUOTE(Sequethin @ Mar 29 2006, 03:38 PM)... ...   Mar 29 2006, 08:05 AM
Sequethin   QUOTE(iamasmith @ Mar 29 2006, 12:05 PM)Incid...   Mar 29 2006, 07:26 PM
Sequethin   This thread should be a sticky - it's really v...   Oct 23 2007, 12:34 PM
maldoror   Folks, The link at http://zaurus.daemons.gr/openb...   Oct 25 2007, 09:09 AM
mathemajikian   QUOTE(maldoror @ Oct 25 2007, 06:09 PM) F...   Oct 25 2007, 11:04 AM


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

 



RSS Lo-Fi Version Time is now: 19th December 2014 - 06:16 PM