Category Archives: Linux

Init Script for Daemonizing Non-Forking Processes

5.00 avg. rating (90% score) - 1 vote

Sometimes you have an executable which does not fork to the background, but you need to control it with init scripts, so that it does indeed run in the background. Here’s a pretty generic init script for that. It allows you to configure these:

Continue reading Init Script for Daemonizing Non-Forking Processes

HP ProLiant Management Component Pack on Ubuntu

0.00 avg. rating (0% score) - 0 votes

HP seems to have set up a package repository for Ubuntu 12.04, which is an improvement since I last checked a few years ago. To use the repo, add the following line to /etc/apt/sources.list:

Run “sudo apt-get update”.

You can install a number of software packages from the repository:

  • hpsmh: HP System Management Homepage
  • hp-smh-template: HP System Management Homepage Templates
  • cpqacuxe: HP Array Configuration Utility, web-based
  • hp-snmp-agents: Insight Management SNMP Agents for HP ProLiant Systems
  • hponcfg: RILOE II/iLO online configuration utility
  • hp-health: HP System Health Application and Command line Utility Package
  • hpacucli: HP Command Line Array Configuration Utility
  • ams: Agentless Monitoring Service for HP ProLiant Gen8 Systems Continue reading HP ProLiant Management Component Pack on Ubuntu

HP iLO2 Virtual Serial Console on Ubuntu

5.00 avg. rating (93% score) - 2 votes

To get a virtual serial console, you need to enable the iLO virtual serial port. I had mine set up like this:

  • iLO 2 Virtual Serial Port: COM2 0x2F8 IRQ 3

I also enabled ssh access in the iLO web interface. This way I can ssh into the iLO and see all BIOS messages using the “vsp” command. I can even go to the BIOS setup (RBSU) by pressing “ESC-9”.

To be able to control GRUB via the virtual serial port, it has to be configured. I changed the following lines in /etc/default/grub: Continue reading HP iLO2 Virtual Serial Console on Ubuntu

Upgrading HP Proliant iLO2 Firmware with Ubuntu Server

4.20 avg. rating (83% score) - 5 votes

I downloaded the firmware from HP site. It was named CP019022.scexe. I tried uploading it in the iLO2 web interface, but it was rejected. Next, I copied it to the server, gave it execute permissions and ran it:

Not working. This is a fresh installation of Ubuntu Server 12.04.2 LTS x86_64. So I had to start looking closer. The file is a bash script but the hashbang is #!/bin/sh, which puts bash into old Bourne shell mode. No pushd/popd there. Continue reading Upgrading HP Proliant iLO2 Firmware with Ubuntu Server

Ubuntu 12.04 Active Directory Authentication

4.20 avg. rating (83% score) - 5 votes

Update 2015-06-16: Ubuntu 14.04 Active Directory Authentication

Authenticating Linux users against Active Directory has traditionally been hard. There’s a multitude of HOWTOs on how to do it, and every one of them seems to do it a bit differently. This is because environments and goals vary, and there are many ways to achieve a particular goal. I will add my version to the mix. This one fetches users and groups from Active Directory LDAP using a machine account added using the Samba tools, and authenticates users to the Active Directory Key Distribution Center using Kerberos. Continue reading Ubuntu 12.04 Active Directory Authentication

ADT requires org.eclipse.wst.sse.core 0.0.0 but it could not be found

0.00 avg. rating (0% score) - 0 votes

In Eclipse 3.8, installing the Android Development tools may fail with the following error:

Cannot complete the install because one or more required items could not be found. Software being installed: Android Development Tools 0.9.9.v201009221407-60953 (com.android.ide.eclipse.adt.feature.group 0.9.9.v201009221407-60953) Missing requirement: Android Development Tools 0.9.9.v201009221407-60953 (com.android.ide.eclipse.adt.feature.group 0.9.9.v201009221407-60953) requires ‘org.eclipse.wst.sse.core 0.0.0’ but it could not be found

Continue reading ADT requires org.eclipse.wst.sse.core 0.0.0 but it could not be found

ACPI Shutdown on Virtual Ubuntu

5.00 avg. rating (93% score) - 2 votes

If your virtual machine does not shut down when asked by the hypervisor, install the package acpi-support.

Works at least with KVM, but I see no reason why it would not work as well in other virtualization platforms, if they just send the ACPI shutdown signal to VM.

Thanks:

Cloning Ubuntu 10.04 Server KVM guests efficiently

0.00 avg. rating (0% score) - 0 votes

If you need to create lots of similar virtual machine guests running on QEMU/KVM, it is a very good idea to prepare a template guest image from which to clone the other guests. You should do whatever customizations you like before cloning. For instance I like to configure LVM and file systems to my liking, install openssh-server, install nfs-common and configure NFS mounts, install all available updates, add users or set up authentication, copy ssh keys, and do many other things so that they will be working out-of-the-box after cloning a number of guests from the template.

After you have installed and set-up your template virtual server to your liking, and would want to start cloning multiple instances of it, some tricks are needed to make things work more automatically after cloning and starting up the final copy.

If you simply clone a vanilla Ubuntu server installation multiple times, you will face some problems:
Continue reading Cloning Ubuntu 10.04 Server KVM guests efficiently

Serial console for Ubuntu server 10.04 KVM guests

0.00 avg. rating (0% score) - 0 votes

The virt-manager VNC screen is fine for LAN connections, and good for running graphical sessions. X is not installed on Ubuntu server by default, and VNC is really bad over slow links even for text console. I like to configure serial console for all my virtualized guests, because with it, I can simply ssh into the virtual machine host, and run “virsh console <guest-name>” to get a working console. Very nice for fixing broken network connections or file systems, or any kind of boot problems. And I can do it using just my cell phone, ssh over 3G connection from anywhere!

Continue reading Serial console for Ubuntu server 10.04 KVM guests

N900 Scandinavic Letters from US keyboard

0.00 avg. rating (0% score) - 0 votes

My Nokia N900 has the US keyboard with four arrow keys but no diacritics, two of which are used in my native Finnish language. I actually like having the four arrow keys instead of two arrow keys plus dedicated diacritics. You can anyway get those from the on-screen keyboard, but it is better to remap some of the hardware keys to be able to punch them in quicker. Here’s how.

Continue reading N900 Scandinavic Letters from US keyboard

NIC bonding with Red Hat/CentOS

0.00 avg. rating (0% score) - 0 votes

Here are simple instructions on how to configure network interface bonding on Red Hat based distros. The thing I always forget. There’s also a little script which will create a bonding interface bond0 between eth0 and eth1 and migrate existing IP settings from eth0. You can find it in the bottom of this post.
Continue reading NIC bonding with Red Hat/CentOS

Redundant iSCSI storage for Linux

5.00 avg. rating (90% score) - 1 vote

Here’s how to set up relatively cheap redundant iSCSI storage on Linux. The redundancy is achieved using LVM mirroring, and the storage servers consist of commodity hardware, running the OpenFiler Linux distribution, which expose their disks to the clients using iSCSI over Ethernet. The servers are completely separate entities, and the purpose of this mirroring is to keep the logical volumes available, even while one of the storage servers is down for maintenance or due to hardware failure.

Ultimately the disks of the iSCSI target servers will show up as normal SCSI disks on the client (/dev/sdb, /dev/sdc, …). The data will be moved across the network transparently. It is preferable to use multiple gigabit network interface cards on both the initiator and the target, and bond them together for reliability and speed gain (or use Device Mapper Multipath). A separate VLAN for iSCSI traffic is recommended for security and speed. By default, the traffic is not encrypted so your disk blocks can easily be sniffed using tcpdump.

Continue reading Redundant iSCSI storage for Linux