summaryrefslogtreecommitdiff
path: root/distrib/notes/zaurus/install
blob: 2638559c17501eebd9963332b96f7b82f5f10c89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
dnl	$OpenBSD: install,v 1.15 2005/08/30 19:22:56 niallo Exp $
OpenBSDInstallPrelude

OpenBSD is installed on the Zaurus by effectively converting
Linux into a bootloader.  This can be done easily by installing
a package from Qtopia, or manually from a terminal.  Both ways
are described below, the easy one first.

The package takes care of modifying the Linux startup files for
you as necessary.  To protect you from a common pitfall, ext3
filesystems mounted on /hdd[12] are converted back to ext2.

(That way a fatal error in Linux startup scripts is avoided when
the journal has been destroyed by mounting one of the ext3
filesystems as ext2 on OpenBSD).

1. Press "Home" until the second icon tab is selected (Settings).
2. Open the "Add/Remove Software" dialog.  That's the green icon
   with an arrow pointing from left to right into a rectangle.
3. Press "Install packages via networks", the middle one of the
   three big buttons.  The "Package Manager" dialog pops up.
4. Press the yellow switch icon in the lower right corner to
   bring up the "Package Servers" dialog.
5. Press the left button, which is labeled "New" if your Zaurus
   is in English, enter the HTTP/FTP URL of the nearest OpenBSD
   mirror, and change the field above the URL into a name for
   that server.  Press the "OK" button in the upper right corner
   to return to the "Package Manager" dialog.
6. Press the "Upgrade" button in the lower left corner to update
   the package index if that was not done automatically.  A
   package named "openbsd" should appear in the package list.
   Select this package and press the question mark icon in the
   lower right corner.
7. Now you see the package details and three buttons, labeled
   "Install", "Remove", and "Ignore" in this order.  Press the
   leftmost button and twice "OK" to finish the installation.
   Then close the "Add/Remove Software" dialog.
8. Activate the "Q" menu in the lower left corner of the screen
   and choose "Reboot" (that's the item with a green icon next
   to it, above the power-off icon).  Wait for the system to
   reboot.  At the boot> prompt, hit enter to boot OpenBSD, or
   type 'r' to boot Linux.  Since you want to install OpenBSD,
   this time you will want to type 'r'.
9. Wait while Linux is coming up, then switch to the first tab
   (Applications), scroll down, and press the icon which is
   labeled "Install OpenBSD".  A few seconds later, an OpenBSD
   bsd.rd will boot on your Zaurus, so that you can perform the
   standard install process.

Another way to install the package is from a shell.  You will
need the following file from the distribution on the Zaurus:

	openbsd{:--:}OSrev{:--:}_arm.ipk

Perform the following operation as root to install the package,
and then continue as in step 8, above:

	{:-#-:} ipkg install openbsd{:--:}OSrev{:--:}_arm.ipk

To install the OpenBSD boot program manually, you will need the
following files from the distribution:

	zbsdmod.o
	zboot
	bsd.rd

After starting up some sort of terminal emulator on the Zaurus
and becoming root, perform the following operation:

	# insmod zbsdmod.o
	# cp bsd.rd /proc/zboot

A few seconds later, OpenBSD will boot on your Zaurus.

If you already have a bsd.rd or bsd kernel contained in a FFS
partition on the C3000/C3100 hard drive, you can instead use 

	# insmod zbsdmod.o
	# ./zboot

OpenBSDInstallPart2

OpenBSDBootMsgs

	You will next be asked for your terminal type.  You should just
	hit return to select the default (vt220).

OpenBSDInstallPart3({:- or "wd0" for IDE drives-:})

	Next you will have to edit or create a disk label for the disk
	OpenBSD is being installed on.  If there are any existing
	partitions defined (for any operating system), and a disk label
	is not found, you will first be given an opportunity to run
	fdisk and create an OpenBSD partition.

	If fdisk is being invoked on your behalf, it will start by
	displaying the current partitions defined and then allow you
	to modify this information, add new partitions and change
	which partition to boot from by default.  If you make a mistake,
	you will be allowed to repeat this procedure as necessary to
	correct this.  Note that you should make OpenBSD be the active
	partition at least until the install has been completed.

OpenBSDInstallPart4({:- If you have Linux partitions
	defined on the disk, these will usually show up as partition
	'h', 'i' and so on.-:})

	One of the three partitions on the Zaurus C3000/C3100 hard drive is
	a 3GB MSDOS filesystem.  This partition can be a lot smaller,
	it is therefore recommended that you cut most of the space off
	this large MSDOS partition, and create a new A6 partition
	afterwards, like this:

	 0: 83    0   3 13 - 1511   7 17 [          63:      205569 ] Linux files*
	 1: 83 1512   0  1 - 7559   7 17 [      205632:      822528 ] Linux files*
	 2: 0C 7560   0  1 - 9065   7  1 [     1028160:      204800 ] Win95 FAT32L
	 3: A6 9065   7  2 - 67885   5  3 [     1232960:     7999488 ] OpenBSD     

	After shrinking the MSDOS partition, please be sure to newfs it
	using:

		newfs -t msdos /dev/rwd0k

	Note that all OpenBSD partitions in the disk label must have an
	offset that makes it start within the OpenBSD part of the disk,
	and a size that keeps it inside of that portion of the disk.  This
	is within the bounds of the 'c' partition if the disk is not being
	shared with other operating systems, and within the OpenBSD fdisk
	partition if the disk is being shared.

	For purposes of recovery in case Linux becomes inoperable for
	one reason or another with HDD1 Errors and such, we detail the
	process to come up single user:

		Remove power and the battery.
		Begin holding down the 'b' and 'd' keys.
		Wait for 1 minute.
		Insert battery and power on unit.
		As soon as a login screen starts to show up, release the 'b'
		and 'd' keys.
		Login as root.

	The following sequence is also recommended inside Linux so that
	problems will happen less often.  By default the boot scripts fail
	if the MSDOS partition is corrupt in any way.  If you are already
	root do the following, which will skip mounting the MSDOS partition.

		Login as root.

		Find the rc.rofilesys file.  It is either in
		/root/etc/rc.d

			cd /root/home/etc/rc.d

		Or you have to mount it using:

			mount /dev/mtdblock2 /mnt
			cd /mnt/home/etc/rc.d

		cat rc.rofilesys | sed -e '/vfat/s/^/#/' > vfat
		diff -u rc.rofilesys vfat		# to double check
		cp rc.rofilesys rc.rofilesys.vfat
		cp vfat rc.rofilesys
		
	In these cases below we avoid using vi because Linux quality is of
	such high caliber that vi locks up the console.  If you logged in
	multiuser you may be able to use vi.

	Please be aware that if you fsck the two Linux partitions on
	the disk, they are actually ext3fs partitions and you will thereby
	corrupt their journals.  This will make them into ext2fs partitions.
	Linux will not be able to boot, and you will need to use the
	processes above to get to the point where Linux will mount them as
	ext2fs partitions:

		Login as root.

		Find the rc.rofilesys file.  It is either in
		/root/etc/rc.d

			cd /root/home/etc/rc.d

		Or you have to mount it using:

			mount /dev/mtdblock2 /mnt
			cd /mnt/home/etc/rc.d

		cat rc.rofilesys | sed -e '/^LINUXFMT=ext3$/s/^/#/' \
			-e '/^#LINUXFMT=ext2$/s/^#//' > ext2
		diff -u rc.rofilesys ext2		# to double check
		cp rc.rofilesys rc.rofilesys.ext2
		cp ext2 rc.rofilesys

	If you have created an 'A6' OpenBSD partition earlier using fdisk,
	you will be able to use disklabel to cut that partition into at
	least a root filesystem and swap partition.

OpenBSDInstallPart5(wd0)

OpenBSDInstallNet({:-CD-ROM, -:},nofloppy)

OpenBSDFTPInstall

OpenBSDHTTPInstall

OpenBSDTAPEInstall

OpenBSDCDROMInstall

OpenBSDDISKInstall({:-"wdN" or -:},,{:- or Linux (ext2)-:})

OpenBSDCommonFS

OpenBSDCommonURL

OpenBSDCongratulations