Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This is tricky. I would like to install Ubuntu on a machine that is intended to work as server, and for some reason I do not have an option to connect a screen to it.

I expect this may be similar to remote installation. However, there is currently no OS on that machine, so I will have to set up everything from scratch.

On the other hand, I do have a physical access to that machine. Therefore I can get it to boot from a CD/USB. But that's not enough.

Is there a way to do such installation remotely? Is there a version of Ubuntu image that comes with a SSH server preinstalled, and starts it once booted, so that I can boot the machine with such image, connect to it via SSH and process the installation from a different computer?

If not, what other options do I have?

share|improve this question
2  
You could pull out the hdd, use another machine to install and configure everything the way you like, and then move the hdd back. It's not too hightech, but is simple enough. –  mikewhatever Feb 3 '13 at 12:56
1  
@mikewhatever That's a useful tip, but that technique caused me lots of configuration troubles. Ubuntu learns about the hardware during installation, and when it's moved to another machine it has severe troubles even with finding the networking device, which makes me unable to access it remotely. –  Rafał Cieślak Feb 3 '13 at 14:17
    
If you can get it to boot to a USB drive or the network without using a monitor, then you can try this: askubuntu.com/a/260469/158442. Note that, with preseeding, you can also specify an SSH key and then perform the remainder of the installation over SSH. –  muru Jul 15 at 1:36
3  
Does it have a serial port? For old computers and headless mainframes we'd just console in. Not 100% if that's still an option though –  meccooll Jul 15 at 2:02
    
Once display of my laptop broke down, I managed to connect it through localhost via Windows XP machine but I had Ubuntu intalled it. askubuntu.com/questions/377445/… –  kenn Jul 15 at 11:32

3 Answers 3

up vote 8 down vote accepted

The method mentioned in the comment above with installing Ubuntu on a different computer to just move the hard drive to the headless machine certainly is an elegant and probably the fastest method to get Ubuntu installed. In most cases hardware will be recognized and drivers will be provided on boot (not on installation). This makes installation of drivers unnecessary unless we do need proprietary drivers (e.g. for some very special network cards).

But there is another way we can install Ubuntu unattended by creating a custom CD-ROM, USB or from a network solution (Preseed). See this rather complete guide on the steps and tuning procedures involved:

You may also find the following related questions helpful:

share|improve this answer
share|improve this answer
1  
+1 for the serial console solution. –  John WH Smith Jul 15 at 11:19

You could use a No Quesiton Asked preseeded debian-installer which installs just the base server and ssh package. On reboot you will be able to ssh into the running system and further install and configure from there.

There is an example of a preseed file here: https://help.ubuntu.com/community/Cobbler/Preseed

You can follow the normal iso to usb instructions https://help.ubuntu.com/community/Installation/FromUSBStick and then edit the syslinux/txt.cfg file on the usb boot stick to point to your preseed file and copy your preseed file to the preseed directory on the usb boot stick:

label custom
  menu label ^Install Custom Ubuntu Server
  kernel /install/vmlinuz
  append  file=/cdrom/preseed/ubuntu-custom.seed initrd=/install/initrd.gz quiet ks=cdrom:/isolinux/ks-custom.cfg --

Notice the second to last line in the preseed file installs openssh server package:

d-i     pkgsel/include string byobu vim openssh-server

Check the logs on your DHCP server to get the IP address of the newly booted system and ssh to it as the ubuntu user. The password in the example preseed is also 'ubuntu' (without quotes).

share|improve this answer
    
Thanks! Got it working now. –  smies Feb 24 '13 at 15:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.