How to enable DMA at boot-up time
Hi,
I installed hdparm in an attempt to set up DMA support. I manually enabled it on my hard drive, cdrom, and cdwriter without problems. But the way I have it now, I have to do it every time I shutdown/restart my system. Is there any way to enable DMA support at boot time automatically? Thanks in advance |
you can write a simple script like:
#!/bin/bash hdparm -d /dev/hdX and copy it to your init.d folder (as root), don't forget to make it executeable, and make a link in your rc3.d and/or rc5.d folder ln -s /etc/init.d/[your_hdparm_script] /etc/rc5.d/SXXhdparm |
Quis
Thanks for your quick response. But please keep in mind that I am a newbie. I do understand (kind off) what you said about making an executable script to run hdparm, but you totally lost me with the rc3.d and rc5.d thing. Could you please elaborate about those directories you mentioned?? PS. The symbolic link thing I do understand, so don't bother explaining that part. Thanks a lot |
the rcX.d folders include symlinks to the init.d folder.
each X representate a runlevel (most interesting runlevels are 1(single-user, no-networking, ..), 3(networking, text-based) and 5(X-server); 0 for halt and 6 for reboot (or vise versa, i am not sure). the rcX.d-(runlevel)-folders are located in /etc/init.d, or maybe /etc. this links have formats like SXX[name] and KXX[name]; S = start, K=kill; the XX-number are for the execution-succession of the processes. init.d contains all system-related deamons. they will be executed by the symlinks in the rcX.d-folders you can create this script with an editor, then store it to [filename] after this you set it to executeable with: chmod -c 755 [filename] |
Sorry to interrupt, Quis, but its much simplier to do
Code:
apt-get install hwtools |
Thanks guys
|
Quote:
Code:
hwtools - Collection of tools for low-level hardware management |
If you install hdparm via apt-get and check WHICH files that package includes via
dpkg -L hdparm You'll see there's a script IN /etc/init.d already. After I installed the package, my hd maintained the optimized settings with subsequent boots. HTH, (PS: this is on Unstable) |
Guys,
I followed your instructions about making a script to run hdparm at boot time, but still I havent been able to turn dma on automatically :-(. Here is what I did: 1. made a script called hdparm_init d4500:/mnt/cdrom# more /root/scripts/hdparm_init #!/bin/bash /sbin/hdparm -d1 -m16 -c3 -u1 /dev/hda /sbin/hdparm -d1 -c3 /dev/hdc /sbin/hdparm -d1 -c3 /dev/hdd 2. made it executable -rwxr-xr-x 1 root root 115 Nov 22 02:39 /root/scripts/hdparm_init 3. copied it to /etc/init.d/ d4500:/etc/init.d# ls -l hdparm_init -rwxr-xr-x 1 root root 134 Nov 22 02:50 hdparm_init 4. made links to both rc3 and rc5 directories: d4500:/etc/rc3.d# ls -l S15hdparm lrwxrwxrwx 1 root root 23 Nov 22 01:54 S15hdparm -> /etc/init.d/hdparm_init d4500:/etc/rc5.d# ls -l S15hdparm lrwxrwxrwx 1 root root 23 Nov 22 01:57 S15hdparm -> /etc/init.d/hdparm_init When the system boots up, I run hdparm /dev/hda to verify if dma was enabled and I get: d4500:/mnt/cdrom# hdparm /dev/hda /dev/hda: multcount = 0 (off) I/O support = 0 (default 16-bit) unmaskirq = 0 (off) using_dma = 0 (off) keepsettings = 0 (off) nowerr = 0 (off) readonly = 0 (off) readahead = 8 (on) geometry = 9732/255/63, sectors = 156355584, start = 0 busstate = 1 (on) And if I run the script manually, it works fine, and this is what I get: d4500:/mnt/cdrom# /root/scripts/hdparm_init /dev/hda: setting 32-bit I/O support flag to 3 setting multcount to 16 setting unmaskirq to 1 (on) setting using_dma to 1 (on) multcount = 16 (on) I/O support = 3 (32-bit w/sync) unmaskirq = 1 (on) using_dma = 1 (on) /dev/hdc: setting 32-bit I/O support flag to 3 setting using_dma to 1 (on) I/O support = 3 (32-bit w/sync) using_dma = 1 (on) /dev/hdd: setting 32-bit I/O support flag to 3 setting using_dma to 1 (on) I/O support = 3 (32-bit w/sync) using_dma = 1 (on) so the script seems to be ok What am I doing wrong?????!!!!!!! |
Check /etc/inittab. You should be booting into Runlevel 2, which is the default. Link to there...
|
llamakc
That was right on the money. Thanks. Where can I get more information about what each init level does? Again thanks |
man init is a great place to start.
|
All times are GMT -5. The time now is 03:48 PM. |