]> git.ipfire.org Git - thirdparty/util-linux.git/blame - sys-utils/rdev.8
Imported from util-linux-2.10s tarball.
[thirdparty/util-linux.git] / sys-utils / rdev.8
CommitLineData
6dbe3af9
KZ
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"
5.SH NAME
6rdev \- query/set image root device, swap device, RAM disk size, or video mode
7.SH SYNOPSIS
8.nf
9.BR "rdev [ \-rsvh ] [ \-o " offset " ] [ " image " [ " value " [ " offset " ] ] ]"
10.BR "rdev [ \-o " offset " ] [ " image " [ " root_device " [ " offset " ] ] ]"
11.BR "swapdev [ \-o " offset " ] [ " image " [ " swap_device " [ " offset " ] ] ]"
12.BR "ramsize [ \-o " offset " ] [ " image " [ " size " [ " offset " ] ] ]"
13.BR "vidmode [ \-o " offset " ] [ " image " [ " mode " [ " offset " ] ] ]"
14.BR "rootflags [ \-o " offset " ] [ " image " [ " flags " [ " offset " ] ] ]"
15.fi
16.SH DESCRIPTION
17.\" " for emacs hilit19
18With no arguments,
19.B rdev
20outputs an
21.I /etc/mtab
22line for the current root file system.
23With no arguments,
24.BR swapdev ", " ramsize ", " vidmode ", and " rootflags
25print usage information.
26
27In a bootable image for the Linux kernel, there are several pairs of bytes
28which specify the root device, the video mode, the size of the RAM disk,
29and the swap device. These pairs of bytes, by default, begin at offset 504
30(decimal) in the kernel image:
31
32.nf
33.RS
34 498 Root flags
35(500 and 502 Reserved)
36 504 RAM Disk Size
37 506 VGA Mode
38 508 Root Device
39(510 Boot Signature)
40.RE
41.fi
42
43.B rdev
44will change these values.
45
46Typical values for the
47.I image
66ee8158 48parameter, which is a bootable Linux kernel image, might be:
6dbe3af9
KZ
49
50.nf
51.RS
52/vmlinux
6dbe3af9 53/vmunix
66ee8158 54/boot/bzImage-2.4.0
6dbe3af9
KZ
55/dev/fd0
56/dev/fd1
57.RE
58.fi
59
60When using the
61.BR rdev ", or " swapdev
62commands, the
63.IR root_device " or " swap_device
66ee8158 64parameter might be something like:
6dbe3af9
KZ
65
66.nf
67.RS
66ee8158
KZ
68/dev/hda1
69/dev/hdf13
70/dev/sda2
71/dev/sdc4
72/dev/ida/c0d0p1
6dbe3af9
KZ
73.RE
74.fi
75
76For the
77.B ramsize
78command, the
79.B size
80parameter specifies the size of the RAM disk in kilobytes.
81
82For the
83.B rootflags
84command, the
85.B flags
86parameter contains extra information used when mounting root.
87Currently the only effect of these flags is to force the kernel to
88mount the root filesystem in readonly mode if
89.B flags
90is non-zero.
91
92For the
93.B vidmode
94command, the
95.B mode
96parameter specifies the video mode:
97
98.nf
99.RS
100-3 = Prompt
101-2 = Extended VGA
102-1 = Normal VGA
103 0 = as if "0" was pressed at the prompt
104 1 = as if "1" was pressed at the prompt
105 2 = as if "2" was pressed at the prompt
106 n = as if "n" was pressed at the prompt
107.RE
108.fi
109
110If the
111.I value
112is not specified, the
113.I image
114will be examined to determine the current settings.
115.SH OPTIONS
116.TP
117.B \-s
118Causes
119.B rdev
120to act like
121.BR swapdev .
122.TP
123.B \-r
124Causes
125.B rdev
126to act like
127.BR ramsize .
128.TP
129.B \-R
130Causes
131.B rdev
132to act like
133.BR rootflags .
134.TP
135.B \-v
136Causes
137.B rdev
138to act like
139.BR vidmode .
140.TP
141.B \-h
142Provides help.
143.SH BUGS
144For historical reasons, there are two methods for specifying alternative
145values for the offset.
146.sp
147The user interface is cumbersome, non-intuitive, and should probably be
148re-written from scratch, allowing multiple kernel image parameters to be
149changed or examined with a single command.
150.sp
151If LILO is used,
152.B rdev
153is no longer needed for setting the root device and the VGA mode, since
154these parameters that
155.B rdev
156modifies can be set from the LILO prompt during a boot. However,
157.B rdev
158is still needed at this time for setting the RAM disk size. Users are
159encouraged to find the LILO documentation for more information, and to use
160LILO when booting their systems.
161.SH AUTHORS
162.nf
163Originally by Werner Almesberger (almesber@nessie.cs.id.ethz.ch)
164Modified by Peter MacDonald (pmacdona@sanjuan.UVic.CA)
165rootflags support added by Stephen Tweedie (sct@dcs.ed.ac.uk)
166.fi