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