Guest arise Posted January 19, 2003 Report Share Posted January 19, 2003 Hi, i am currently running the following command manually after each (re)boot, and i want to make it execute automatically: "hdparm -c3d1X66 /dev/hda" - Enables 32bit access, DMA and ATA66 speeds. I have an ATA100 drive (UDMA5), how can i make hdparm to use the max speed? Thanks :) Quote Link to comment Share on other sites More sharing options...
Cannonfodder Posted January 19, 2003 Report Share Posted January 19, 2003 Are you asking how to use hdparm or how to make it run automatically? Quote Link to comment Share on other sites More sharing options...
bvc Posted January 19, 2003 Report Share Posted January 19, 2003 from /etc/rc.d/rc.sysinit about 3/4 down # Turn on harddisk optimization# There is only one file /etc/sysconfig/harddisks for all disks # after installing the hdparm-RPM. If you need different hdparm parameters # for each of your disks, copy /etc/sysconfig/harddisks to # /etc/sysconfig/harddiskhda (hdb, hdc...) and modify it. # Each disk which has no special parameters will use the defaults. # Each non-disk which has no special parameters will be ignored. just put the command at the bottom of /etc/sysconfig/harddisk if you only have one hd. Quote Link to comment Share on other sites More sharing options...
Guest ndeb Posted January 19, 2003 Report Share Posted January 19, 2003 "hdparm -c3d1X66 /dev/hda" - Enables 32bit access, DMA and ATA66 speeds. I have an ATA100 drive (UDMA5), how can i make hdparm to use the max speed? Replace the 66 by 69 in ur hdparm command. Just as a note, the 66 in ur command does not stand for the speed value 66 MB/s, but for the value: 64+UDMA mode. ATA66 = UDMA mode 2 ATA100 = UDMA mode 5 Quote Link to comment Share on other sites More sharing options...
Guest arise Posted January 19, 2003 Report Share Posted January 19, 2003 yes i noticed too...i ran hdparm -X udma5 /dev/hda and executed "-X69". I will edit the rc.sysinit and see what happens :) ANother question....where could i find RPMs for apt-get? (mandrake 9) Quote Link to comment Share on other sites More sharing options...
BobGuy© Posted February 3, 2003 Report Share Posted February 3, 2003 just put the command at the bottom of /etc/sysconfig/harddisk if you only have one hd. Well I just happen to have more than one hd. Makes it easier to do backups. :D looking at that file it dosent look like it's going to be easy for a non programer. All I need to add is -u1 -c3 to whats already there. :x 1021 if [ -x /sbin/hdparm ]; then 1022 for device in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do 1023 unset MULTIPLE_IO USE_DMA EIDE_32BIT LOOKAHEAD EXTRA_PARAMS 1024 if [ -f /etc/sysconfig/harddisk${disk[$device]} ]; then 1025 . /etc/sysconfig/harddisk${disk[$device]} 1026 HDFLAGS[$device]= 1027 if [ -n "$MULTIPLE_IO" ]; then 1028 HDFLAGS[$device]="-q -m$MULTIPLE_IO" 1029 fi 1030 if [ -n "$USE_DMA" ]; then 1031 HDFLAGS[$device]="${HDFLAGS[$device]} -q -d$USE_DMA" 1032 fi 1033 if [ -n "$EIDE_32BIT" ]; then 1034 HDFLAGS[$device]="${HDFLAGS[$device]} -q -c$EIDE_32BIT" 1035 fi 1036 if [ -n "$LOOKAHEAD" ]; then 1037 HDFLAGS[$device]="${HDFLAGS[$device]} -q -A$LOOKAHEAD" 1038 fi 1039 if [ -n "$EXTRA_PARAMS" ]; then 1040 HDFLAGS[$device]="${HDFLAGS[$device]} $EXTRA_PARAMS" 1041 fi 1042 else 1043 HDFLAGS[$device]="${HDFLAGS[0]}" 1044 fi 1045 if [ -e "/proc/ide/${disk[$device]}/media" ]; then 1046 hdmedia=`cat /proc/ide/${disk[$device]}/media` 1047 if [ "$hdmedia" = "disk" -o -f "/etc/sysconfig/harddisk${disk[$device]}" ]; then 1048 if [ -n "${HDFLAGS[$device]}" ]; then 1049 action "Setting hard drive parameters for %s: " ${disk[$device]} /sbin/hdparm ${HDFLAGS[$device]} /dev/${disk[$device]} 1050 fi 1051 fi 1052 fi 1053 done 1054 fi Quote Link to comment Share on other sites More sharing options...
bvc Posted February 3, 2003 Report Share Posted February 3, 2003 Well I just happen to have more than one hd. Then look for a /etc/sysconfig/harddisk and rename it harddiskhda, then make another one called harddiskhdb. Put what's needed for hda in harddiskhda, and what's needed for hdb in harddiskhdb. Read the quote I made above from /etc/rc.d/rc.sysinit about 3/4 down. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.