1
.\" Copyright 1992, 1993 Rickard E. Faith (faith@cs.unc.edu)
2
.\" May be distributed under the GNU General Public License
3
.\" Changes from sct@dcs.ed.ac.uk added Sat Oct 9 09:54:00 1993.
4
.TH RDEV 8 "20 November 1993" "Linux 0.99" "Linux Programmer's Manual"
6
rdev \- query/set image root device, RAM disk size, or video mode
48
line for the current root file system.
50
.BR ramsize ", " vidmode ", and " rootflags
51
print usage information.
53
In a bootable image for the Linux kernel on i386, there are several pairs
54
of bytes which specify the root device, the video mode, and the size of
55
the RAM disk. These pairs of bytes, by default, begin
56
at offset 504 (decimal) in the kernel image:
61
(500 and 502 Reserved)
70
will change these values.
72
Typical values for the
74
parameter, which is a bootable Linux kernel image, might be:
90
parameter might be something like:
102
One may also specify the device by a comma-separated pair
110
parameter specifies the size of the RAM disk in kilobytes. 2.0.x kernels
111
and newer dynamically allocate the ramdisk and do not need this setting.
117
parameter contains extra information used when mounting root.
118
Currently the only effect of these flags is to force the kernel to
119
mount the root filesystem in readonly mode if
127
parameter specifies the video mode:
134
0 = as if "0" was pressed at the prompt
135
1 = as if "1" was pressed at the prompt
136
2 = as if "2" was pressed at the prompt
137
n = as if "n" was pressed at the prompt
143
is not specified, the
145
will be examined to determine the current settings.
153
(Not relevant for 2.0.x and newer kernels).
172
utility, when used other than to find a name for the current root device,
173
is an ancient hack that works by patching a kernel image at a magic offset
174
with magic numbers. It does not work on architectures other than i386.
175
Its use is strongly discouraged. Use a boot loader like SysLinux or LILO
178
At offset 502 there used to be the device number of the swap device
179
(in Linux 0.12), and "rdev -s" or "swapdev" would set this.
180
However, since Linux 0.95 this constant is not used any longer,
181
and the swap device is specified using the
185
At offset 504 there used to be the size of the ramdisk in kilobytes.
186
One would specify a size, and this much was grabbed off the top of memory.
187
In Linux 1.1.39 it became also possible to set this value on the kernel
189
In Linux 1.3.48 the ramdisk setup was changed. Ramdisk memory is now
190
taken from the buffer cache, so that the ramdisk can grow dynamically.
191
The interpretation of the ramdisk word was changed to a word of which
192
the high order bit is a prompt flag (1: prompt for ramdisk:
193
"VFS: Insert ramdisk floppy and press ENTER" - this is needed with a
194
two-floppy boot), the next bit a load flag (1: load ramdisk),
195
and the low order 11 bits give the starting block number of the
196
root filesystem image (so that one can have a single floppy boot).
198
.IR linux/Documentation/ramdisk.txt .
201
Originally by Werner Almesberger (almesber@nessie.cs.id.ethz.ch)
202
Modified by Peter MacDonald (pmacdona@sanjuan.UVic.CA)
203
rootflags support added by Stephen Tweedie (sct@dcs.ed.ac.uk)
206
The rdev command is part of the util-linux-ng package and is available from
207
ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.