SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
Where is the best place to run hdparm with the new settings?
I run hdparm in /etc/rc.d/rc.local. Here is my snippet:
# 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:
Does it not matter that you're multiuser by the time rc.local is run?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.