Monday, July 20, 2009

Headlessly install Ubuntu 9.04 on a headless server

This information is quite old and I have found another method, more reliable, since I have first published this.
For details please see this post:
I will post also the remaster script I've done for the CD.

Basically it is not a server. It is a 2nd hand Dell GX520 on that I've put an 1 TB drive and 1 GB of RAM. I needed a machine on that I can test drive SAP/Netweaver.
I have no monitor home (although I have a spare keyboard) so when I got to install something on the machine I realised that it won't work.
I solved this issue with this trick:

1. I have installed Ubuntu Server 9.04 on my laptop using a 4 GB slash USB stick as target drive.
2. I have modified the GRUB bootloader on the stick to offer a serial console during the boot:
serial --unit=0 --speed=38400 --word=8 --parity=no --stop=1   
terminal --timeout=10 serial console
defopts=console=tty0 console=ttyS0,38400n8

3. I have created the file /etc/event.d/tty0 with the following content:
start on runlevel 1
start on runlevel 2
start on runlevel 3
start on runlevel 4
start on runlevel 5

stop on runlevel 0
stop on runlevel 6

exec /sbin/agetty ttyS0 38400 vt100

4. I have rebooted the server from the stick. The serial was connected via a null modem cable and a PL2303 serial2usb adapter to my laptop.
5. After boot I have created the same partition scheme as on stick to the main drive. I've put labels on the created partitions in order to mount the easily and to have a human readable fstab
6. I have transferred all the files from the partitions of the stick to hard drive
7. I have modified the /etc/fstab in order to reflect the changes
8. I have modified again the file /boot/grub/menu.lst to take into account the new disk.
9. As root I have ran the command grub-install /dev/sda in order to update the MBR and make the drive really bootable.
10. Reboot from the first hard drive.
11. It seems taht the trick worked. Hourray!

I have used some information from You can get more info there.

Saturday, July 4, 2009

I've got married

I did it today.
So I have joined the 'institution'...