rdev - query/set image root device, RAM disk size, or video mode
rdev [ -Rrvh ] [ -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 ] ] ]
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. 2.0.x kernels and newer dynamically allocate the ramdisk and do not need this setting.
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.
At offset 504 there used to be the size of the ramdisk in kilobytes. One would specify a size, and this much was grabbed off the top of memory. In Linux 1.1.39 it became also possible to set this value on the kernel command line. In Linux 1.3.48 the ramdisk setup was changed. Ramdisk memory is now taken from the buffer cache, so that the ramdisk can grow dynamically. The interpretation of the ramdisk word was changed to a word of which the high order bit is a prompt flag (1: prompt for ramdisk: "VFS: Insert ramdisk floppy and press ENTER" - this is needed with a two-floppy boot), the next bit a load flag (1: load ramdisk), and the low order 11 bits give the starting block number of the root filesystem image (so that one can have a single floppy boot). See also linux/Documentation/ramdisk.txt.
Originally by Werner Almesberger (firstname.lastname@example.org) Modified by Peter MacDonald (pmacdona@sanjuan.UVic.CA) rootflags support added by Stephen Tweedie (email@example.com)
Закладки на сайте
Проследить за страницей
Created 1996-2022 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру