Posts tagged System

Fstab – Manual Mounting and Udev Auto

Modern Linux distributions use udev which automount partitions to the system. This is most notably seen with usb device that are the predominant hot swappable media. Internal hard drives, particularly drives that are used to boot the system, have their mount points defined in the fstab file. Fstab is automatically generated during the Debian/Ubuntu installation process. Occasionally you’ll want to add entries such as to automount samba shares or if you have Windows partitions on the hard drive; although Windows partitions will most likely be handled automatically by udev. You can mount iso images automatically using fstab; but this may be unnecessarily permanent, and a temporary mount -t iso9660 cd.iso might simply be easier and more convenient.

Sendmail – Critical to Receive System Alerts

HiRes image of Roadrunner, world's first petaf...
Image via Wikipedia

The core of Linux is designed to mail, at minimum, the root user of various system alerts. With sendmail installed these alerts are mailed to the respective user directory. If you have an external mail server you can configure your local user mail to be forwarded to any email address. The easiest method is to place a .forward file in the users home directory. First create the file:

touch .forward

Then edit it:

nano .forward

Then add your email address to the file. All mails set to that particular user will now be forwarded to the added email address. People will say that you need to add the forwards directly to the aliases file in /etc/mail, but this is not necessary. It does work, and can be argued to be more “neat”, but .forward works just as well. Place a .forward file in each users directory. I use this on severs that I remotely manage. All system messages arre automatically forwarded to my incoming email server. There is no configuration needed for sendmail to work in this fashion. Just install it and system messages go to users, and then get forwarded as prescribed by .forward. Its secure against incoming messages unless port 25 has been forwarded to the local ip of the machine, from the router. And by default sendmail does not relay mail from external sources. Technically is will only send mail from the localhost, and even if there are other machines in your domain they cannot use sendmail without enabling a relay for them in the access file (/etc/mail/access).

Reblog this post [with Zemanta]

VBoxTool – An Incredibly Useful Script

Bash scripting is straight forward. There are logical and object oriented constructs like programs, and you are basically manipulating data contained in files, and using standard output to determine various tasks to be done. VBoxTool does what VBoxManage lacks. I wonder how corporations start virtual machines on boot, and manage their machines once the system is running. They clearly write their own scripts. VBoxTool is a publicly published script that does just this. I would like to extend appreciation to Mark Baaijens for the script; it is extremely useful! It completely manages my system from automating the boot process when I need to reboot the host, saving the machines when the need to be shut down, and backing them up at regular intervals with cron jobs.

http://sourceforge.net/projects/vboxtool/develop

Ubuntu Karmic – Mac Mini – MythTV

I gave up on OSX. I could not get the media center working the way I wanted. Plex and XBMC have their bugs, as previously posted, twice, preventing predictable functionality. MythTV for OSX simply is not as refined as its native Linux counterpart. It feels like running Windows applications via wine. I just scrapped OSX for Ubuntu Karmic. Out of the box, off of the cd, things work great. Audio works perfect. What didn’t work? The Mac Mini remote control. I tried for a day to get it to work the hard way. I saw that /dev/usb/hiddev1 was working and displaying data; shown with cat. But lirc would not bind to the device. Ultimately I removed the program, and ran a system update. Problem resolved; clearly a bug report was filed and a resolution provided.

Fanart and coverart work fine. The Linux based fronted is seamless compatible with the Linux based MythTV server. I didn’t even need to input the servers ip information manually. I did have to set the repeat feature, for each key in ~/.lirc/mythtv.

Now all I want is to have MythTV sleep the system and wake the system. I get it to sleep the system by making the halt script sudo pm-suspend. Adjust your /etc/sudoers files to allow passwordless sudo for /usr/sbin/pm-suspend. The halt script is configured in setup-general settings. Waking the computer is another thing that I have yet to get working.

Your Server – The Boot Process

You want to isolate all your server features into background process. You don’t want any server features to be dependent on graphical or client side applications. I previously had my mail server dependent on the client side filtering capabilities of Thunderbird. This was a no no because it required me to maintain a desktop session. This was not optimal because during the day the desktop session was swapped to the hard drive and this caused substantial system lag when coming back to use the desktop. Now with VBoxTool, the web server is automatically booted with the host system, and all functions on the server are consolidated to background processes; there is no more dependency on client side filtering. The MythTV server also boots with the host, and the first screen the host encounters is the GDM login. Now the system is secure. Passwords are required to enter the system as a user.