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:
timezone-africa
timezone-america
timezone-antarctica
timezone-arctic
timezone-asia
timezone-atlantic
timezone-australia
timezone-europe
timezone-indian
timezone-pacific
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
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/
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.