I recently had the need to query a bunch of UPSes to gather their current statistics using openSUSE. The Network UPS Tools packages (NUT for short) are available for openSUSE and that’s all you need (assuming your UPS is one of the supported ones).
# zypper install nut
Next you need to edit /etc/ups/ups.conf and make an entry for your UPS driver and serial port.
driver = bcmxcp
port = /dev/ttyUSB0
desc = “Local UPS”
Next I started the UPS driver manually in debug mode so I could see what was going on. The nice thing about this driver is it will auto-discover the UPS serial port speed.
# /usr/lib/ups/driver/bcmxcp -a myups -D
In a separate terminal window, start upsd.
Now you should be able to query the UPS:
# upsc myups@localhost
Because I was just collecting statistics, I wasn’t interested in using upsd to automatically shutdown servers or anything fancy but that is possible.
The Gnome desktop in OpenSUSE 11.2 is beautiful (much nicer than the clunky KDE IMHO), but there are a few things that I don’t like about the default settings. I use 8 virtual desktops to keep my desktop organized but I like the taskbar to show all tasks. By default, the gnome panel’s task bar shows only the windows in the current workspace and for some reason you can’t just right-click the panel to change this setting.
Instead, it’s buried in the Gnome Configuration Editor which makes it really hard to find so here are the steps to fix this:
1) Computer -> More Applications
2) System -> Gnome Configuration Editor
The setting that needs to be changed is:
You can navigate down the tree or use the “Find” function.
That’s it! Have a lot of fun!
Update: see the first comment for an equally obscure but perhaps easier method.
Someone finally took pity on me and sent me an invite for SUSE Studio. My first impression – Wow!
SUSE Studio lets you build your own custom linux distribution using SUSE as the starting point. The process requires only a few mouse clicks and is so fast and simple any Geeko can do it
Step 1: choose a starting point for your build. Options range from bare-bones (Just Enough OS) OpenSUSE 11, to a full blown SUSE Enterprise Server.
Step 2: Add additional packages. Of course the full SUSE package list is available which includes everything you would normally find on the DVD. But, you can add any repository from the internet including your own custom ones either uploaded as an RPM or downloaded automatically from your own site.
But the goodness doesn’t end there… All of the respositories from the SUSE build service are also avaialble. You’ll be hard pressed to find a package that isn’t already available in Studio giving unprecidented flexability for building custom appliances.
Step 3: Next you configure some basic options such as Language, Timezone, Networking, and the default users and groups.
Step 4: Overylay files. If you need to add some files to your distro, just tar them up and they will be automatically un-tared in the directory specified.
Step 5: Create your applicance. You can pick one of 4 target formats. USB/Disk image, ISO, VMWare/VirtualBox, or XEN. Then click “Build”.
It typically takes less than 5 minutes to build the appliance and when you’re done you are presented with 2 options: Test Drive, or Download.
Test drive is really neat. Your appliance launches right in your browser window. You can watch it boot up, login, and test things out. The full desktop is there! Really cool! You can go back at any time and make changes.
Once you’re satisfied with your appliance click the download link and you’re done!
SUSE Studio is truly amazing.
I have only one small dissapointment; it only supports x86 archetectures and I had wanted to use it to build a PPC appliance that would run on the Sony PS3. I suspect they’ll add support for other CPUs in the future. Afterall, most small appliances don’t run full blown processors.
SUSE hasn’t let me down very often but recently I had a bad experience while applying some updates to an OpenSUSE laptop. There were quite a few updates so I undocked the laptop so I could relax while they downloaded.
For reasons that I have not yet resolved, the wirless networking became unstable and as a result, the updates had to be aborted.
Unfortunately, a new kernel was part of the updates and when the laptop rebooted it was in a bad state. X windows wouldn’t start and critically, there were no network drivers for the new kernel. To make matters worse, OpenSUSE does not keep the old kernels in /boot (why is that?) so there was nothing to fall back on.
With nothing left to do, it was time to try rescue mode and in a few short steps I had the system fully working again. Here is what I did:
Step 1: boot to rescue mode (duh).
Step 2: mount your hard disk partitions under /mnt in the same layout they would be normally. For example:
# mount /dev/sda2 /mnt
# mount /dev/sda1 /mnt/boot
Step 3: Next we need to make sure we have acess to all the important system resources.
# mount --bind /proc /mnt/proc # mount --bind /sys /mnt/sys # mount --bind /dev /mnt/dev
Step 4: We’re ready to chroot into our new environment.
# chroot /mnt
Step 5: We are now running on our system just as if we had booted to it and we can perform repairs. In my case all I needed to do was complete the updates:
# zypper up
I rebooted and everything was back to normal.
Yes it works! (I was as surprised as anyone)
It didn’t take me long to get it working but google returns a lot of posts with not so good information so here is the documentation on my experience.
In all of the SUSE varients (and in may other distros as well), the command ls has been aliased so that it actually does a ‘ls -la’. I find this particularly anoying so I have removed this configuration and documented it here: Stopping ‘ls’ from doing ‘ls -la’ instead.
I wrote a “installing OpenSUSE 11.0 on the PS3″ tips page. Check it out here.
I’ve been using OpenSUSE 10.X since it was released and it has been by far my favorite distribution. However, the one big strike against it has always been the sluggishness of its software management. Every time you do _anything_ related to software management Suse goes off on a wild tangent reading files, parsing, downloading and on and on.