xref: /openbsd/distrib/notes/loongson/install (revision 264ca280)
1dnl	$OpenBSD: install,v 1.14 2014/03/19 01:59:48 tedu Exp $
2OpenBSDInstallPrelude
3
4Booting the installation media:
5
6The easiest way to boot into the OpenBSD installer is to copy the miniroot
7image to a USB stick using dd(1) and boot bsd.rd from the PMON prompt:
8
9    PMON> boot -k /dev/fs/ext2@usb0/bsd.rd
10
11on Lemote systems, and
12
13    PMON> load /dev/fs/ext2@usb0/bsd.rd
14    PMON> g
15
16on Gdium systems.
17
18Another way to boot into the OpenBSD installer is to copy the bsd.rd
19installation kernel to the main Linux partition, and boot from it.
20
21Assuming the installation kernel has been copied to /boot/bsd.rd on the
22Linux system, at the PMON prompt, enter
23
24    PMON> boot -k /dev/fs/ext2@wd0/boot/bsd.rd
25
26on Lemote systems, and
27
28    PMON> load /dev/fs/ext2@usbg0/boot/bsd.rd
29    PMON> g
30
31on Gdium systems.
32dnl
33dnl Alternatively, if your particular PMON flavour supports `fat' filesystems,
34dnl you can boot the kernel from an usb key with:
35dnl
36dnl    PMON> boot /dev/fs/fat@usb0:/bsd.rd
37
38Netbooting the installation kernel can be done as well:
39
40    PMON> ifaddr rtl0 <your ip>
41    PMON> boot -k tftp://<server ip>/bsd.rd
42
43OpenBSDInstallPart2
44
45OpenBSDInstallPart3(,"sd0 for USB storage, or wd0 for internal storage
46	(either a disk drive or an SSD)")
47
48OpenBSDInstallPart4
49
50OpenBSDInstallMBRPart1
51
52dnl OpenBSDInstallMBRPart2
53	The fdisk(8) utility will be invoked to let you edit your MBR
54	partitioning.  The current MBR partitions defined will be
55	displayed and you will be allowed to modify them, and add new
56	partitions.
57
58	The setup will need one 'Linux files' partition and an 'OpenBSD'
59	partition. If you use the whole disk option, the install script
60	will create a small 'Linux files' partition and use the rest of
61	the disk for the OpenBSD installation.
62
63	After your OpenBSD MBR partition has been setup, the real
64	partition setup can follow.
65
66OpenBSDInstallPart5({:-
67	Linux partitions defined on the disk will usually show up as
68	partition 'i', 'j' and so on.-:})
69
70OpenBSDInstallPart6({:-CD-ROM, -:})
71
72OpenBSDURLInstall
73
74OpenBSDCDROMInstall
75
76OpenBSDNFSInstall
77
78OpenBSDDISKInstall({:-"wdN" or -:},,{:-, Linux (ext2) or MS-DOS-:})
79
80OpenBSDCommonInstall
81
82OpenBSDInstallWrapup
83
84Lemote systems final steps:
85
86	Lemote systems ship with a boot menu.  After an installation
87	preserving the Linux partitions is complete, you can add an OpenBSD
88	entry to the boot menu to be able to boot OpenBSD more easily.
89
90	The boot menu contents are found in /boot/boot.cfg on the Linux
91	partition. To add an OpenBSD entry, simply add a new entry in the
92	file, such as:
93
94		title OpenBSD
95			kernel /dev/fs/ext2@wd0/boot/boot
96			args ""
97
98	In the example above, /dev/fs/ext2@wd0/boot/boot is the PMON path
99	to the OpenBSD bootloader, which is copied to that location by the
100	install script.
101
102	You may make OpenBSD the default option by changing the ``default''
103	line near the top of the file. The value on this line is the index
104	of the default entry, starting at zero. So if you added the OpenBSD
105	entry as the fourth entry in the file, it would become the default
106	choice with:
107
108		default 3
109
110	The timeout until the default choice is selected, in seconds, can
111	be modified on the ``timeout'' line.
112
113	However, due to side effects of PMON operation, automatic loading
114	of OpenBSD binaries (bootloader or kernel) causes a register dump
115	to be silently displayed by PMON; while it won't be visible on
116	screen, PMON will gladly wait for user input to continue if it
117	believes it has written too much output.
118
119	To overcome this annoyance, simply change the `moresz' environment
120	variable to a large value (30 or larger will do):
121
122	    PMON> set moresz 30
123
124	The bootloader will attempt to load the kernel file set in the `bsd'
125	environment variable. Should this fail, it will wait for user
126	commands. The value of `bsd' should be a path within the OpenBSD
127	root filesystem on the disk, such as:
128
129	    PMON> set bsd /bsd
130
131	If you have removed the Linux installation or if you do not want to
132	use the boot menu, you may simply disable it in the environment, and
133	set the `al' variable to point to the bootloader path:
134
135	    PMON> set ShowBootMenu no
136	    PMON> set al /dev/fs/ext2@wd0/boot/boot
137
138	Alternatively, you might want to create a /boot/boot.cfg file in the
139	small Linux partition created by the installation.
140
141	On the Fuloong 2F, getting PMON to use the serial console is tricky,
142	due to PMON bugs and design decisions made by Lemote. PMON's default
143	serial speed is 115200, and OpenBSD will also use that speed. By
144	default, it is only possible to use serial input if no USB keyboard is
145	attached. PMON will nevertheless display its output on the VGA display.
146	To get full serial access, the first step is to boot into PMON> with
147	both serial console and VGA display but no USB keyboard attached.
148	You can type on the serial console, but output will be shown on the
149	VGA display. Next enter the following commands:
150
151	    PMON> set novga 1
152	    PMON> set nokbd 1
153	    PMON> set al ""
154	    PMON> set ShowBootMenu no
155
156	If you have a dual boot setup, mount the Linux boot partition and
157	rename /boot/boot.cfg so that it does not get found by PMON. This
158	will enable full serial access to PMON on the Fuloong 2F.
159
160Gdium systems final steps:
161
162	Gdium systems do not have a boot menu, and directly boot the system
163	(Linux, by default). Unfortunately, the OpenBSD bootloader operation
164	is very limited on this machine, as it can not access USB devices
165	(which means no keyboard input as well).
166
167	To overcome this and be able to boot OpenBSD nevertheless, the
168	bootloader relies upon PMON's ability to load a Linux so-called
169	``initrd'' image. By making PMON load the kernel as the ``initrd''i
170	image, and then run the bootloader, the bootloader will be able to
171	``load'' the OpenBSD kernel correctly.
172
173	The path to the file booted by default is set in the `al' environment
174	variable, and the path to the initrd image is set in the `rd'
175	environment variable.
176
177	To boot the bsd kernel on the G-Key by default, assuming it has been
178	copied to /boot/bsd on the first ext3 partition, and the bootloader
179	has been copied to /boot/boot on the same filesystem, the settings
180	are:
181
182	    PMON> set al /dev/fs/ext2@usbg0/boot/boot
183	    PMON> set rd /dev/fs/ext2@usbg0/boot/bsd
184
185	Alternatively, you can disable autoboot by removing this variable:
186
187	    PMON> unset al
188
189OpenBSDCongratulations
190
191
192
193OpenBSDUnattendedInstallation
194