Installation:The kernel commandline /dev params mini-HowTo

From Lunar Linux
Revision as of 18:51, 22 January 2008 by RicsiTdarl (Talk | contribs)
Jump to: navigation, search

darbocroc

Contents

A little background

Every box needs a set of device nodes in order to work. Currently there are 2 ways of creating these nodes: statically or dynamically.

Static device nodes

/dev content is permanent, on a real permanent filesystem (like ext3, XFS, reiser...). All the needed nodes are present, or are created with a mknod command. You can also create nodes with the makedev utility.

Dynamic device nodes

Nodes are created from hotplug events, e.g., on the fly. Here, depending on your kernel, you have 2 choices:

devfs

devfs' device nodes are created in kernel space, on a virtual fs. It is therefore part of the kernel tree source.

udev

udev's device nodes are created in userspace, and by a userland application, thus outside the kernel tree. udev can lie on any filesystem, permanent or not, but due to its nature, is normally on a virtual filesystem, like ramfs -this is Lunar's case.

Altough devfs is still currently in 2.6 it "will be removed real soon" (TM). So basically we can think of 2 defaults: for 2.4, devfs is mainly used; on 2.6, udev will be mainly used. A smaller portion of users still have static (on real fs) nodes.

What commandline options can be used

To tell Lunar what type of device nodes I want to use there is a commandline switch that is dev=, that can take 4 values:

  • dev=static
  • dev=devfs
  • dev=udev
  • no commandline whatsoever

The options are quite self explaining. A good thing to take in mind is that they behave differently depending on your kernel.

2.4 kernels

valid dev= values are:

  • dev=devfs
  • dev=static

If dev=udev was passed to a 2.4 kernel on boot, a warning message will be displayed, and it will fallback to normal 2.4 behaviour: if no dev= commandline has been supplied, or its value is not correct, it shall fall through:

  • Test for dev=devfs, and if devfs' binary is there, try to boot with it.
  • If there's no devfs installed, boot as if a static dev was present.

2.6 kernels

valid dev= values are:

  • dev=udev
  • dev=devfs
  • dev=static

And are tested in exactly this order if no valid dev= is supplied or no commandline is supplied whatsoever.


Adding the params: bootloaders

lilo

To add a commandline param in lilo, you have to use the append label. Taking dev=udev as an example:

  image=/boot/vmlinuz
  label=awesomekernel
  root=/dev/hda2
  append="dev=udev video=radeonfb:1152x864-16@60"

If you have prompt set in your lilo.conf, you can even write the option just before the kernel you want loads.

grub

To add a commandline param in grub, all you have to do it put it behind the kernel placement, on the kernel label's line:

  title awesomekernel
  root (hd0,1)
  kernel /boot/vmlinuz root=/dev/hda1 dev=udev video=radeonfb:1152x864-16@60

Don't forget that in grub you can edit the kernel label line on boot, just like lilo.

Copyleft Jaime Buffery, 2004-2005 nestu AT lunar-linux DOT org

Personal tools
Namespaces
Variants
Actions
Wiki Navigation
Project Sites
Toolbox