view · edit · print · history

SlugOS Tips and Tricks, Odds and Ends

This page serves as a container for all kind of Tips and Tricks and Odds and Ends on SlugOS that do not really warrant their own page, but that might be handy. Feel free to add your own tips etc.
The page can also contain info on how to build software that is not yet available as a package.

Configuring your slug for the right timezone

In order to configure your slug for the right timezone install the timezone package for your region.
This will be one of:

NOTE: In SlugOs/BE 4.8 Beta and later, the packages are called tzdata-* Also note that "america" is now "americas" and United States isn't under /usr/share/zoneinfo/Americas/ it's under /usr/share/zoneinfo/US/

After installing the right package cd to /usr/share/zoneinfo/<your_continent>
Pick a place in your timezone and make a symlink to /etc/localtime. Use a full path. E.g. if you are in The Netherlands you need to issue the command:

ln -s /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime
unset TZ

Fixing hwclock for DebianSlug-3.10-beta and slugosle-4.3-beta

I had an issue where I couldn't sync the hwclock with the system time on my Slug. I could set the time on the Slug but after a reboot the time would always be current time - 4 hours. Trying to sync the hwclock via the command "hwclock --systohc" would return a fatal error. The reason is unknown to me. But, a fellow Slugger passed this tip on to me. To fix (as root):

rm /dev/rtc
mknod /dev/rtc c 254 0
chmod g+rw /dev/rtc
chmod o-r /dev/rtc
The chmods put the permissions on the /dev/rtc device that were on the original. I don't know if it necessary, but I did it anyway. After this run:

date MMDDhhmm?

to set the proper time, and then

hwclock --systohc

to sync the hwclock to system time. The hwclock command should work at this point. Reboot and check the system time - it should be okay. Worked for me!

(Re)building the kernel

For forcing a rebuild of the kernel first remove the old kernel by
bb -cclean ixp4xx-kernel.
Next do a
bb ixp4xx-kernel
to rebuild the kernel.

Building php5.05 natively

For me libtool did not do the job. Be sure that you have file installed before trying to compile php as a DSO for apache. You also need libxml2.so and libz.so. Furthermore I needed to modify libtool to add the line EGREP = /bin/egrep.

Cleaning up

If you are rebuilding the rootfs regularly you'll end up with quite some log files in ./tmp/work/slugos-image-*/temp. You might want to clean this regularly. Every build adds about 70 KB to the directory.

Reducing memory usage

If you don't have a serial port hack, you can disable the getty program for the not existing serial port.
Edit the file /etc/inittab and comment out the line
S:2345:respawn:/sbin/getty 115200 ttyS0
with an # on the first character so that it looks like this:
#S:2345:respawn:/sbin/getty 115200 ttyS0
Commit your changes by executing the command telinit q

ipkg started to fail with native feeds

Ipkg started to fail on native feeds after a while of having installed the Optware feeds. The issue was that ipkg command and ipkg-opt command showed the same packages and outputs instead of each other feeds. Then ipkg update didn't nothing. The issue was on the ld.so.config file where I added the /opt/lib directory. After cleaning the entry, ipkg started to work right on the moment.

view · edit · print · history · Last edited by thx1011.
Based on work by thx1011, Rob Lockhart, earth2marsh, fcarolo, tetsi, kapookee, h8dc, and jcc.
Originally by repvik.
Page last modified on September 03, 2008, at 11:30 PM