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
> 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
Sequethin
post Jan 18 2006, 04:29 PM
Post #2





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



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.

smile.gif

ps I love it when this board is active!
Go to the top of the page
 
+Quote Post
anonuk
post Jan 18 2006, 06:12 PM
Post #3





Group: Members
Posts: 176
Joined: 24-December 03
Member No.: 1,271



can this be used on a 3100?, i am itching to try bsd on the zaurus and just got a new one.

Also, i can mirror this if you like, mail me realitygaps at yahoo.com
Go to the top of the page
 
+Quote Post
DaemonsGR
post Jan 19 2006, 12:58 AM
Post #4





Group: Members
Posts: 237
Joined: 28-December 05
Member No.: 8,801



I have ALOT of space on the company from Daemons.gr (hostingzoom.com)
You can have as much as you want!
PM me for user/pass

PS: If anyone need site/ftp etc.. read http://black.daemons.gr/
Go to the top of the page
 
+Quote Post
DaemonsGR
post Jan 19 2006, 01:11 AM
Post #5





Group: Members
Posts: 237
Joined: 28-December 05
Member No.: 8,801



BTW as Im an OpenBSD since 2.8 I was thinking of making a siteXX.tgz just for Z installations when my Z is here!
Go to the top of the page
 
+Quote Post
iamasmith
post Jan 19 2006, 12:22 PM
Post #6





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



QUOTE(DaemonsGR @ Jan 19 2006, 09:11 AM)
BTW as Im an OpenBSD since 2.8 I was thinking of making a siteXX.tgz just for Z installations when my Z is here!
*


OK, many thanks to DaemonsGR, we have a little space to hold the flash image and Linux kernel that will allow boot into a full 4Gb of OpenBSD smile.gif

http://zaurus.daemons.gr/openbsd

Have fun folks smile.gif
Go to the top of the page
 
+Quote Post
DaemonsGR
post Jan 19 2006, 01:35 PM
Post #7





Group: Members
Posts: 237
Joined: 28-December 05
Member No.: 8,801



No prob smile.gif

BTW you dont have "little" space tongue.gif your have as mach as you like .. hehe

EDIT: also add your openbsd/z Howto and docs!
Go to the top of the page
 
+Quote Post
iamasmith
post Jan 20 2006, 06:01 AM
Post #8





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



Anyone brave enough to try this yet?
Go to the top of the page
 
+Quote Post
darkloran
post Jan 30 2006, 10:10 AM
Post #9





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?! dry.gif (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.

my installation of obsd sets is in progress.

regards

loran
Go to the top of the page
 
+Quote Post
iamasmith
post Jan 30 2006, 10:35 AM
Post #10





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



Thanks Loran, I will update the readme file soon, have fun there smile.gif

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.

(actually zimage.bin isn't case sensitive in this instance... the updater looks for zimage.bin, zImage.bin or ZIMAGE.BIN tongue.gif)
Go to the top of the page
 
+Quote Post
darkloran
post Jan 30 2006, 11:26 AM
Post #11





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 sad.gif

system is booting right away...

well startx does not work... d'oh sad.gif
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 tongue.gif

This post has been edited by darkloran: Jan 30 2006, 11:42 AM
Go to the top of the page
 
+Quote Post
Sequethin
post Mar 22 2006, 10:56 AM
Post #12





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 #13





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
Sequethin
post Mar 29 2006, 07:38 AM
Post #14





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



QUOTE(iamasmith @ Mar 24 2006, 09:33 AM)
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
*




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 smile.gif)

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...)?
Go to the top of the page
 
+Quote Post
iamasmith
post Mar 29 2006, 08:05 AM
Post #15





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



QUOTE(Sequethin @ Mar 29 2006, 03:38 PM)
...

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.

-Andy
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: 12th July 2014 - 05:47 AM