June 7, 2011

ssmtp and aliasing the TO-address

Posted in Gentoo, Linux, Techie stuff at 21:40 by theBlackDragon

I ran into a rather annoying problem today, Gentoo had pulled in ssmtp and it had started to send out mails, but since root@localhost didn’t really go anywhere everything got sent to my host’s support address, which they weren’t very happy about (sorry).

My setup up to then had been using nailx (portage: mail-client/nail) as a mailx replacement since it supports sending mails straight to an SMTP server but since I already had ssmtp now (which I didn’t know about when I set this up) I figured I’d try setting that up correctly so I could finally be rid of the dead.letter files in my homedirectories. Setting up ssmtp to send mail to an smtp server proved fairly trivial, however aliasing “root” to something more useful proved a bit harder, or rather, the information on how excatly to go about it proved to be fairly hard to find at least if you don’t know what you’re looking for.

My first intuition was to use ssmtp’s revaliases, unfortunatley that doesn’t quite work as it aliases the from-address, not the to-address. A bit of Googling later I found out about /etc/mail/aliases but that file isn’t supported by ssmtp at all (although it oddly is present on my system).

In the end it turned out I needed to use mailx (portage: mail-client/mailx) instead of nailx to provide the mail program so I then could edit /etc/mail.rc like this:
alias root root<root@myremoteaddress.be>
This of course also works for accounts other than root and it seems to work just fine. I’m sure the nice folks at Benesol will be able to appreciate it.

November 22, 2006

Cleanup time?

Posted in Gentoo at 15:54 by theBlackDragon

I’ve been running Gentoo on my desktop for quite some time now, according to my emerge.log since 3 april 2005,

% head -n 1 /var/log/emerge.log
1112547957: Started emerge on: Apr 03, 2005 17:05:57

but I haven’t cleaned any portage directories since that day. So after more than a year of use Portage hogged over 4.6GB of space in /var/tmp/portage…

Today I decided to do some more cleanup after a corrupt package download and this is what I got:

[theblackdragon@ira ~]% rm /usr/portage/distfiles/*
zsh: sure you want to delete all the files in /usr/portage/distfiles [yn]? y
zsh: argument list too long: rm
[theblackdragon@ira ~]% ls -l /usr/portage/distfiles|wc -l
3229
[theblackdragon@ira ~]% du -hs /usr/portage/distfiles
9.9G /usr/portage/distfiles

This really made me go “yoinks”… Guess I should clean up more often. Heh.

October 25, 2006

Installing Gentoo on a Sun Blade 100

Posted in Gentoo at 17:49 by theBlackDragon

I managed to get my hands on a Sun Blade 100, specifications being:

  • UltraSPARC IIe 500Mhz processor
  • 256MB RAM
  • IDE harddisk
  • USB keyboard and mouse
  • Mach 64GR graphics card and an additional PCI graphics card that lspci identified as “Intergraph Corporation Sun Expert3D-Lite Graphics Accelerator” although on the card it says “Xilinx Spartan XCS10XL”, either way, it’s unsupported.

At first I tried getting Debian or Ubuntu on it, but neither the Debian or Ubuntu installation disc wanted to boot, so I reverted to Gentoo. The reason that I didn’t use Gentoo in the first place is that this is my first experience with an UltraSPARC based machine and I didn’t really have any idea on how fast it would be, compiling Gentoo in my P2 266 was a bit of a nightmare… But the Blade proved why the UltraSPARCs have such a good reputation, keeping up relatively well with my desktop system (a homebuilt Athlon XP 2000+ with 512MB RAM), but I’m getting ahead of things.

Upon turning on the machine I was greeted by the OpenBoot prompt, just type

boot cdrom

to boot from the CD-ROM drive, a lot of people have trouble at this stage, but my relatively old OpenBoot (it has version 4.0, the latest version is 4.17, though it’s recommended to not use that version but use 4.16 if you need to upgrade because of netboot trouble with 4.17) booted the Gentoo livecd just fine. I had to disable the ati framebuffer to be able to boot but that might have been due to the unsupported PCI graphics card I had my monitor plugged into.

2617 video=atyfb:off

it then booted fine and I could just install Gentoo as if it were a regular x86 box. I then set a root password and started the livecd’s ssh daemon so I could continue the install from another box as the Blade’s console was extremely slow, so you’ll either have to disable output as much as possible (eg. when extracting a stage tarball don’t use the ‘verbose’ option) or do the install over ssh, I opted for the latter approach.

I had to get the Gentoo sources from ~sparc64 though as the 2.6 kernel series is still dorky on UltraSPARC machines. After some trying it became clear I had to stick with the 2.6.16 kernel because of problems with drivers in both the 2.6.17 (broken support for ATI Mach64) and 2.6.18 (hang on boot, don’t know the exact problem) kernel versions.

You can get my kernel configuration file here.

Once I got past this stage I found out I didn’t get any output on the display altough the box booted just fine (I could ssh to it just fine), as I said the PCI graphics board was unsupported in Linux so I had now attached my screen to the built in graphics card for which the output was being redirected to the serial console as I found out after some searching. So I reattached the screen to the PCI card, booted into the OpenBoot prompt and executed the following to get the box to display it’s output on the screen and accept input from the keyboard:

ok setenv input-device keyboard
ok setenv output-device screen
ok reset-all

After this it booted fine. Getting X to work is another hurdle though, right now I get some strange artifacts when dragging windows around in FVWM, but I’m unsure as to whether that’s because I misconfigured something or because of the Mach 64 graphics card.

Given the X trouble I think I’m going to turn this box into a home server as it’s pretty quiet, after I’ve toyed with it some more of course 😉 I would like to thank the people on the Gentoo forums for their support in getting everything up and running.