Best place to run hdparm
I've been playing with hdparm, and, while it seems like Slackware defaults have done pretty well and there's very little difference I can make, I guess it wouldn't hurt to make those adjustments. Where is the best place to run hdparm with the new settings? I guess it's supposed to go after any fsck checks, but before going multi-user? I'm not familiar enough with the boot process to know how it all fits together, and was wondering if there's a recommended place to put the hdparm command.
|
You run the hdparm command in a terminal while
logged in as root. It's not part of the boot sequence. The default Slackware-10.2 kernel has DMA enabled, so you just need to set your drive for whatever you'd like to add. |
But running hdparm in a terminal doesn't persist across reboots, correct? The tutorial's I've been reading say you stick it in a startup script somewhere to make the settings stay.
|
/etc/rc.d/rc.local
This is the last script run at boot time. It is run by root. |
Does it not matter that you're multiuser by the time rc.local is run?
|
Why would it???
|
All the hdparm tutorials recommend changes being done in the safest environment possible (backed up beforehand and in single-user mode), to reduce the chance of data loss. It just seems best to have as little as possible going on with your system when making hard drive adjustments.
|
When you're testing settings, yes - do the testing in a safe environment. Once you decide which ones are safe to use, add them to the boot scripts. It doesn't matter which run level the system is in when they become active.
|
check out my /etc/rc.d/rc.local for hdparm:
Code:
# open harddisk and optical disk dma Code:
[zhyfly]@[zhy2fly][~](0)$dmesg|grep '^hd.:*' |
Sounds good, thanks for the clarification.
|
Quote:
# Set hard drive parameters echo "Setting hard drive parameters." # /usr/sbin/hdparm -qd1qm16qc3qu1qk1 /dev/hda # /usr/sbin/hdparm -qd1qm16qc3qu1 /dev/hda # -q = quiet # -d1 = enable dma # m16 = set sector count to 16 # c3 = enable (E)IDE 32-bit I/O support and set special sync sequence # u1 = set interrupt-unmask flag # k1 = keep d, m, & u settings during a soft reboot /usr/sbin/hdparm -qc3qu1 /dev/hda Be sure to manually test your hard drive before you add something similar. As root, from the command line: hdparm /dev/hda To test your drive: hdparm -tT /dev/hda Quote:
|
I personally run it in rc.S, as it gets done early and (placebo affect) speeds up the rest of the boot process. Like everyone else said, the location shouldn't matter.
|
All times are GMT -5. The time now is 08:12 AM. |