rdev.8

来自「Util-linux 软件包包含许多工具。其中比较重要的是加载、卸载、格式化、分」· 8 代码 · 共 160 行

8
160
字号
.\" Copyright 1992, 1993 Rickard E. Faith (faith@cs.unc.edu).\" May be distributed under the GNU General Public License.\" Changes from sct@dcs.ed.ac.uk added Sat Oct  9 09:54:00 1993..TH RDEV 8 "20 November 1993" "Linux 0.99" "Linux Programmer's Manual".SH NAMErdev \- query/set image root device, RAM disk size, or video mode.SH SYNOPSIS.nf.BR "rdev [ \-rvh ] [ \-o " offset " ] [ " image " [ " value " [ " offset " ] ] ]".BR "rdev [ \-o " offset " ] [ " image " [ " root_device " [ " offset " ] ] ]".BR "ramsize [ \-o " offset " ] [ " image " [ " size " [ " offset " ] ] ]".BR "vidmode [ \-o " offset " ] [ " image " [ " mode " [ " offset " ] ] ]".BR "rootflags [ \-o " offset " ] [ " image " [ " flags " [ " offset " ] ] ]".fi.SH DESCRIPTIONWith no arguments,.B rdevoutputs an.I /etc/mtabline for the current root file system.With no arguments,.BR ramsize ", " vidmode ", and " rootflagsprint usage information.In a bootable image for the Linux kernel on i386, there are several pairsof bytes which specify the root device, the video mode, and the size ofthe RAM disk.  These pairs of bytes, by default, beginat offset 504 (decimal) in the kernel image:.nf.RS 498 Root flags(500 and 502 Reserved) 504 RAM Disk Size 506 VGA Mode 508 Root Device(510 Boot Signature).RE.fi.B rdevwill change these values.Typical values for the.I imageparameter, which is a bootable Linux kernel image, might be:.nf.RS/vmlinux/vmunix/boot/bzImage-2.4.0/dev/fd0/dev/fd1.RE.fiWhen using the.B rdevcommand, the.I root_deviceparameter might be something like:.nf.RS/dev/hda1/dev/hdf13/dev/sda2/dev/sdc4/dev/ida/c0d0p1.RE.fiOne may also specify the device by a comma-separated pairof decimal integers.IR major , minor .For the.B ramsizecommand, the.B sizeparameter specifies the size of the RAM disk in kilobytes.For the.B rootflagscommand, the.B flagsparameter contains extra information used when mounting root.Currently the only effect of these flags is to force the kernel tomount the root filesystem in readonly mode if .B flagsis non-zero.For the.B vidmodecommand, the.B modeparameter specifies the video mode:.nf.RS-3 = Prompt-2 = Extended VGA-1 = Normal VGA 0 = as if "0" was pressed at the prompt 1 = as if "1" was pressed at the prompt 2 = as if "2" was pressed at the prompt n = as if "n" was pressed at the prompt.RE.fiIf the.I valueis not specified, the.I imagewill be examined to determine the current settings..SH OPTIONS.TP.B \-rCauses.B rdevto act like.BR ramsize ..TP.B \-RCauses.B rdevto act like.BR rootflags ..TP.B \-vCauses.B rdevto act like.BR vidmode ..TP.B \-hProvides help..SH BUGSThe.B rdevutility, when used other than to find a name for the current root device,is an ancient hack that works by patching a kernel image at a magic offsetwith magic numbers. It does not work on architectures other than i386.Its use is strongly discouraged. Use a boot loader like SysLinux or LILOinstead..SH HISTORYAt offset 502 there used to be the device number of the swap device(in Linux 0.12), and "rdev -s" or "swapdev" would set this.However, since Linux 0.95 this constant is not used any longer,and the swap device is specified using the.IR swapon ()system call..SH AUTHORS.nfOriginally by Werner Almesberger (almesber@nessie.cs.id.ethz.ch)Modified by Peter MacDonald (pmacdona@sanjuan.UVic.CA)rootflags support added by Stephen Tweedie (sct@dcs.ed.ac.uk).fi

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?