Linux Distro Review
A quick, easy to read review of a number of Linux popular distributions.
http://www.osnews.com/story/22305/Linux_Distros_that_Don_t_Suck
A quick, easy to read review of a number of Linux popular distributions.
http://www.osnews.com/story/22305/Linux_Distros_that_Don_t_Suck
Posted by
Paul Cooley
at
9:03:00 PM
0
comments
My configuration
HOST: Windows XP
Guest: Linux Gentoo 2006.1
VMWARE Version: VMWare Server 1.0.2 build-39867
X Windows: 7.2
Desktop Environment: KDE 3.5
I wished to fill my 1600X1400 monitor with my Gentoo VMWare image while in 'Quick switch' mode. However, the Fit Guest Now was grayed out. The reason? I needed to have vmware-user running (location for me: /usr/lib/vmware-tools/bin32/vmware-user). This is a tool in the VMWare tools. For VMWare tools installation see Install Gentoo on VMWare - VMWare Tools Section.
As soon as I launched the vmware-user, the Fit Guest Now menu becomes un-grayed and works beautifully. Enjoy your new found desktop real estate.
I've yet to have the autofit guest work, but I am happy enough that the fit guest now works. Another day for the autofitting.
Keywords: fit guest now grayed out, gentoo, vmware, linux, VMWare server, vmware-user, maximizing desktop for Gentoo Guest in VMWare, autofit guest.
Posted by
Paul Cooley
at
9:54:00 AM
1 comments
Labels: fit guest now grayed out, gentoo, linux, vmware, vmware server, vmware-user
All UPS units tend to have an alarm (also known as the beeper) that sounds when the power is removed from the unit. This alarm maybe valuable to some people, but I would say for my computer room closet it would be more annoying in the middle of the night than necessary. I'll deal with a power outage when I wake up.
I am running NUT on Gentoo Linux to manage my Tripp Lite OMNI1000LCD UPS (USB) and to turn off the alarm one simply needs to run the following command, remember the username is what you defined in /etc/nut/upsd.users:
#upsrw -s ups.beeper.status=disabled -u nutusername
-p nutpassword theUPS@localhost:3493
immediately following that the command
upsc verified the change was live:
# upsc theUPS@localhost
battery.charge: 53
battery.type: PbAc
battery.voltage: 12.3
battery.voltage.nominal: 12.0
driver.name: newhidups
driver.parameter.port: auto
driver.version: 2.1.0
driver.version.data: TrippLite HID 0.1
(experimental)
driver.version.internal: 0.30
input.frequency: 59.8
input.voltage: 116.7
input.voltage.nominal: 120
output.frequency.nominal: 60
output.voltage.nominal: 120
ups.beeper.status: disabled
ups.delay.reboot: 65535
ups.delay.shutdown: 65535
ups.mfr: Tripp Lite
ups.model: TRIPP LITE UPS
ups.power.nominal: 1000
ups.serial: 692195 B
ups.status: OL CHRG
Posted by
Paul Cooley
at
3:12:00 PM
3
comments
Labels: alarm off, beeper off, disable alarm, disable beeper, gentoo, howto, linux, NUT, Tripp Lite OMNI1000LCD UPS USB., UPS
To solve the always on storage, network attached storage [NAS], problem I choose to purchase the D-Link DSM-G600 device; in part because my tendency to stick with a the same hardware vendor. I may be naive and my demonstration is I believe that companies do more testing with their own hardware components than other hardware. The other part of the choice is that is a Gigabit NAS with a drive enclosure and with potential to plug in our external USB drives. The other, other part is that it is running Linux underneath.
I have the DSM-G600 revB and to demonstrate this last statement of it running a copy of embedded Linux, the following is the output of uname.
# uname -a
Linux NAS 2.4.21-pre4 #480 ¤ 4¤ë 28 11:21:43 CST 2006 ppc unknown
And it looks like the below image
First step is to understand 'fun_plug'. This is a script that is called after after the DSM-G600 boots, but the user has full control over it. It resides on the drive that you've put into the enclosure. For the full background: How to fun_plug . This concept is a big seller to me, it allows customization to your heart's content.
Starting to fun_plug
(reference: Wiki Page Howto fun_plug )
There are several way to get the fun plug script on the device. I would recommend connecting via Samba from a Linux host. Most importantly you'll save yourself the hassle of Unix vs. Windows linefeeds.
(1) You'll want your DSM-G600 booted (and a drive in the enclosure).
(2) From your linux host:
mount -t smbfs -o username=admin //
(3) Enter your password (the same as the web interface admin password).
(4) Execute:
touch /mnt/somedir/fun_plug
chmod 777 /mnt/somedir/fun_plug
(5) Customize fun_plug (open fun_plug up and do some customization) - See below
(6) Execute: umount /mnt/nas
Customization of fun_plug
There many customizations and the the limit only in your imagination . Several that seem worthy to mention are starting a telnet daemon, starting an itunes server, chrooting to a Gentoo distribution.
# nfs server(4) Reboot the DSM-G600.
# Vars. Change these according to your setup
NFSROOT=/mnt/HD_a2/nas_packages/nfs
# Set up needed directories and files
if [ ! -d $NFSROOT/var/lib/nfs ]
then
mkdir -p $NFSROOT/var/lib/nfs
fi
if [ ! -d $NFSROOT/etc ]
then
mkdir -p $NFSROOT/etc
fi
if [ ! -f $NFSROOT/etc/exports ]
then
cat > $NFSROOT/etc/exports <<"EOF"
/mnt/HD_a2 192.168.0.0/24(rw)
EOF
fi
if [ ! -f $NFSROOT/etc/hosts.allow ]
then
cat > $NFSROOT/etc/hosts.allow <<"EOF"
lockd: 192.168.0.*
rquotad: 192.168.0.*
mountd: 192.168.0.*
statd: 192.168.0.*
EOF
cat > $NFSROOT/etc/hosts.deny <<"EOF"
lockd:ALL
mountd:ALL
rquotad:ALL
statd:ALL
EOF
fi
if [ ! -d /usr/sbin ]
then
mkdir -p /usr/sbin
fi
# Make symlinks
ln -s $NFSROOT/etc/exports /etc/
ln -s $NFSROOT/var/lib /var/
ln -s $NFSROOT/etc/hosts.* /etc/
ln -s $NFSROOT/sbin/* /usr/sbin/
# start the server
/sbin/insmod $NFSROOT/modules/nfsd.o
/usr/sbin/portmap
sleep 1
/usr/sbin/rpc.mountd
sleep 1
/usr/sbin/rpc.nfsd
sleep 1
/usr/sbin/rpc.statd
# re-export...
$NFSROOT/sbin/exportfs -ra
Posted by
Paul Cooley
at
9:18:00 AM
6
comments
Labels: configuring, D-Link DSM-G600, dlink DSM-G600, fun_plug, gentoo, linux, NAS
The below documents my configuration of a Tripp Lite OMNI1000LCD USB UPS to communicate with Gentoo Linux (2.6.17-gentoo-r8 kernel) in my home network using NUT (Network UPS Tools). Note this is much easier in Dec 2007 - see new howto here
Plugged into the UPS :
(1) Linux Server (Older machine with AMD XP processor)
(2) D-Link DI-724GU Router
(3) Comcast Cable modem (Motorola SB5120)
(4) Vontage Phone Adapter (Motorola VT1005V)
(5) Oregon Scientific WMR-968 Weather Station
The average draw of those components is around 125 Watts (you have a Kill-A-Watt device don't you? Kill-A-Watt link). During my two simulated power outages it appeared that this UPS would power those components for ~30 minutes.
This UPS was purchased at Costco, so with that ease of distribution I suspect there might be more of you out there that may want to do this, so I'll write down my steps of configuration for Linux/Gentoo. Truth be told, maybe the key feature of the UPS verses others? The pretty Blue LCD display panel; even my wife attests to it aesthetic value.
Configuration took the better part of a day because, I didn't realize/admit the 2.0.4 version of NUT didn't support my Tripp Lite USB UPS. Once I use the development tree of NUT it was much easier. I hope to save you that time.
1. Ensure your kernel has hid support compiled into it
- in 'make menuconfig' select the '/dev/hiddev raw HID device support'
Device Drivers --->
USB support --->
<*> Support for Host-side USB
[*] HID input layer support
[ ] Force feedback support (EXPERIMENTAL)
[*] /dev/hiddev raw HID device support
2. emerge 'sys-power/nut'
Guess what? This, as of January 1, 2007, does not have the support in it for the Tripp Lite USB models (nut 2.0.4-r1 in portage). Following this, you will have to fetch the development trunk from the fine people on the NUT development team and create a Portage overlay. From this trunk, it runs great. I spent significant time starting the newhidups driver with the response No matching USB/HID UPS found and it appears 20 googles. It just doesn't work ;)
Note: Everything I know about Portage overlays I learned while watching a 'Cold Case' episode, so it isn't too hard. Kudos to portage.
3. Get the development trunk from Subversion. Don't have subversion in Gentoo? Me neither, but a simple 'emerge subversion', got me a running version.
mkdir ~/src/nut
cd ~/src/nut
svn co svn://svn.debian.org/nut/trunk
This will get the latest source for nut in a directory called trunk in your home directory ~/src/nut
4. Create a Portage Overlay for the development trunk source.
We will want to do this so that portage knows what we are up-to. Admittedly you can go straight for the compilation of the nut source and figure out all the configuration necessary to get it to run in Gentoo, but it was already all figured out for sys-power/nut-2.0.4.r1 so lets use that.
References:
HOWTO Create an Updated Ebuild
HOWTO Install 3rd Party Ebuilds (slightly less relevant in our case.)
a. Package the source:
in dir ~/src/nut
cp -r trunk nut-2.1.0
note: we are making up a nut version that follows the portage convention.
tar -cf nut-2.1.0.tar nut-2.1.0
gzip nut-2.1.0.tar
b. copy the source into the portage distribution tree
cp nut-2.1.0.tar.gz /usr/portage/distfiles/
c. Create an overlay directory and add it to your make.conf (I am presuming you have root like powers aren't I? Keep this in mind)
mkdir -p /usr/local/portage && echo 'PORTDIR_OVERLAY="/usr/local/portage"' >> /etc/make.conf
d. copy the existing ebuild for nut into your new Portage Overlay directory
make the dir: mkdir -p /usr/local/portage/sys-power/nut
copy it: cp -r /usr/portage/sys-power/nut /usr/local/portage/sys-power/nut
e. create the new ebuild file (copying from the latest ebuild).
cd /usr/local/portage/sys-power/nut
cp nut-2.0.4-r1.ebuild nut-2.1.0.ebuild
note: remember to name this the same as tar file above.
f. remove the ebuilds you don't need (I like clean)
for me it was: rm nut-2.0*
g. edit the ebuild. I removed a patch that probably isn't necessary in the development trunk.
nano -w /usr/local/portage/sys-power/nut/nut-2.1.0.ebuild
I removed line 46 that started with 'epatch'
5. Manually step thru the emerge steps with ebuild (slow and cautious). Ebuild is a lower level tool that emerge uses.
Note: I am only going to compile the driver I need, it isn't a default driver so I need to use the NUT_DRIVERS directive to ebuild system. Additionally when I didn't do this, one of the drivers in the development tree had a compile time error.
a. The digest:
NUT_DRIVERS="newhidups" ebuild /usr/local/portage/sys-power/nut/nut-2.1.0.ebuild digest
b. The unpacking (the unzips the tar file you created earlier):
NUT_DRIVERS="newhidups" ebuild /usr/local/portage/category/program/program-version.ebuild unpack
c. The compile
NUT_DRIVERS="newhidups" ebuild /usr/local/portage/category/program/program-version.ebuild compile
d. The installation
NUT_DRIVERS="newhidups" ebuild /usr/local/portage/category/program/program-version.ebuild install
Without the NUT_DRIVERS declaration I got:
/bin/sh ../libtool --tag=CC --mode=link i686-pc-linux-gnu-gcc -I../include -O2 -march=athlon-xp -pipe -Wall -Wsign-compare -o blazer blazer.o ../common/libcommon.a ../common/upsconf.o
../common/parseconf.o
../common/state.o main.o dstate.o serial.o
i686-pc-linux-gnu-gcc -I../include -O2 -march=athlon-xp -pipe -Wall -Wsign-compare -o blazer blazer.o ../common/upsconf.o ../common/parseconf.o
../common/state.o main.o dstate.o serial.o ../common/libcommon.a
if i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -O2 -march=athlon-xp -pipe -Wall -Wsign-compare -MT cpsups.o -MD -MP -MF ".deps/cpsups.Tpo" -c -o cpsups.o cpsups.c; \
then mv -f ".deps/cpsups.Tpo" ".deps/cpsups.Po"; else rm -f ".deps/cpsups.Tpo"; exit 1; fi
cpsups.c: In function 'clr_cps_serial':
cpsups.c:110: error: 'TIOCM_DTR' undeclared (first use in this function)
cpsups.c:110: error: (Each undeclared identifier is reported only once
cpsups.c :110: error: for each function it appears in.)
cpsups.c:112: warning: implicit declaration of function 'ioctl'
cpsups.c:112: error: 'TIOCMBIC' undeclared (first use in this function)
cpsups.c: In function 'set_cps_serial':
cpsups.c:117: error: 'TIOCM_DTR' undeclared (first use in this function)
cpsups.c:119: error: 'TIOCMBIS' undeclared (first use in this function)
6. Configure NUT
Now that we've made this build, you can follow the steps at the wiki:
Gentoo HOWTO NUT (Network UPS Tools)
You'll get to start after the Install Software section. Yes, you'll need the newhidups driver. I am pasting in the article with a couple of mods for my UPS posterity/consistency.
I added the bit about adding a MONITOR line to uspmon.conf. This is necessary for upsmon to work
Configuring
Go to /etc/nut . Open ups.conf. Add to this file every UPS you want to monitor. Mine looks like this:
# [powerware]
# driver = bcmxcp
# port = /dev/ttyS0
# desc = "Server, adsl, 3com"
Change the values to something that fit's your configuration better and save. If you have a USB connection to your UPS, your entry might look like
[OMNI1000]
driver = newhidups
port = auto
desc = "Tripp Lite OMNI1000LCD USB"
Open upsd.conf. This file contains access-policy to the UPS's you have.
To only allow the same computer to connect to them, the file should look like this:
ACL all 0.0.0.0/0
ACL localhost 127.0.0.1
ACCEPT localhost
REJECT all
The ACL-lines are used to add hosts. The syntax is ACL name IP. If the name is placed after ACCEPT connections from there are accepted, if it's placed under REJECT, connections are rejected. This sort of reminds me of a hosts.allow file?
Next open upsd.users. This file contains accounts for users who can make modifications. The following line grants access to the user server to everything. This isn't integrated with particular logins from my observation. So you can make-up a new user/pass and run with that. The only place one needs to remember this if you are setting properties through NUT on the UPS.
[server]
password = changeme
allowfrom = localhost
actions = SET
instcmds = ALL
upsmon master
Next take a look at upsmon.conf. This is the UPS Monitor configuration. A scan through this file is going to answer more questions than me writing about it. It is pretty simple, but the below three changes are all I needed to make.
Posted by
Paul Cooley
at
7:51:00 PM
9
comments
Labels: backup power, gentoo, linux, NUT, OMNI1000LCD, Tripp Lite, UPS, USB
On my routine of weekly updates to my gentoo installation I often encounter blocked packages in response to the command 'emerge --update --deep --ask world'
[blocks B ] mail-mta/ssmtp (is blocking mail-mta/postfix-2.2.2-r1)
This, until I became familiar with it, seemed confusing. My analysis, the order of this response is what tripped me up in combination with the temptation of speed reading. My interpretation was 'blocks mail-mta/ssmtp. Is blocking mail-mta/postfix-2.2.2-r1?' The parenthesis caused me to consider this as a separate thought. It is not and is my fault for confusing myself; And aside, I'd love for the parenthesis to be removed. That interpretive linguistics analysis aside on to the point.
Looking at the statement mail-mta/ssmtp is blocking mail-mta/postfix. The simple thing to do is to say, I don't need ssmtp let me remove it. The portage command:
emerge --unmerge 'mail-mta/smtp'
In summary it is the first item listed that is the 'blocking' package, that is what you want to remove.
Then try again with 'emerge --update --deep --ask world'
Of course the removal of something needed is a bad idea, so be careful.
An introduction to Portage: link
A simple portage Wiki page: Portage and Ebuilds
The man page: Portage Man page
The "best-known practices" for working with Portage: HOWTO_Use_Portage_Correctly
keywords: gentoo remove blocked package, portage remove blocked package, gentoo blocks, portage blocks.
Posted by
Paul Cooley
at
8:06:00 AM
15
comments
Labels: gentoo, linux, package block, portage, remove blocked packages
Not that this is very technical, but yesterday I found a good site for sharing and getting wallpaper/desktop backgrounds.
InterfaceLIFT's content is entirely vistor-submitted and is intended to be shared. They do a great job of search and provided a multitude of resolutions from 1024x768 to 2560X1600 as well as a number of other formats (ipod/sony psp).
My search for "Seattle" returned several of great photos of the city. Another search for "Vancouver" returned even more.
InterfaceLIFT: High-Resolution Wallpaper
The more sharing, the merrier and who can complain at the price of nothing?
And if you are looking for other art they have icons too. Have a new app that you want a cool icon for? I'd check these ones out.
Paul
Keywords: Wallpaper, Desktop background, images, free wallpaper, linux, windows, icons
Posted by
Paul Cooley
at
4:04:00 PM
0
comments
Labels: Desktop background, free background, free wallpaper, images, linux, Wallpaper, windows
Using one of those emerge commmands the other week to rebuild everything after a GCC 4.1.something upgrade, I overwrote a couple of key config files under /etc/... . Ouch, not wise. I made the rash assumption that it was a smart merge of the .config files. Don't do that, it is only as smart as the user :^). The only real loss was in the starting of a daemon for pulling data off of my weather station, but it took awhile to recollect the configuration.
A wiser way to go would be to goto my backups. Not having any didn't help -- it was on the to-do list. I found this to be a simple backup scheme for getting those all important configuration files and other data I might need.
Wikipage for Backupscripts and the cron jobs
I will now not repeat that mistake.
Keywords: Gentoo, Linux, cron job for backups, cron script for backups, simple script for linux backups.
Posted by
Paul Cooley
at
10:32:00 AM
3
comments
Labels: cron job for back-ups, gentoo, linux
Posted by
Paul Cooley
at
10:16:00 AM
0
comments
Labels: gentoo, howto, linux, portage, useful commands