CRUX : Home

Home :: Documentation :: Download :: Development :: Community :: Wiki :: Ports :: Bugs :: Links :: About

CRUX with udev support "from the start"

This document describes a set of steps used to install a fresh CRUX machine with udev support ready to go at the first live boot. Feel free to address questions to me via email (jaeger at morpheus dot net) or IRC (irc.freenode.net channel #crux).

Follow steps 1 through 7 of the "Installing from CD-ROM" section of the CRUX handbook. Mount the dev and proc filesystems as in step 8 but also load the module for your network card before executing the chroot command, like so:

  $ mount -t devfs devfs /mnt/dev    ('mount -o bind /dev /mnt/dev' if using the udev CD)
  $ mount -t proc proc /mnt/proc
  $ modprobe <module>    (ex. 3c59x) 
  $ chroot /mnt /bin/bash

This will allow the use of the network device within the chroot during setup. Follow the rest of the CRUX install steps in the handbook, keeping in mind that you'll need to do the kernel configuration a little differently. First of all, don't enable devfs when the handbook says to, just ignore it. Also, add hotplug device support:

  General setup  --->
	 [*] Support for hot-pluggable devices

  File systems  --->
	 Pseudo filesystems  --->
	    [ ] /dev file system support (OBSOLETE)

If you're not using menuconfig, these correspond to:

  CONFIG_HOTPLUG=y
  # CONFIG_DEVFS_FS is not set

After the kernel is compiled, finish the CRUX handbook's install instructions except for the reboot. Before rebooting, you'll need to make a few changes to get udev started. Examples of the following are in the full installation transcript at the bottom of this page.:

  1. Configure your network connection
  2. Use prt-get to download and install udev and its dependencies (this includes hotplug)
  3. Edit /etc/rc and /etc/rc.single to start udev instead of devfs. Make the following changes to both files:

Comment out or remove these lines:

 # Start device management daemon
 #/sbin/devfsd /dev

Add the following lines:

 # Start udev
 /bin/mount -t proc none /proc
 /bin/mount -t sysfs none /sys
 /sbin/start_udev

4. Exit the chroot, unmount filesystems, and reboot:

 $ dhcpcd -k eth0
 $ exit
 $ umount /mnt/{dev,proc,boot} /mnt
 $ reboot

If you want to allow users to access the sound and video devices (nvidia, dri, etc.), add an audio' group and a 'video' group to the system. CRUX's udev install sets the appropriate group permissions, so just add the user to the 'audio' and 'video' groups (and log out/back in).


Example transcript from a qemu crux install:

  <boot CRUX CD, login as root>
  fdisk /dev/hda
  mkswap /dev/hda1
  swapon /dev/hda1
  mkfs.xfs -f /dev/hda2
  mkfs.xfs -f /dev/hda3
  mount -t xfs /dev/hda3 /mnt
  mkdir /mnt/boot
  mount -t xfs /dev/hda2 /mnt/boot
  setup
  mount -t devfs devfs /mnt/dev
  mount -t proc proc /mnt/proc
  modprobe ne2k-pci
  chroot /mnt /bin/bash
  passwd
  vi /etc/fstab
  vi /etc/rc.conf
  vi /etc/rc.d/net (using dhcp, skipped editing resolv.conf and hosts)
  cd /usr/src/linux-2.6.11.7
  make menuconfig
  make all
  make modules_install
  cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.11.7
  cp System.map /boot/System.map-2.6.11.7
  vi /etc/lilo.conf
  lilo
  dhcpcd -N eth0
  ports -u
  prt-get depinst --install-scripts udev
  vi /etc/rc    (as above in the list)
  vi /etc/rc.single    (as above in the list)
  dhcpcd -k eth0
  exit
  umount /mnt/{boot,dev,proc} /mnt
  rmmod ne2k-pci
  reboot