RDEV(8) Linux Programmer's Manual RDEV(8) NNAAMMEE rdev - query/set image root device, swap device, RAM disk size, or video mode SSYYNNOOPPSSIISS rrddeevv [[ --rrssvvhh ]] [[ --oo offset ]] [[ image [[ value [[ offset ]] ]] ]] rrddeevv [[ --oo offset ]] [[ image [[ root_device [[ offset ]] ]] ]] sswwaappddeevv [[ --oo offset ]] [[ image [[ swap_device [[ offset ]] ]] ]] rraammssiizzee [[ --oo offset ]] [[ image [[ size [[ offset ]] ]] ]] vviiddmmooddee [[ --oo offset ]] [[ image [[ mode [[ offset ]] ]] ]] rroooottffllaaggss [[ --oo offset ]] [[ image [[ flags [[ offset ]] ]] ]] DDEESSCCRRIIPPTTIIOONN With no arguments, rrddeevv outputs an _/_e_t_c_/_m_t_a_b line for the current root file system. With no arguments, sswwaappddeevv, rraammssiizzee, vviiddmmooddee, and rroooottffllaaggss print usage information. In a bootable image for the Linux kernel, there are sev- eral 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: 498 Root flags (500 and 502 Reserved) 504 RAM Disk Parameters 506 VGA Mode 508 Root Device (510 Boot Signature) rrddeevv will change these values. Typical values for the _i_m_a_g_e parameter, which is a bootable Linux kernel image, are as follows: /vmlinux /vmlinux.test /vmunix /vmunix.test /dev/fd0 /dev/fd1 When using the rrddeevv, or sswwaappddeevv commands, the _r_o_o_t___d_e_v_i_c_e or _s_w_a_p___d_e_v_i_c_e parameter are as follows: /dev/hda[1-8] /dev/hdb[1-8] /dev/sda[1-8] /dev/sdb[1-8] For the rraammssiizzee command, the ssiizzee parameter specifies the size of the RAM disk in kilobytes. ### cLIeNUX ALERT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! THIS IS NO LONGER TRUE! SEE ../linux/Documentation/ramdisk.txt The ramdisk grows dynamically, and this boot flag is used to set an offset in the boot image to look for a root filesystem image, and single bit flags for whether to prompt for such an image, and whether to load such an image. For the rroooottffllaaggss command, the ffllaaggss parameter contains Linux 0.99 20 November 1993 1 RDEV(8) Linux Programmer's Manual RDEV(8) 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 ffllaaggss is non-zero. For the vviiddmmooddee command, the mmooddee 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 _v_a_l_u_e is not specified, the _i_m_a_g_e will be examined to determine the current settings. OOPPTTIIOONNSS --ss Causes rrddeevv to act like sswwaappddeevv. --rr Causes rrddeevv to act like rraammssiizzee. --RR Causes rrddeevv to act like rroooottffllaaggss. --vv Causes rrddeevv to act like vviiddmmooddee. --hh Provides help. BBUUGGSS For historical reasons, there are two methods for specify- ing alternative values for the offset. The user interface is cumbersome, non-intuitive, and should probably be re-written from scratch, allowing mul- tiple kernel image parameters to be changed or examined with a single command. If LILO is used, rrddeevv is no longer needed for setting the root device and the VGA mode, since these parameters that rrddeevv modifies can be set from the LILO prompt during a boot. However, rrddeevv is still needed at this time for set- ting the RAM disk size. Users are encouraged to find the LILO documentation for more information, and to use LILO when booting their systems. AAUUTTHHOORRSS Originally 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) Linux 0.99 20 November 1993 2