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