PDA

View Full Version : DMA access for drive - HD Install



Stephen
05-15-2003, 06:12 PM
If DMA access to your disk was not enabled during install then you can edit the file /etc/init.d/bootmisc.sh and remove the # from the line for your drive near the bottom of the file. ie:


# /sbin/hdparm -qd1 /dev/hda


To have DMA enabled upon re-boot. If you wish to enable DMA before re-booting then use the command /sbin/hdparm -d1 /dev/hd? other usefull hdparm options:

/sbin/hdparm /dev/hd? - Tells you the settings currently in use.
/sbin/hdparm -i /dev/hd? - Gives you information on your drive.
/sbin/hdparm -Tt /dev/hd? - Tests the speed of your drive.

Replace the ? with your drive and all this as root in a console window.

TheCyberDude
06-23-2003, 05:38 PM
/etc/init.d/bootmisc.sh

# enable DMA
# /sbin/hdparm -qd1 /dev/hdg <--- Comment out this line!

# Added by
# This sets 32 bit I/O and DMA for Hard Drive.
# sudo hdparm -i /dev/hdg

hdparm -X69 -d1 -u1 -m16 -c3 /dev/hdg

# Added by
# This sets 32 bit I/O and DMA for CD-ROM Drive.
# sudo hdparm -i /dev/hda

hdparm -X34 -d1 -u1 -c3 /dev/hda

# Added by
# This sets 32 bit I/O and DMA for DVD-ROM Drive.
# sudo hdparm -i /dev/hdc

hdparm -X66 -d1 -u1 -c3 /dev/hdc

NOTE:

Use your /dev/ [Identifiers] Can be found in /etc/fstab !
If your Windows HDD said /dev/hdg1 - use only hdg .

X34 = (Multi-word DMA) 16.6 MB Sec.
X66 = ATA33
X68 = ATA66
X69 = ATA100
X100 = ATA133? Not sure about this one (Try it)

TheCyberDude
09-03-2003, 02:45 PM
UPDATE

hdparm -X69 -d1 -u1 -m16 -c3 /dev/hdg

-c3 = 32Bit-Sync

-c1 = 32Bit

-W0 = Disable the IDE drive's write-caching feature (usually OFF by default)

-W1 = Enable the IDE drive's write-caching feature (usually OFF by default)

Use -W0 or -W1 for HDD Only.

EAMPLE: hdparm -X69 -W0 -d1 -u1 -m16 -c1 /dev/hdg

A. Jorge Garcia
12-18-2003, 01:43 AM
I just knoppix-installer as debian an old Gateway PC with a 10GB hdd.

When it boots its very slow and there is a message about "warning, dma is turned off!" But when I check /etc/init.d/bootmisc.sh, the hdparm -qd1 /dev/hda line is not commented out.

Now that I'm booted-up it doesn't seem slow, but boot-up is. hdparm /dev/hda returns using_dma=1(on) - is this odd?

TIA,

Stephen
12-18-2003, 04:06 AM
I just knoppix-installer as debian an old Gateway PC with a 10GB hdd.

When it boots its very slow and there is a message about "warning, dma is turned off!" But when I check /etc/init.d/bootmisc.sh, the hdparm -qd1 /dev/hda line is not commented out.

Now that I'm booted-up it doesn't seem slow, but boot-up is. hdparm /dev/hda returns using_dma=1(on) - is this odd?

TIA,

That is perfectly normal the bootmisc.sh script is one of the last scripts run on boot. I did some checking on my system and there is a /etc/init.d/hdparm which calls the file /etc/default/hdparm there is an example for a /dev/hda at the bottom of the file commented out I commented out my lines in the bootmisc.sh. Then uncommented in the /etc/default/hdparm rebooted and it worked and entered my second drive into standby just like I had in the bootmisc.sh so you may want to give this file a try and see if it helps. What I changed for your reference:


## Uncommented by me for dma on hda
/dev/hda {
# mult_sect_io = 16
# write_cache = off
dma = on
}

## Added by me for my settings on hdb
/dev/hdb {
spindown_time = 12
dma = on
}


Edit: Another damn typo.
Edit2: The file for the settings (/etc/default/hdparm) has changed in the newer versions of hdparm to /etc/hdparm.conf.

horo
12-19-2003, 12:20 PM
Hi Jorge,

did you enable DMA in your BIOS settings?

Ciao Martin