Copyright (C) 2000-2012 |
Manpages RDEVSection: Linux Programmer's Manual (8)Updated: 20 November 1993 Index Return to Main Contents NAMErdev - query/set image root device, RAM disk size, or video modeSYNOPSISrdev [ -rvh ] [ -o offset ] [ image [ value [ offset ] ] ] rdev [ -o offset ] [ image [ root_device [ offset ] ] ] ramsize [ -o offset ] [ image [ size [ offset ] ] ] vidmode [ -o offset ] [ image [ mode [ offset ] ] ] rootflags [ -o offset ] [ image [ flags [ offset ] ] ] DESCRIPTIONWith no arguments, rdev outputs an /etc/mtab line for the current root file system. With no arguments, ramsize, vidmode, and rootflags print usage information.In a bootable image for the Linux kernel on i386, there are several pairs of bytes which specify the root device, the video mode, and the size of the RAM disk. These pairs of bytes, by default, begin at offset 504 (decimal) in the kernel image:
rdev will change these values. Typical values for the image parameter, which is a bootable Linux kernel image, might be:
When using the rdev command, the root_device parameter might be something like:
One may also specify the device by a comma-separated pair of decimal integers major,minor. For the ramsize command, the size parameter specifies the size of the RAM disk in kilobytes. For the rootflags command, the flags parameter contains extra information used when mounting root. Currently the only effect of these flags is to force the kernel to mount the root filesystem in readonly mode if flags is non-zero. For the vidmode command, the mode parameter specifies the video mode:
If the value is not specified, the image will be examined to determine the current settings. OPTIONS
BUGSThe rdev utility, 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 offset with magic numbers. It does not work on architectures other than i386. Its use is strongly discouraged. Use a boot loader like SysLinux or LILO instead.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 swapon() system call.AUTHORSOriginally 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)
IndexThis document was created by man2html, using the manual pages. Time: 07:59:26 GMT, April 25, 2024 |