Different modules behave differently when you provide the same option multiple times. I know you can say console=
multiple times, and you get multiple consoles (we use it for machines with main consoles on both their framebuffers and serial port).
However, you can only have one root partition, so root=
almost certainly overwrites the previous value seen, almost certainly in a left-to-right fashion. This is corroborated by the kernel source, in init/do_mounts.c
, function root_dev_setup()
is responsible for acting on the root=
option, and all it does is store the parameter key in a variable. The bootparam root=31:0
is overridden by root=/dev/mtdblock2
, or at least that's the case in the 2.6.25 source tree I just checked.
By the way, if you're competent with C, the function name_to_dev_t()
in the same file is responsible for parsing the value of root=
, and is very enlightening!
The x:y
notation is standard Unixism for major:minor, which is the way Unices identify devices. Traditionally, major was an 8-bit number identifying the driver for the hardware, and minor was an 8-bit number identifying the device itself. There are two namespaces for the major
numbers: character devices and block devices. You can see both by typing cat /proc/devices
, and you can see what's currently active by saying ls -la /dev
. Here's an example:
ls -la /dev/zero /dev/sda
brw-rw---- 1 root disk 8, 0 Jan 12 22:01 /dev/sda
crw-rw-rw- 1 root root 1, 5 Jan 12 22:01 /dev/zero
The first column identifies the driver type (b
for block, c
for character). The two columns to the left of Jan
are the major and minor numbers in major, minor
format.
You can give root=
any block device independent of its name using the major:minor notation.
The full list of device numbers is in your kernel source tree, under Documentation/devices.txt
. 31:0 seems to refer to /dev/rom0, the first ROM card on the system.