Penguin
Annotated edit history of rdev(8) version 2, including all changes. View license author blame.
Rev Author # Line
1 perry 1 RDEV
2 !!!RDEV
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 OPTIONS
7 BUGS
8 HISTORY
9 AUTHORS
10 ----
11 !!NAME
12
13
14 rdev - query/set image root device, RAM disk size, or video mode
15 !!SYNOPSIS
16
17
18 __rdev [[ -rvh ] [[ -o__ offset __] [[__ image __[[__ value __[[__ offset __] ] ]
19 rdev [[ -o__ offset __] [[__ image __[[__ root_device __[[__ offset __] ] ]
20 ramsize [[ -o__ offset __] [[__ image __[[__ size __[[__ offset __] ] ]
21 vidmode [[ -o__ offset __] [[__ image __[[__ mode __[[__ offset __] ] ]
22 rootflags [[ -o__ offset __] [[__ image __[[__ flags __[[__ offset __] ] ]
23 __
24 !!DESCRIPTION
25
26
27 With no arguments, __rdev__ outputs an ''/etc/mtab''
28 line for the current root file system. With no arguments,
29 __ramsize__, __vidmode__, and __rootflags__ print
30 usage information.
31
32
33 In a bootable image for the Linux kernel on i386, there are
34 several pairs of bytes which specify the root device, the
35 video mode, and the size of the RAM disk. These pairs of
36 bytes, by default, begin at offset 504 (decimal) in the
37 kernel image:
38
39
40 498 Root flags
41 (500 and 502 Reserved)
42 504 RAM Disk Size
43 506 VGA Mode
44 508 Root Device
45 (510 Boot Signature)
46 __rdev__ will change these values.
47
48
49 Typical values for the ''image'' parameter, which is a
50 bootable Linux kernel image, might be:
51
52
53 /vmlinux
54 /vmunix
55 /boot/bzImage-2.4.0
56 /dev/fd0
57 /dev/fd1
58 When using the __rdev__ command, the ''root_device'' parameter might be something like:
59
60
61 /dev/hda1
62 /dev/hdf13
63 /dev/sda2
64 /dev/sdc4
65 /dev/ida/c0d0p1
66 One may also specify the device by a comma-separated pair of decimal integers ''major'',''minor''.
67
68
69 For the __ramsize__ command, the __size__ parameter
70 specifies the size of the RAM disk in
71 kilobytes.
72
73
74 For the __rootflags__ command, the __flags__ parameter
75 contains extra information used when mounting root.
76 Currently the only effect of these flags is to force the
77 kernel to mount the root filesystem in readonly mode if
78 __flags__ is non-zero.
79
80
81 For the __vidmode__ command, the __mode__ parameter
82 specifies the video mode:
83
84
85 -3 = Prompt
86 -2 = Extended VGA
87 -1 = Normal VGA
88 0 = as if
89 If the ''value'' is not specified, the ''image'' will be examined to determine the current settings.
90 !!OPTIONS
91
92
93 __-r__
94
95
96 Causes __rdev__ to act like __ramsize__.
97
98
99 __-R__
100
101
102 Causes __rdev__ to act like
103 __rootflags__.
104
105
106 __-v__
107
108
109 Causes __rdev__ to act like __vidmode__.
110
111
112 __-h__
113
114
115 Provides help.
116 !!BUGS
117
118
119 The __rdev__ utility, when used other than to find a name
120 for the current root device, is an ancient hack that works
121 by patching a kernel image at a magic offset with magic
122 numbers. It does not work on architectures other than i386.
123 Its use is strongly discouraged. Use a boot loader like
2 perry 124 !SysLinux or LILO instead.
1 perry 125 !!HISTORY
126
127
128 At offset 502 there used to be the device number of the swap
129 device (in Linux 0.12), and
130 swapon''() system
131 call.
132 !!AUTHORS
133
134
135 Originally by Werner Almesberger (almesber@nessie.cs.id.ethz.ch)
2 perry 136 Modified by Peter !MacDonald (pmacdona@sanjuan.UVic.CA)
1 perry 137 rootflags support added by Stephen Tweedie (sct@dcs.ed.ac.uk)
138 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.