~ubuntu-branches/ubuntu/precise/util-linux/precise-proposed

« back to all changes in this revision

Viewing changes to sys-utils/rdev.8

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2011-06-20 22:31:50 UTC
  • mfrom: (1.6.3 upstream) (4.5.1 sid)
  • Revision ID: james.westby@ubuntu.com-20110620223150-lz8wrv0946ihcz3z
Tags: 2.19.1-2ubuntu1
* Merge from Debian unstable, remaining changes:
  - Build for multiarch.
  - Add pre-depends on multiarch-support.
  - configure.ac: don't try to be clever about extracting a path name from
    $libdir to append to /usr in a way that's not overridable; instead,
    reuse the built-in configurable libexecdir.
  - Fix up the .pc.in files to know about libexecdir, so our substitutions
    don't leave us with unusable pkg-config files.
  - Install custom blkid.conf to use /dev/.blkid.tab since we don't
    expect device names to survive a reboot
  - Mention mountall(8) in fstab(5) manpages, along with its special
    options.
  - Since upstart is required in Ubuntu, the hwclock.sh init script is not
    called on startup and the hwclockfirst.sh init script is removed.
  - Drop depends on initscripts for the above.
  - Replace hwclock udev rule with an Upstart job.
  - For the case where mount is called with a directory to mount, look
    that directory up in mountall's /lib/init/fstab if we couldn't find
    it mentioned anywhere else.  This means "mount /proc", "mount /sys",
    etc. work.
  - mount.8 points to the cifs-utils package, not the obsolete smbfs one. 
* Dropped changes:
  - mount.preinst: lsb_release has been fixed in lucid and above to be
    usable without configuration, so we don't have to diverge from Debian
    here anymore.
* Changes merged upstream:
  - sfdisk support for '+' with '-N'
  - mount/umount.c: fix a segfault on umount with empty mtab entry
  - Fix arbitrary unmount with fuse security issue

Show diffs side-by-side

added added

removed removed

Lines of Context:
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, RAM disk size, or video mode
7
 
.SH SYNOPSIS
8
 
.B rdev
9
 
.RB [ \-Rrvh ]
10
 
.RB [ \-o
11
 
.IR offset ]
12
 
.RI [ image
13
 
.RI [ value
14
 
.RI [  offset ]]]
15
 
.br
16
 
.B rdev
17
 
.RB [ \-o
18
 
.IR offset ]
19
 
.RI [ image
20
 
.RI [ root_device
21
 
.RI [  offset ]]]
22
 
.br
23
 
.B ramsize
24
 
.RB [ \-o
25
 
.IR offset ]
26
 
.RI [ image
27
 
.RI [ size
28
 
.RI [  offset ]]]
29
 
.br
30
 
.B vidmode
31
 
.RB [ \-o
32
 
.IR offset ]
33
 
.RI [ image
34
 
.RI [ mode
35
 
.RI [  offset ]]]
36
 
.br
37
 
.B rootflags
38
 
.RB [ \-o
39
 
.IR offset ]
40
 
.RI [ image
41
 
.RI [ flags
42
 
.RI [  offset ]]]
43
 
.SH DESCRIPTION
44
 
With no arguments,
45
 
.B rdev
46
 
outputs an
47
 
.I /etc/mtab
48
 
line for the current root file system.
49
 
With no arguments,
50
 
.BR ramsize ", " vidmode ", and " rootflags
51
 
print usage information.
52
 
 
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:
57
 
 
58
 
.nf
59
 
.RS
60
 
 498 Root flags
61
 
(500 and 502 Reserved)
62
 
 504 RAM Disk Size
63
 
 506 VGA Mode
64
 
 508 Root Device
65
 
(510 Boot Signature)
66
 
.RE
67
 
.fi
68
 
 
69
 
.B rdev
70
 
will change these values.
71
 
 
72
 
Typical values for the
73
 
.I image
74
 
parameter, which is a bootable Linux kernel image, might be:
75
 
 
76
 
.nf
77
 
.RS
78
 
/vmlinux
79
 
/vmunix
80
 
/boot/bzImage-2.4.0
81
 
/dev/fd0
82
 
/dev/fd1
83
 
.RE
84
 
.fi
85
 
 
86
 
When using the
87
 
.B rdev
88
 
command, the
89
 
.I root_device
90
 
parameter might be something like:
91
 
 
92
 
.nf
93
 
.RS
94
 
/dev/hda1
95
 
/dev/hdf13
96
 
/dev/sda2
97
 
/dev/sdc4
98
 
/dev/ida/c0d0p1
99
 
.RE
100
 
.fi
101
 
 
102
 
One may also specify the device by a comma-separated pair
103
 
of decimal integers
104
 
.IR major , minor .
105
 
 
106
 
For the
107
 
.B ramsize
108
 
command, the
109
 
.I size
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.
112
 
 
113
 
For the
114
 
.B rootflags
115
 
command, the
116
 
.I flags
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
120
 
.I flags
121
 
is non-zero.
122
 
 
123
 
For the
124
 
.B vidmode
125
 
command, the
126
 
.I mode
127
 
parameter specifies the video mode:
128
 
 
129
 
.nf
130
 
.RS
131
 
-3 = Prompt
132
 
-2 = Extended VGA
133
 
-1 = Normal VGA
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
138
 
.RE
139
 
.fi
140
 
 
141
 
If the
142
 
.I value
143
 
is not specified, the
144
 
.I image
145
 
will be examined to determine the current settings.
146
 
.SH OPTIONS
147
 
.TP
148
 
.B \-r
149
 
Causes
150
 
.B rdev
151
 
to act like
152
 
.BR ramsize
153
 
(Not relevant for 2.0.x and newer kernels).
154
 
.TP
155
 
.B \-R
156
 
Causes
157
 
.B rdev
158
 
to act like
159
 
.BR rootflags .
160
 
.TP
161
 
.B \-v
162
 
Causes
163
 
.B rdev
164
 
to act like
165
 
.BR vidmode .
166
 
.TP
167
 
.B \-h
168
 
Provides help.
169
 
.SH BUGS
170
 
The
171
 
.B rdev
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
176
 
instead.
177
 
.SH HISTORY
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
182
 
.BR swapon (2)
183
 
system call.
184
 
 
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
188
 
command line.
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).
197
 
See also
198
 
.IR linux/Documentation/ramdisk.txt .
199
 
.SH AUTHORS
200
 
.nf
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)
204
 
.fi
205
 
.SH AVAILABILITY
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/.