Author Topic: Upgrading Your Openbsd Zaurus  (Read 26207 times)

mathemajikian

  • Sr. Member
  • ****
  • Posts: 301
    • View Profile
    • http://exit3.i-55.com/~xikon/openbsdzaurus.html
Upgrading Your Openbsd Zaurus
« on: August 01, 2006, 04:52:29 am »
Since 4.0 is right around the corner I want to kind of prepare myself for a successful upgrade. From Andys guide I obtained the following

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

 If I download the source can the kernel be built normally on the Z? If so how long would this take? I'm assuming x < 5 days! I know that during a normal install that the packges consisting of a base install are just pulled down and unpacked. Is there a similar way of doing this without going through the installation process?

Thanks in Advance!
« Last Edit: August 31, 2006, 05:29:44 pm by mathemajikian »

iamasmith

  • Hero Member
  • *****
  • Posts: 1248
    • View Profile
Upgrading Your Openbsd Zaurus
« Reply #1 on: August 01, 2006, 05:05:20 am »
Actually no, that updates the boot loader for the 'all disk' install that I produced and not the kernel.

Start the install process again and choose upgrade instead of install and the system will upgrade.

An upgrade will skip two important archives that are used in a base install. These archives are base.tgz and xbase.tgz therefore if you are worried about files in /etc just make sure that they are in one of these archives and you should be relatively safe to perform an upgrade and keep your changes.

Strictly speaking you should back up all of this stuff before performing the upgrade of course.

-Andy
OpenBSD 4.2 -current on full 4Gb of SL-C3000
Microdrive replaced with 4Gb SanDisk Extreme III card

mathemajikian

  • Sr. Member
  • ****
  • Posts: 301
    • View Profile
    • http://exit3.i-55.com/~xikon/openbsdzaurus.html
Upgrading Your Openbsd Zaurus
« Reply #2 on: August 01, 2006, 07:49:11 am »
ok, so to upgrade to the current snapshot what procedures must I follow? what files must be replaced? Do I just replace the  zboot and zbsdmod.o from emergency linux and then follow the normal installation process except selecting upgrade instead of install? How do I determine if I am running the lastest and greatest snapshot? uname -v ?

Thanks

Quote
Actually no, that updates the boot loader for the 'all disk' install that I produced and not the kernel.

Start the install process again and choose upgrade instead of install and the system will upgrade.

An upgrade will skip two important archives that are used in a base install. These archives are base.tgz and xbase.tgz therefore if you are worried about files in /etc just make sure that they are in one of these archives and you should be relatively safe to perform an upgrade and keep your changes.

Strictly speaking you should back up all of this stuff before performing the upgrade of course.

-Andy
[div align=\"right\"][a href=\"index.php?act=findpost&pid=137126\"][{POST_SNAPBACK}][/a][/div]
« Last Edit: August 31, 2006, 05:29:24 pm by mathemajikian »

Sequethin

  • Jr. Member
  • **
  • Posts: 72
    • View Profile
Upgrading Your Openbsd Zaurus
« Reply #3 on: August 01, 2006, 09:14:14 am »
Quote
ok, so to upgrade to the current snapshot what procedures must I follow? what files must be replaced? Do I just replace the  zboot and zbsdmod.o from emergency linux and then follow the normal installation process except selecting upgrade instead of install? How do I determine if I am running the lastest and greatest snapshot? uname -v ?

Thanks

It's the same procedure as upgrading a normal openbsd system, with the addition of the steps required if you followed andy's (great) whole disk doc. When I download snaps I usually keep them in a directory named after the date (JULY27-SNAPSHOT, for example) so that when I hit the ftp site and see a snapshot with a new date I know how old mine is. Keep in mind that it's not always a good idea to be on the bleeding edge - there's bleeding involved

iamasmith

  • Hero Member
  • *****
  • Posts: 1248
    • View Profile
Upgrading Your Openbsd Zaurus
« Reply #4 on: August 02, 2006, 04:57:59 am »
actually there was a typo in my earlier response, top marks for anyone that spotted.

etcNN.tgz and xetcNN.tgz are the archives that are skipped during update (where NN = version number).
OpenBSD 4.2 -current on full 4Gb of SL-C3000
Microdrive replaced with 4Gb SanDisk Extreme III card

mathemajikian

  • Sr. Member
  • ****
  • Posts: 301
    • View Profile
    • http://exit3.i-55.com/~xikon/openbsdzaurus.html
Upgrading Your Openbsd Zaurus
« Reply #5 on: August 17, 2006, 09:31:18 pm »
***********************************************************************
HOW TO UPGRADE YOUR OPENBSD  ZAURUS TO CURRENT SNAPSHOT
***********************************************************************

Warning! upgrades of OpenBSD are currently only supported from the
immediately previous release.

a. Copy the latest and greatest  zbsdmod.o and bsd.rd from
ftp.openbsd.org/pub/OpenBSD/snapshots/zaurus to sd/cf card.  

b. Unplug Zaurus from AC power.

c. Remove battery cover from the SL-C3200

d. Leaving the Battery Cover OFF, return the battery cover lock to the LOCKED position.

e. Locate reset switch on the left side edge of battery compartment.

f.  Open the unit so that the keyboard is accessible with one hand and the base of the unit is accessible with the other.

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

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

i. Reconnect AC power.

j. Return battery cover lock to unlocked position, Replace battery cover, Lock cover.

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

l. Insert the SD or CF storage card.

m. Change directory:
   # cd /mnt/card for SD card or
   # cd /mnt/cf for a CF card.

n. Load kernel module:
   # insmod zbsdmod.o

o. cp bsd.rd to the zboot proc entry:
   # cp bsd.rd /proc/zboot

You should now be observing the OpenBSD kernel boot messages.

p. In the text below everything after a ? should be typed as is except for text in ( !@#$%^). Some options are already selected as the [default response] and will only require you to press enter. Alot of this is just commen sense but I have listed it anyway.
-------------------------------------------------------------------------------------------------------------------  
Term? vt200
(I)Install (U)Upgrade (S)Shell? U
Disk? wd0
Root partition? wd0a
Use the existing filesystems defined in /etc/fstab? yes
Edit fstab? no
Use network settings on root partition? yes
Manual network configuration? no
Location of sets? ftp
Http/ftp proxy URL? none
Display list of known ftp servers? no
Server? (IP address, hostname or 'done' ) ftp.openbsd.org
Does server support passive mode ftp? yes
Server directory? pub/OpenBSD/snapshots/zaurus
Login? anonymous
Set name? all    ( etc.zz and xetc.zz will not be downloaded )
Set name? done
Ready to upgrade sets? yes
Getting bsd...
-------------------------------------------------------------------------------------------------------------------
All BSD Sets should now begin to download... Time to complete download varies depending on the speed of your network connection and server usage at the time.  

After all the sets have been downloaded you will be prompted once agian for the

q. locations of sets? done

OpenBSD will the begin making all device nodes and then ask you to Calibrate your touch screen.

After you have calibrated the touch screen you should see a message stating that you have now successfully upgraded your Openbsd zaurus system!

r. Type halt to reboot the system

It is strongly advised that you also download and unpack the corresponding etczz.tgz set  found at ftp.openbsd.org/pub/snapshots/zaurus in a temporary directory and merge any changes by hand. Some components of your system may not function correctly until your files in `/etc' are updated. To accomplish this use a tool such as mergemaster.  Mergemaster can be found in ports/sysutils/mergemaster

Finally you may want to rebuild some/all of your installed applications if they fail to operate correctly after upgrading. However, you will want to update your ports tree first.

s. Change to your ports directory:
    # cd /usr/ports

t. Update your ports tree:  ( This can take awhile )
    # cvs -d anoncvs@anoncvs.openbsd.org:/cvs up -Pd
    # make index

u. Update your ports via packages: (This is optional, you can rebuild your ports one-by-one from the ports directory)
# pkg_add -ui -F update -F updatedepends
« Last Edit: August 21, 2007, 02:16:02 pm by mathemajikian »

mathemajikian

  • Sr. Member
  • ****
  • Posts: 301
    • View Profile
    • http://exit3.i-55.com/~xikon/openbsdzaurus.html
Upgrading Your Openbsd Zaurus
« Reply #6 on: September 03, 2006, 04:14:17 pm »
**************************************************
UPGRADING YOUR OPENBSD ZAURUS VIA CVS
**************************************************

If you haven't previously checked out /usr/src or /usr/ports then STOP and do so before continuing.

# cd /usr
# cvs -d anoncvs@anoncvs.ca.openbsd.org:/cvs checkout -P src
# cvs -d anoncvs@anoncvs.ca.openbsd.org:/cvs checkout -P ports

Use CVS to download the latest source  and ports collection

This process updates the sources you have previously checked out! If you just checked them out then you can skip this step!

# cd /usr/src
# cvs -d anoncvs@anoncvs.ca.openbsd.org:/cvs up -Pd
# cd /usr/ports
# cvs -d anoncvs@anoncvs.ca.openbsd.org:/cvs up -Pd

Required pre-build processes

# make -k cleandir
# rm -rf /usr/obj/*
# make obj
# cd /usr/src/etc/mtree
# install -c -o root -g wheel -m 660 special /etc/mtree
# install -c -o root -g wheel -m 444 4.4BSD.dist /etc/mtree
# mtree -qdef /etc/mtree/4.4BSD.dist -p / -u
# cd /usr/src/etc
# env DESTDIR=/ make distrib-dirs

Build and Install the new Kernel

# cd /usr/src/sys/arch/zaurus/conf/
# config GENERIC
# cd ../compile/GENERIC
# make clean && make depend && make
# make install
# reboot
or
# cp /bsd /bsd.old
# cp bsd /bsd
# chown root:wheel /bsd
# reboot

Build and Install the new System

# cd /usr/src/
# make build
# cd /dev
# cp /usr/src/etc/etc.zaurus/MAKEDEV ./
# ./MAKEDEV all
# cd /usr/src/usr.sbin/httpd
# make -f Makefile.bsd-wrapper distribution

Build and Install mergemaster to merge any changes in the new files with the old

# cd /usr/ports/sysutils/mergemaster
# make install clean
# /usr/local/sbin/mergemaster
# reboot

Most of this  information can be found here: http://www.openbsd.org/faq/faq5.html
« Last Edit: May 13, 2007, 07:10:35 am by mathemajikian »

TronDD

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Upgrading Your Openbsd Zaurus
« Reply #7 on: October 21, 2006, 01:39:15 pm »
What is needed to run mergemaster for the files in etc and xetc?

Do I need the whole CVS tree?

mathemajikian

  • Sr. Member
  • ****
  • Posts: 301
    • View Profile
    • http://exit3.i-55.com/~xikon/openbsdzaurus.html
Upgrading Your Openbsd Zaurus
« Reply #8 on: November 08, 2006, 04:03:44 am »
I always downloaded the entire cvsup tree and then ran mergemaster from /usr/src after a complete rebuild of the system. Due to limited internet access I cannot find any further information at this time.

Quote
What is needed to run mergemaster for the files in etc and xetc?

Do I need the whole CVS tree?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=144459\"][{POST_SNAPBACK}][/a][/div]
« Last Edit: November 08, 2006, 04:06:16 am by mathemajikian »

jpmatrix

  • Hero Member
  • *****
  • Posts: 1014
    • View Profile
    • http://matrixmen.free.fr
Upgrading Your Openbsd Zaurus
« Reply #9 on: November 08, 2006, 03:25:41 pm »
help
i've a little problem with the upgrade process (i already had it with the install process) : when i mount the msdos filesystem where my openbsd install files are located, i see the files in UPPERcase ! so the openbsd install process cannot find them....
i've to copy them to my openbsd partition then rename all then the upgrade process find them....
is there any issue?
**Fujitsu U1010 !!!  
**ex-Zaurus SL-C3000 owner with Debian kernel 2.6.24-yonggun

TronDD

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Upgrading Your Openbsd Zaurus
« Reply #10 on: November 08, 2006, 10:23:22 pm »
Quote
is there any issue?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=145842\"][{POST_SNAPBACK}][/a][/div]

Is there any issue with what?  A DOS partition having uppercase file names or with having the BSD packages on the BSD partition?

I've been upgrading by downloading the BSD files right to the BSD partition.  Works great.  If you have the BSD partition and can access it to get the files on, why use a DOS partition at all?

jpmatrix

  • Hero Member
  • *****
  • Posts: 1014
    • View Profile
    • http://matrixmen.free.fr
Upgrading Your Openbsd Zaurus
« Reply #11 on: November 09, 2006, 06:05:22 am »
well,
i used to download openbsd install files from my desktop pc (adsl powered!) then put the files on a cf card . it is a windows machine so the cf is fat formated.

when i mount the cf under openbsd i see the openbsd files in uppercase....so the install script cannot find them....... that only happens under openbsd. when i mount the card under qtopia or D+B startup mode, the files are in lowercase...that's why i talked about an issue with openbsd.

of course i could download the files from the openbsd onto my openbsd partition, although it would be longer...
« Last Edit: November 09, 2006, 06:07:52 am by jpmatrix »
**Fujitsu U1010 !!!  
**ex-Zaurus SL-C3000 owner with Debian kernel 2.6.24-yonggun

zogs

  • Full Member
  • ***
  • Posts: 103
    • View Profile
    • http://www.autistici.org/c0de
Upgrading Your Openbsd Zaurus
« Reply #12 on: November 09, 2006, 08:00:20 am »
for bsd.rd you can try on openbsd with:

# cd  /
# wget ftp://ftp.openbsd.org/pub/OpenBSD/4.0/zaurus/bsd.rd
# reboot

and on the boot:

boot> bsd.rd

Quote
***********************************************************************
HOW TO UPGRADE YOUR OPENBSD  ZAURUS TO CURRENT SNAPSHOT
***********************************************************************

Warning! upgrades of OpenBSD are currently only supported from the
immediately previous release.

a. Copy the latest and greatest  zbsdmod.o and bsd.rd from
ftp.openbsd.org/pub/snapshots/zaurus to sd/cf card. 

b. Unplug Zaurus from AC power.

c. Remove battery cover from the SL-C3200

d. Leaving the Battery Cover OFF, return the battery cover lock to the LOCKED position.

e. Locate reset switch on the left side edge of battery compartment.

f.  Open the unit so that the keyboard is accessible with one hand and the base of the unit is accessible with the other.

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

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

i. Reconnect AC power.

j. Return battery cover lock to unlocked position, Replace battery cover, Lock cover.

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

l. Insert the SD or CF storage card.

m. Change directory:
   # cd /mnt/card for SD card or
   # cd /mnt/cf for a CF card.

n. Load kernel module:
   # insmod zbsdmod.o

o. cp bsd.rd to the zboot proc entry:
   # cp bsd.rd /proc/zboot

You should now be observing the OpenBSD kernel boot messages.

[div align=\"right\"][a href=\"index.php?act=findpost&pid=138964\"][{POST_SNAPBACK}][/a][/div]
neo freerunner openmoko user
chi calicunu cheret chircàrme:
c0de - - icq: 256646501 - msn: zogs@hotmail.it - skype: zogsound
..astrolicamus

mathemajikian

  • Sr. Member
  • ****
  • Posts: 301
    • View Profile
    • http://exit3.i-55.com/~xikon/openbsdzaurus.html
Upgrading Your Openbsd Zaurus
« Reply #13 on: February 09, 2007, 04:39:40 pm »
I just upgraded my Z to -current (which is pre-OpenBSD-4.1) and have had to perform the horrifying act of pkg_delete -q /var/db/pkg/*    You've been warned!
« Last Edit: February 09, 2007, 04:45:37 pm by mathemajikian »

mathemajikian

  • Sr. Member
  • ****
  • Posts: 301
    • View Profile
    • http://exit3.i-55.com/~xikon/openbsdzaurus.html
Upgrading Your Openbsd Zaurus
« Reply #14 on: February 13, 2007, 07:09:26 am »
4.1-beta is now available for testing.