sudo apt-get install

I have to say that I am liking Ubuntu more and more nowadays. I have been looking for a solution to an issue that I was having where the hard drive was developing some unusual clicking noises. I found out that I needed to set the advanced power management level to disabled using the "sudo hdparm -B 255 /dev/sda" command. That stopped the clicking (and reportedly extends the life of my hard drive), but I needed to get the command to run automatically as I want it to be as brainless as possible for me to set it.

Well, I came across a web page that instructed me to copy the command into a script file (99-hdd-spin-fix.sh) and copy that file into three different directories that will automatically run it upon suspend (/etc/acpi/suspend.d), start (/etc/acpi/sstart.d), and resume (/etc/acpi/resume.d). I tested it and it did not work initially but I forgot to make the script file executable (chmod 755 99-hdd-spin-fix.sh). After I did that all is well. I think.

I was rather concerned that I would not be able to run the script automatically due to the fact that I needed to run it as su rather than as the user I log in as (mark) and that required my admin password. Well, it turns out that the /etc directory is only writable by root (or su) so any scripts placed there have the su "stamp of approval" on them.

All that to say that I needed to install a package to look at the hard disk parameters to see if what I was doing was actually making a difference. Well, I typed in the command "smartctl -A /dev/sda" (which I was able to glean from a web page) to get the information and, wouldn't you know it, Ubuntu came back with a very helpful message stating that the command was not available, but I could type in the following command: "sudo apt-get install smartmontools" to install the package.

Error messages do not get any more user-friendly than that. And, sadly, this is exactly what I needed to enter the realm of Linux Geekdom.


Powered by ScribeFire.

Comments

Popular posts from this blog

I hate that part the most of all

The Edge Effect and the Divine Nature - Part 2

The Edge Effect and the Divine Nature - Part 1