RDEV(8)

NAME
rdev - query/set image root device, swap device, RAM disk size, or video mode

SYNOPSIS
/etc/rdev [ -rsvh ] [ -o offset ] [ image [ value [ offset ] ] ]
/etc/rdev [ -o offset ] [ image [ root_device [ offset ] ] ]
/etc/swapdev [ -o offset ] [ image [ swap_device [ offset ] ] ]
/etc/ramsize [ -o offset ] [ image [ size [ offset ] ] ]
/etc/vidmode [ -o offset ] [ image [ mode [ offset ] ] ]

DESCRIPTION
With no arguments, rdev outputs an /etc/mtab line for the current root file system. With no arguments, swapdev,ramsize, and vidmode print usage information. In a bootable image for the Linux kernel, there are several pairs of bytes which specify the root device, the video mode, the size of the RAM disk, and the swap device. These pairs of bytes, by default, begin at offset 504 (decimal) in the kernel image:
    (502 Reserved)
     504 RAM Disk Size
     506 VGA Mode
     508 Root Device
    (510 Boot Signature)
rdev will change these values. Typical values for the image parameter, which is a bootable Linux kernel image, are as follows:
    /vmlinux
    /vmlinux.test
    /vmunix
    /vmunix.test
    /dev/fd0
    /dev/fd1
When using the rdev, or swapdev commands, the root_device or swap_device parameter are as follows:
    /dev/hda[1-8]
    /dev/hdb[1-8]
    /dev/sda[1-8]
    /dev/sdb[1-8]
For the ramsize command, the size parameter specifies the size of the RAM disk in kilobytes. For the vidmode command, the mode parameter specifies the video mode:
    -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
If the value is not specified, the image will be examined to determine the current settings.

OPTIONS

-s  Causes rdev to act like swapdev.

-r  Causes rdev to act like ramsize.

-v  Causes rdev to act like vidmode.

-h  Provides help.

BUGS
For historical reasons, there are two methods for specifying alternative values for the offset.

The user interface is cumbersome, non-intuitive, and should probably be re-written from scratch, allowing multiple kernel image parameters to be changed or examined with a single command.

If LILO is used, rdev is no longer needed for setting the root device and the VGA mode, since these parameters that rdev modifies can be set from the LILO prompt during a boot. However, rdev is still needed at this time for setting the RAM disk size. Users are encouraged to find the LILO documentation for more information, and to use LILO when booting their systems.

AUTHORS
Originally by Werner Almesberger (almesber@nessie.cs.id.ethz.ch)
Modified by Peter MacDonald (pmacdona@sanjuan.UVic.CA)