how to set the linux disk i/o elevator (scheduler)

the scheduler is set in /sys/block/<disk>/queue/scheduler. available schedulers can be found by looking at the contents of the file, i.e.:

cat /sys/block/sda/queue/scheduler

to set in the running kernel, update the contents of the file with the desired scheduler. for disk sda, for example, do:

echo noop > /sys/block/sda/queue/scheduler

to make the change permanent, add elevator=noop to the kernel line in the boot configuration:

/boot/grub/grub.conf:

title slack
        root (hd0,1)
        kernel /vmlinuz elevator=noop ro root=/dev/sda1
        initrd /initrd

/etc/lilo.conf:

boot = /dev/sda
image = /boot/vmlinuz
  label = Linux
  root = /dev/sda1
  append = elevator=noop
  read-only