File: tips.html

package info (click to toggle)
chos 0.82-2
  • links: PTS
  • area: non-free
  • in suites: slink
  • size: 1,024 kB
  • ctags: 968
  • sloc: ansic: 4,180; asm: 2,103; tcl: 1,976; makefile: 152; sh: 79
file content (163 lines) | stat: -rw-r--r-- 4,946 bytes parent folder | download | duplicates (4)
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
<html>
<body bgcolor=#ffffff text=#000000 link=#4f4fff vlink=#0000ff alink=#00ff00>

<h1>Tips</h1>

<ul>
	<li><a href="#bfloppy">Creating a bootfloppy</a>
	<li><a href="#passwords">Passwords</a>
</ul>

<!-- BOOT FLOPPY -->

<a name="bfloppy">
<p><h2>Creating a bootfloppy</h2>
There are times when you might need a floppy to boot a system from.
Here's a step-by-step  example on creating a bootup floppy
you can use to boot Linux from.
<p>
(<b>NOTE</b>: chos compiled for kernel 2.x doesn't seem to work with floppies under kernel
1.x and vice versa.)

<ul>
	<li> <a href="#normal">Normal bootfloppy</a>
	<li> <a href="#standalone">Standalone/rescue bootfloppy</a>
</ul>

<a name="normal">
<p><h4>Normal bootfloppy</h4>
This kind of bootfloppy is always good to have. With it you can boot your
system after some program has modified your MBR. E.g. after having installed
a new OS in your box. This kind of bootfloppy is required when setting up
the rewrite feature.

<ol>
	<li>Create a configuration file. The files should be set up
	as follows:<br>
	<ul>
	<code>
	install=/dev/fd0<br>
	bindir=<i>path</i><br>
	mapfile=<i>path</i>/chos.map<br>
	bgfile=<i>path</i>/chos.background<br>
	</code>
	</ul>
	<i>Path</i> is any path but <b><i>/boot</b></i> is not a good choice since
	your normal system bootup files are kept there. <b><i>/boot/bfloppy</b></i>
	is fine. You can have the files on the floppy but that is
	not necessary unlike with standalone setup.<br>
	Everything else in the file can be as in your normal hd configuration.
	
	<li>Copy the binaries in <i>path</i> possibly creating the directory.
	<ul>
	<code>
		(someone)~$ mkdir <i>path</i><br>
		(someone)~$ cp /boot/chos.loader* /boot/chos.bsect <i>path</i>
	</code>
	</ul>
	<li>Run chos
	<ul>
	<code>
		(root)~$ chos -v -c the_config_file_I_created
	</code>
	</ul>
</ol>
<a name="standalone">
<p><h4>Standalone/rescue bootfloppy</h4>
With this kinda bootfloppy you can boot any system since all necessary
stuff to boot a system is on the floppy.

<ol>
	<li>The first step is, of course, to create a config file.
	The following config file lines will tell chos to search for it's binary files and
	save other files on first floppy drive.
	<code>
	<ul>bindir=/floppy<br>
	chos.map=/floppy/chos.map<br>
	chos.background=/floppy/chos.background<br>
	install=/dev/fd0
	</ul></code>
	Also setup a Linux kernel that exists on the floppy..
	<code><ul>
		linux "Linux" {<br>
		<ul>image=/floppy/my_linux<br>
		...<br></ul>
		}
	</ul></code>
	
	<li>Now that you have a config file, mount the damn floppy:
	<code><ul>
		(someone)/chos_path/$ mount /floppy<br>
	</ul></code>
	and copy chos binaries and your kernel there:
	<code><ul>
		(someone)/chos_path/$ cp ./bin/* /floppy<br>
		(someone)/chos_path/$ cp where_ever_my_kernel_is /floppy<br>
	</ul></code>
	<li>And finally run chos:
	<code><ul>
		(root)/chos_path/$ chos -v -c the_config_file_I_created<br>
	</ul></code>
</ol>	
	The above let's you boot the kernel of a floppy, but you still need to have
	a root filesystem on a hard or floppy disk or an NFS image. 
	If you want to make a real 'rescue' floppy, there are the
	chances:
	<ul>
		<li>Copy all the necessary binaries to set the system up and running
		and do the things you want on the same or another floppy (Linux will prompt you to insert the floppy).
		You need '<i>/bin/sh</i>' at least.
		<br>
		You might want to use statically compiled binaries since shared libc, 
		not to mention libg++, is pretty huge, which leaves you no space 
		for the actual binaries...
		You must add something like '<i>root=/dev/fd0</i>' on the Linux command line.
		
		<li>If one floppy isn't big enough, create a compressed ramdisk.
		See '<i>/usr/src/linux/Documentation/ramdisk.txt</i>' for information
		on creating one.
		<br>
		If you want to use an initial ramdisk, the ramdisk image must be small
		enough to fit on the same floppy with the kernel and chos data.
		(That's due chos at the moment only supporting regular-file initrds. I should
		add support for initrd devices.)
	</ul>
<p>


<!-- PASSWORD -->
<a name="passwords">
<p><h2>Passwords</h2>
Suppose you wanted other users to only be able start Linux (or some other OS) here's
what you do:
<ul>
<li>Set a password (<i><b>password</b>=my_password</i>)
<li>For those OSes you allow others to boot, set the password off or in case of
Linux probably to '<i>restricted</i>'.
(In image configuration: <i><b>password</b>=no<b>|</b>restricted</i>)
</ul>
Here's an example configuration that
<ul>
<li> automagically starts Linux unless a modifier key is being held down ...
<li> ... and requires a password to start DOS or to manually enter Linux a command line
</ul>
<ul>
<pre>
install=/dev/hda
password=salasana	# salasana = Finnish for password
autoboot=not_pressed

linux "Linux" {
	image=/boot/vmlinuz
	password=restricted
	cmdline=vga=EXTENDED root=/dev/hda4
}

bootsect "DOS" {
	image=/dev/hda1
}
</pre>
</ul>

</body>
</html>