LFS hdparm
| Zeile 116: | Zeile 116: | ||
| [2] | | [2] | ||
| [http://www.ibiblio.org/pub/Linux/system/hardware/ Download Link] | | [http://www.ibiblio.org/pub/Linux/system/hardware/ Download Link] | ||
| − | |} | + | |}[[Kategorie:LFS]] |
Version vom 22. Oktober 2004, 16:00 Uhr
LFS: Installation von hdparm
hdparm erlaubt die Nutzung des DMA Modes von ATAPI-Festplatten und CD/DVD-Laufwerken sowie -brennern. Obwohl auch in den Kernel-Optionen die Option 'use DMA by default' existiert ist dieses Tool sehr nützlich. Hdparm kann bei älteren Kerneln in Zusammenhang mit ide-scsi Probleme bereiten.
cd $SOURCEDIR tar xvfz hdparm-x.y.tar.gz cd hdparm-x.y patch -Np1 -i ../hdparm-5.5-glibc_CVS-1.patch make make install
Nützliche Optionen von hdparm
-c Abfrage/on/off 32bit I/O
-d Abfrage/on/off DMA Mode
-v Anzeige Einstellungen Laufwerk
-X08 PIO-Mode 0
-X09 PIO-Mode 1
-X10 PIO-Mode 2
-X11 PIO-Mode 3
-X12 PIO-Mode 4
-X32 Multiword DMA mode 0
-X33 Multiword DMA mode 1
-X34 Multiword DMA mode 2
-X66 UDMA 33 =X(64+udma2)
-X67 UDMA 50 =X(64+udma3), selten benutzt
-X68 UDMA 66 =X(64+udma4)
-X69 UDMA 100 =X(64+udma5)
-X70 UDMA 133 =X(64+udma6)
Beispiel: Drive Settings für UDMA100 mit 32Bit Zugriff für device /dev/hda:
hdparm -d1 -c1 -X69 /dev/hda
hdparm kann wie üblich in die Startscripte /etc/rc.d/init.d/.. eingebunden werden. Hier ein Beispiel:
/etc/rc.d/init.d/set_dma
#!/bin/sh
# begin of /etc/rc.d/init.d/set_dma
# parses ide dma settigs from /etc/sysconfig/idedma.rc
#
source /etc/sysconfig/rc
source $rc_functions
test -e $IDEDMA_RC_CONFIG && source $IDEDMA_RC_CONFIG
case "$1" in
start)
echo "Schalte UDMA Modus ein:"
for dev in $IDEDMA_DEVICES; do
echo "drive: $dev";
set +o verbose
hdparm -d1 /dev/$dev >>/dev/null
done
evaluate_retval
;;
stop)
echo "Schalte UDMA Modus aus:"
for dev in $IDEDMA_DEVICES; do
echo "drive: $dev"
set +o verbose
hdparm -d0 /dev/$dev >>/dev/null
done
evaluate_retval
;;
status)
echo "DMA Modus: "
success=false
for dev in $IDEDMA_DEVICES; do
if [ -a /proc/ide/$dev/media ] ; then
if [ `cat /proc/ide/$dev/media` == "disk" ] ; then
echo `hdparm -d /dev/$dev 2>/dev/null`|grep .
fi
fi
if [ -a /proc/ide/$dev/media ] ; then
if [ `cat /proc/ide/$dev/media` == "cdrom" ] ; then
echo `hdparm -d /dev/$dev 2>/dev/null`|grep .
fi
fi
done
;;
*)
echo "Usage: $0 {start|stop|status]}"
exit 1
;;
esac
test "$return" = "$rc_done" || exit 1
exit 0
Für welche Drives DMA aktiviert werden soll bestimmt /etc/sysconfig/ide_dma.rc (Verweis in /etc/sysconfig/rc):
# begin of /etc/sysconfig/ide_dma.rc # # Configuration file for ide dma mode support: # which ide devices should support DMA? # IDEDMA_DEVICES="hda hdb hdc hdd"
Anschließend werden noch zwei Links gesetzt:
ln -sf /etc/rc.d/init.d/set_dma /etc/rc.d/rcsysinit.d/S41set_dma ln -sf /etc/rc.d/init.d/set_dma /etc/rc.d/rc0.d/K15set_dma
Links
| [1] | hdparm Patch |
| [2] | Download Link |