Tag Archives: Ubuntu 9.10

Install VirtualBox Guest Additions on Ubuntu Server

On my work, I have a box with WinXP, running Virtual Box as a host, and a Ubuntu Server 9.10 box as a guest. My problem is that the firewall on the corporate network does not allow Ubuntu to update the date and time against any NTP server (like pool.ntp.org or ntp.ubuntu.com). So, I need a way to keep the hour updated on the guest. Fortunately, VirtualBox has the ability to synchronize it from the host, the only thing I need to do was to install the Guest Additions package.

To do this, first, we need to click on Devices/Install Guest Additions (from the VirtualBox menu).

Then, on the Ubuntu Server, we install some pre-requisites:

$ aptitude install build-essential linux-headers-$(uname -r) -y

Now, we will mount the virtual CD-ROM (where the Guest Additions are):

$ mount /dev/cdrom /mnt/

And then, run the installer script (there is a 32-bit and 64-bit versions). For 32-bit (which is the most probable, as VirtualBox Open Source only supports 32-bit guests):

$ /mnt/VBoxLinuxAdditions-x86.run

Or for 64-bit guest:

$ /mnt/VBoxLinuxAdditions-amd64.run

It should install the available modules (like timesync), and drop a fail message saying that X server
was not found, which is OK as we are working with a server without GUI.

Finally, we umount the CD-ROM:

$ umount /mnt/

Now, the guest box time should be sync with the host, so we have one less thing to worry about.

Nullmailer keeps trying to send unsuccessful mails on Ubuntu

I have noticed that my Ubuntu box is lately always trying to reach a SMTP server (detected through Wireshark tool). After reviewing the list of running processes that contains the word mail (running ps aux | grep mail on console), I found a couple of them called Nullmailer that seems the responsible of that and indeed, it was.

So a Google search led me to this thread, where in that case, Nullmailer registered entries on Syslog (which possible happened on my computer also). The messages that Nullmailer was trying to send were related to Cron jobs output. So, the solution was to delete the queue of messages of this program, located on /var/spool/nullmailer/queue/.

Reinstalar Grub luego de instalar Windows

Luego de haber instalado Windows 7 hace algunos meses, en un equipo donde tenía tanto el Windows XP como Ubuntu 9.04, quedó inaccesible este último. Esto debido a que el instalador de Windows no reconoce otro sistema operativo que no sea propio de Microsoft (a diferencia de Linux).

Se debe tomar en cuenta NO utilizar el Live CD de Ubuntu 9.10 para restaurar el Grub de las versiones anteriores de Ubuntu. Esto debido a que Ubuntu 9.10 y posteriores utilizan Grub2, que difiere mucho de la primera versión.

Lo primero que se debe hacer es iniciar la máquina con algún Live CD de Linux (como el de Ubuntu, que es el que utilicé en el proceso).

Una vez que está funcionando, abrimos un terminal. Vamos a necesitar los privilegios del root, por lo que lo más práctico sería ir al shell respectivo:

sudo -i

Luego, creamos un punto de montaje para la partición de Ubuntu:

mkdir /mnt/linux

Después, montamos la partición:

mount /dev/sda2 /mnt/linux

Donde sda2 (sd porque es un disco SATA, a por ser el primer disco duro, y 2 por ser el número de la partición) es la partición donde se encuentra Ubuntu. Si no estamos seguros de cual es la partición, podemos usar el programa GParted (visual) o el comando:

fdisk -l

Una vez que está montada la partición, podemos corroborar que sea la partición listando los archivos en ella:

ls -la /mnt/linux
ls -la /mnt/linux/boot

Luego de que estamos seguros que es la partición correcta, pasamos a reinstalar el Grub mediante el siguiente comando:

grub-install --root-directory=/mnt/linux /dev/sda

En caso aparezca algún error o advertencia, podemos probar el siguiente comando:

grub-install --root-directory=/mnt/linux /dev/sda --recheck

Donde sda hace referencia al disco (usualmente el primario) cuyo MBR será utilizado para instalar el Grub (ojo que NO incluye el número de partición).

Reiniciamos y deberíamos ver ya el menú de booteo del Grub.

Vía: Ubuntu Documentation