Linux.com

Community Blogs



Slackware Linux Tip-of-the-day: The /etc/profile file

When working with your system(s) there is no such thing as a perfect solution out of the box, so manual configuration changes and inclusion of additional software (sometimes customer software) is needed. Sometimes when modifying the defualt configuration of a system you need to manually add of remove some deault values from your chosen shell, this is where the /etc/profile file comes into effect.

Read more... Comment (0)
 

Slackware Linux Tip-of-the-day: Hardware Information

Some people prefer using GUI tools for their needs, but when you want to figure out what hardware you are using the  CLI is the best tool, and I will prove it to you now.

The commands/programs of interest for hardware discovery are: 

 

  • dmidecode
  • lspci
  • lsusb
  • lsscsi
  • lsdev

 

These commands can give anything from simple output to highly details verbose output telling you hardware features, I/O ports and absolute block files used.

Read more... Comment (0)
 

Eeebuntu 4.0 Beta released, now based on Debian

 

eeebuntu 4.0 beta

The developers of Eeebuntu have released Eeebuntu 4.0 Beta...

read more

 

Wisconsin Ubuntu Hour

We are generating some interest around the great state of Wisconsin in having Wisconsin LoCo Members participate in Ubuntu Hours.  So far, we have interest in Duluth(MN)/Superior(WI) and some people from the Madison Linux User Group (Madlug).  What are Ubuntu Hours, you ask?

According to the Ubuntu Hour Wiki, it's a pretty simple event.

  • Head over to a public place (like a local coffee shop, etc) and use Ubuntu in a place that you will be visible to others.
    • Of course, check with management before you do this.
  • Perhaps have a sticker and/or make your desktop more easily visible that it's something different.
    • A stock theme is pretty distinguishable from Windows or OSX, which is probably the method I'll use.
    • Wobbly windows or the desktop cube can be eye-catching.
  • Maybe have a stock of Live CD's and some documentation about it if anyone were to ask what OS you're using.
  • Of course, follow the Ubuntu Code of Conduct while you're there.
  • Remember kids, stay safe offline - meet in a public place and take a friend.
  • Document!  Send an email to the mailing list, blog about it, etc.  We'd like to hear what's going on!
  • Be approachable (it's kinda the point)!

It's a pretty laid-back event with little expectations.  If nobody asks one week, maybe you'll talk to 4 people the next week.  It's a good time to get some coffee, catch up on some work, or just browse the internet.  I'll probably even take pictures of where I am each week.

Please, don't forget to document, tell us what you've been up to, when and where you are, etc.

 

Slackware Linux Tip-of-the-day: Compiling Firefox 3.6 on slackware64-current

On the recommendation of a member if the Slackware Linux User Group on Linux.com I will share the instructions for compiling firefox 3.6 on slackware64-current.

First I would like to give credit to manwichmakeameal, Pig_Pen and the other great users in the #slackware channel  at irc.freenode.net for giving me the instructions to share with everyone else.

 

  • First off download the contents of the firefox source directory from slackware64-current at ftp://slackware.mirrors.tds.net/pub/slackware/slackware64-current/source/xap/mozilla-firefox/, you do not need the file firefox-3.5.7-source.tar.bz2 because you will be using the new source.
  • Download the new source archive (http://mozilla.osuosl.org/pub/mozilla.org/firefox/releases/3.6/source/firefox-3.6.source.tar.bz2) into the directory that holds the downloaded content.
  • Open the slackbuild file (mozilla-firefox.SlackBuild) with your favorite text editor.
  • Change the Build Line (39) to include some designator that you built it, I changed mine to "BUILD=${BUILD:-1_MF}"
  • ChangeThe MOZVERS Line (41) to 1.9.2
  • Add a to the end line 130 to note that an additional configure argument is being added.
  • insert "--disable-libnotify" as line 131
  • Close the editor and save your changes
  • In a terminal type "su -" to log in as root with the user environment loaded.
  • Navigate in the terminal to the directory that contains the slackbuild file.
  • run "sh mozilla-firefox.SlackBuild" to begin the compile process.
  • Wait ~30 mintes, depending on the system, for the compile process to complete.
  • After it is done use the upgradepkg command to upgrade the package from the location that was specified at the end of the compile/build process.
Please remember that this is not an official package, I recommend replacing it with the official package once it is released.

 

 

Slackware Linux Tip-of-the-day: The Included Slackware Kernels

Currently in Slackware Linux you have the option to use difference kernels, the current kernels include the following options:

  • smp - SMP (Symmetric Multi Processing) allows a 32-bit operating systems to efficiently utilize multi-core processors under a 32-bit architecture.
  • non-smp - This is generally only useful if you have a single-core CPU or if you have encountered errors running an SMP kernel.
  • huge - These kernels have most file-system and generic drivers built in, but can slow down your boot time and utilize additional memory compared to the generic kernels.
  • generic - This kernel has the minimal amount of items built it, most kernel items are compiled as modules which mean that you will have to build a custom initrd image to boot your system, but the benefits are lower memory consumption and increased speed.
When installing the system generally by default you install a huge smp kernel to guarantee that your hardware work on the first boot. But after that point it is a good idea to move to the generic kernel to reduce resources used and refine the support that your system can perform. The steps to install a generic kernel and build the appropriate initrd file are located in any installed Slackware system at /boot/README.initrd, or you can read them at http://slackware.osuosl.org/slackware/README.initrd
And and with most things in Slackware additional information about this can be found in the README files on the root directory of the installation disk.

 

Slackware Linux Tip-Of-The-Day: Use The Guides

Slackware is full of documentation, including the man pages, info, pages, html docs, and the included guides. On the root directory of the installation disks you will find many README files that will walk you through numerous tasks including the Installation, Encryption, LVM support, INITRD and raid support. Additionally if you look in the usb-and-pxe-installers directory you will find guides to setting up usb and pxe installations.

You can also review the websites for rworkman (http://rlworkman.net/pkgs/) and alienbob (http://connie.slackware.com/~alien/) for additional guides. These will make your configurations and personalization much simpler. As a note many of these guides can also be useful for replicating the steps on other distros to obtain the same functionality.

Please feel free to share additional guides that you have located within the group, for information is power and we all lust for power.

 

 

Slackware Linux Tip-of-the-day: Slackware Package Search

I found http://slackfind.net, this site indexes multiple package mirrors and allows you to search for pre-built Slackware packages from multiple sites at once.  

As with nearly all packages, the slackbuild scripts are located in the /usr/doc/{app}/ directories of the files, you can access them after you extract the contents using explodepkg and potentially use.them to rebuild or customize the packages. 

 

Slackware Linux Tip-of-the-day: Power savings/CPU frequency scaling

Some Linux laptop users may have noticed that the battery life under Linux outperforms the performance under windows or Mac. The reason for this is the cpu frequency scaling modules and utilities, some distros enable this by default while others like Slackware leave the choice to the user. 

What this function does is throttle the power used by your processor which slows down the system when little performance is needed and increases the power when full performance is needed. There are multiple settings depending on your needs but for most production servers and laptops setting up the automatic throttling is a good practice because it will save you battery life and power consumption.

Recently when looking in the /etc/rc.d/rc.modules file in Slackware  13.0, I noticed that Pat has slipped an auto-configure script in for frequency scaling, the extract which starts on line 814 is shown below: 

### CPU frequency scaling support
#
# Below, set CPUFREQ to enable CPU frequency scaling to save system power.
#
# To always try to use CPU frequency scaling, set to:  on
# To never use CPU frequency scaling, set to:  off
# To use it only when the battery module is loaded (this will cause it to
# be used by default with most laptops), set to:  battery
#
CPUFREQ=battery

# If CPUFREQ=battery and the battery module is loaded, turn on CPUfreq.
if [ "$CPUFREQ" = "battery" ]; then
  if /sbin/lsmod | grep -wq battery ; then
    # CPUFREQ=battery and a battery was detected, so change CPUFREQ
    # to 'on' so that the block of script below will try to enable it.
    CPUFREQ=on
  fi
fi

### Enable CPU frequency scaling if requested:
if [ "$CPUFREQ" = "on" ]; then
  ### CPU frequency scaling modules for the Linux kernel CPUfreq subsystem.
  #
  # Clock scaling allows you to change the clock speed of the CPUs on the fly.
  # This is a nice method to save battery power, because the lower the clock
  # speed is, the less power the CPU consumes.
  # 
  # It should not hurt anything to try to load these modules.
  #
  # generic ACPI P-States based driver:
  /sbin/modprobe acpi-cpufreq 2>/dev/null
  # AMD mobile K6-2/3+ PowerNow!:
  /sbin/modprobe powernow-k6 2>/dev/null
  # AMD mobile Athlon PowerNow!:
  /sbin/modprobe powernow-k7 2>/dev/null
  # AMD Cool&Quiet PowerNow!:
  /sbin/modprobe powernow-k8 2>/dev/null
  # Intel SpeedStep using the SMI BIOS interface:
  /sbin/modprobe speedstep-smi 2>/dev/null
  # Intel SpeedStep on ICH-based chipsets:
  /sbin/modprobe speedstep-ich 2>/dev/null
  # Intel Enhanced SpeedStep :
  /sbin/modprobe speedstep-centrino 2>/dev/null
  # Intel Pentium4/Xeon clock modulation is not enabled by default.
  # The kernel documentation says "This adds the CPUFreq driver for Intel
  # Pentium 4 / XEON processors.  When enabled it will lower CPU temperature
  # by skipping clocks.  This driver should be only used in exceptional
  # circumstances when very low power is needed because it causes severe
  # slowdowns and noticeable latencies.  Normally Speedstep should be used
  # instead."
  # If you still want to try the Pentium4/Xeon module, uncomment the next line:
  #/sbin/modprobe p4-clockmod 2>/dev/null
  # NatSemi Geode GX / Cyrix MediaGXm:
  /sbin/modprobe gx-suspmod  2>/dev/null
  # Transmeta Crusoe / Efficeon LongRun:
  /sbin/modprobe longrun  2>/dev/null
  # VIA Cyrix Longhaul:
  /sbin/modprobe longhaul  2>/dev/null
  # nForce2 FSB changing cpufreq driver:
  /sbin/modprobe cpufreq-nforce2 2>/dev/null
  # Enhanced PowerSaver driver for VIA C7 CPUs:
  /sbin/modprobe e_powersaver 2>/dev/null

  ### CPU frequency scaling policies:
  #
  # Use the CPUFreq governor 'powersave' as default.  This sets the
  # frequency statically to the lowest frequency supported by the CPU.
  #/sbin/modprobe cpufreq_powersave
  #
  # Use the CPUFreq governor 'performance' as default. This sets the
  # frequency statically to the highest frequency supported by the CPU.
  #/sbin/modprobe cpufreq_performance
  #
  # Use the CPUFreq governor 'conservative' as default.  This allows you
  # to get a full dynamic frequency capable system by simply loading your
  # cpufreq low-level hardware driver.  Be aware that not all cpufreq
  # drivers support the 'conservative' governor -- the fallback governor
  # will be the 'performance' governor.
  #/sbin/modprobe cpufreq_conservative
  #
  # Use the CPUFreq governor 'ondemand' as default.  This allows you to
  # get a full dynamic frequency capable system by simply loading your
  # cpufreq low-level hardware driver.  Be aware that not all cpufreq
  # drivers support the 'ondemand' governor -- the fallback governor will
  # be the performance governor.  This seems to be the most-recommended
  # scaling policy, so rc.modules will try to load this by default.
  /sbin/modprobe cpufreq_ondemand

  ### CPU scaling governor:
  #
  # Set the default scaling_governor to be used (such as userspace or ondemand)
  # if there is a CPUFreq scaling policy module loaded that supports it:
  SCALING_GOVERNOR=ondemand
  #
  # Try to enable the scaling_governor selected above:
  if [ -r /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors ]; then
    if grep -wq "$SCALING_GOVERNOR" /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors ; then
      if [ -r /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ]; then
        for SYSCPUFILE in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor ; do
          echo "$SCALING_GOVERNOR" > $SYSCPUFILE
        done
      fi
    fi
  fi

fi # End enabling CPU scaling support


Your first option is to choose if you want to enable the frequency scaling,  on line 823 you can choose on, off or battery. on and off are self explanatory, but battery is quiet cool, if you choose battery the script will autocheck if you are running on a battery and if it is true then it will turn the support on.

The next step is to choose the module for your processor type, Pat's script tried all available modules which will not hurt anything but will start your module if it is available. Once you have determined which module you use you can comment out the unused ones.

The next option is to choose  the policy/governor, explanations are listed above so I won't give redundant data, but the simplest approach is to comment out the ones you don't want to use and replace them with the governor you want to use.  For most environments ondemand is the best policy because it quickly recovers back to full performance when needed, however that governor used more power by making a quick jump so for laptops using the conservative policy will slow you down a bit but help to increase the life of your battery.

Now that you have all of the options chosen you only need to build and install the cpufrequtil package from Slackbuilds.org (http://slackbuilds.org/repository/13.0/libraries/cpufrequtils/), once that has been installed and the above listed options have been configured all you need to to is rerun the rc.module script or restart the computer. After the reboot you will notice a difference in your power usage and the heat generated by the processor.To confirm the scailing is enabled and running you you call the program cpufreq-info which will disply a similar output to what is shown below and tell you what is running and what frequency your system is running under at that point in time. 

cpufrequtils 005: cpufreq-info (C) Dominik Brodowski 2004-2006
Report errors and bugs to This e-mail address is being protected from spambots. You need JavaScript enabled to view it , please.
analyzing CPU 0:
  driver: powernow-k8
  CPUs which need to switch frequency at the same time: 0 1
  hardware limits: 1000 MHz - 2.40 GHz
  available frequency steps: 2.40 GHz, 2.20 GHz, 2.00 GHz, 1.80 GHz, 1000 MHz
  available cpufreq governors: ondemand, userspace
  current policy: frequency should be within 1000 MHz and 2.40 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 1000 MHz (asserted by call to hardware).
analyzing CPU 1:
  driver: powernow-k8
  CPUs which need to switch frequency at the same time: 0 1
  hardware limits: 1000 MHz - 2.40 GHz
  available frequency steps: 2.40 GHz, 2.20 GHz, 2.00 GHz, 1.80 GHz, 1000 MHz
  available cpufreq governors: ondemand, userspace
  current policy: frequency should be within 1000 MHz and 2.40 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 1000 MHz (asserted by call to hardware).

I hope this helps, and I will follow up with more hidden features that I find in the latest release.  

 

Slackware Linux Tip-of-the-day: Use your documentation

One great benefit of using Slackware is that documentation is provided by default for nearly every command and application that is installed on your system. If you run into an issue try looking in the following locations for assistance: 

  • The application manual pages (example.. man bash, in konqueror you can go to man:bash for a html presentation of the manual)
  • The application info pages (example.. info bash)
  • Your /usr/docs/ directory – this usually contains text and html based manuals to help you find your answers.   

If you still cannot find a resolution in those locations you can try the following communities/sites:  

 

Smaller update sizes in Fedora 12

After spending the past hour installing and getting my new Fedora 12 box set up "just right" I noticed that I had around 400MB of updates to install.

With my internet quota almost gone, I was going to put off installing the updates until later that night when I get free data, but decided I should just bite the bullet and go for it anyway. (Australian ISPs have crazy download quotas, if you're not already aware).

I was suprised to see that the package sizes where considerably smaller than they have been in previous releases.  Curious, I decided to do some reasearch and found that they now use a different compression type and that deltarpm is enabled by default.   Nice work Fedora!

More info at: http://fedoraproject.org/wiki/Fedora_12_Alpha_release_notes#Smaller_Packages

 
Page 12 of 18

Upcoming Linux Foundation Courses

  1. LFD312 Developing Applications For Linux
    05 Jan » 09 Jan - Virtual
    Details
  2. LFS220 Linux System Administration
    05 Jan » 08 Jan - Virtual
    Details
  3. LFD331 Developing Linux Device Drivers
    12 Jan » 16 Jan - Virtual
    Details

View All Upcoming Courses


Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board