1

I have a box which I want to install linux on, but it doesn't have a monitor. Are there ways to work on this linux box through my laptop screen?

I heard it's possible to work on a headless box if you connect to it through the network. Does someone know how this works? I have a router which the laptop and linux box would have to connect to for access to the internet, so technically, that's like a network. Anyone knows how to work this out?

Are there better ways than this? I thought the network/router would be a good way because I don't want to connect the linux box to my laptop with wires and such. But I guess wires may be something I'd have to do anyway, at least initially until the OS is installed and it's able to access the network. I know very little about this so wouldn't mind any tips to point me in the right direction.

Please forgive me if I'm not upvoting helpful answers. My rep is below the level required to upvote. But thank you nonetheless.

park
  • 33
  • 1
  • 4
  • 1
    It's going to be easier to borrow a monitor from someone until you get the OS and a ssh server installed, follow gsteinert's advice and ssh to the box. – l0c0b0x Dec 04 '10 at 00:08
  • 1
    You want to use something like kickstart, as described here: http://serverfault.com/questions/21255/headless-linux-install. Shouldn't need a monitor unless the machine isn't configured to boot from CD by default. – Cory J Dec 04 '10 at 00:10
  • 1
    How about a usb kvm? http://www.iogear.com/product/GCS661U/ – Zoredache Dec 04 '10 at 00:58

4 Answers4

2

No keyboard, mouse, or monitor required at all. Not for beginners but not too hard.

Kickstart method
If you will be installing a Red Hat variant, you can use Kickstart. There are similar facilities for other distributions but I am not familiar with them. They will undoubtedly be very similar.

From web page referenced above:

Kickstart installations can be performed using a local CD-ROM, a local hard drive, or via NFS, FTP, or HTTP.

To use kickstart, you must:

  1. Create a kickstart file.
  2. Create a boot diskette with the kickstart file or make the kickstart file available on the network.
  3. Make the installation tree available.
  4. Start the kickstart installation.

There are a variety of ways in which you can meet the requirements above. Please refer to the the Kickstart page.

USB drive enclosure method
Place the drive in a USB enclosure and attach it to the laptop. Now there two things you can do.

  1. Use a virtual machine (you'd have to install the software for this on the laptop), assign the USB attached drive to the VM, and install.
  2. Boot up the laptop with a Live CD and select the USB attached drive as the drive to install on.

For both of these methods you would only install enough software to get the box to boot, start the network service and then the SSH server. Thereafter, you would customize via SSH.

Your own customized LiveCD
Modify the LiveCD so that has an SSH server running and an SSH account to which you know the password. Boot up the headless box with it, SSH in and kick off the installation.

Just borrow a monitor and keyboard
How hard would that be? Temporarily deprive another computer. A mouse is not needed for text based installs. If you are a beginner this is your safest path. All of the others will be frustrating.

Regardless of the method used, any "headless" box needs some way of communicating its status to the outside world other than by just sitting there emitting heat. If you haven't really tightened down the OS, the drivers, the configuration, in short, everything (enough to make you an embedded device guru) then you must at least get a used, cheap LCD and a cheap keyboard and attach them to the "headless" box for trouble shooting. Even datacenters have crash carts that have these things just in case.

Allen
  • 1,315
  • 7
  • 12
  • I wish I could upvote answers here, but my rep is too low to upvote. – park Dec 05 '10 at 04:45
  • i'm upvoting for "just borrow a monitor"...its by far the easiest solution...and certainly an office dumpster or hardware recycling depot near you has one for the taking. – Brad Clawsie Dec 05 '10 at 05:03
1

You would need a monitor for the initial install. As part of this, install an SSH server and ensure port 22 is open in the firewall.

Once you have done this, you can connect to the computer from anywhere on the local network (or the internet if the box is accessible from the internet) using ssh. On Linux simply run ssh xxx.xxx.xxx.xxx where xxx.xxx.xxx.xxx is the IP address of the Linux box (make sure it is static when you set it up).

If you need to access from Windows, you can use an SSH client such as Putty (http://www.chiark.greenend.org.uk/~sgtatham/putty/)

I had a router at one point that I had running exactly like this =)

Gary

gsteinert
  • 121
  • 4
  • Also, if you wanted to use GUI programs over the SSH connection, from Linux simply run `ssh -x xxx.xxx.xxx.xxx`. – gsteinert Dec 04 '10 at 12:00
  • I wish I could upvote answers here, but my rep is too low to upvote. – park Dec 05 '10 at 04:44
  • X tunnelling works from Windows too, if you have an X server and a decent SSH client installed. Cygwin comes with an X server and the OpenSSH clients (and servers should you need them). I think puTTY supports X tunnelling too if you have an X server for it to pass connections to. – David Spillett Dec 05 '10 at 11:49
1

It is possible to install Linux via a serial console, but I'm not aware of any modern distributions that support this out-of-the-box as it is not commonly done. There is a modified set of Debian installer CDs here. Using those you should be able to connect to the machine using a terminal emulator program and a serial<->cable between the machines.

Another option would be to make (or find) a custom Live CD that as part of its default boot picks up a local address via DHCP and starts SSHd listening on it. From there you could perform a more-manual-than-usual install via a SSH connection.

You could also get a KVM-over-IP box which would allow full control of the machine (even the initial BIOS controlled part of the boot sequence) with which you could perform your installation, but one of these would cost you a lot more than just buying a cheap monitor to plug in (a quick search here shows I could get a high-spec 24" LCD display for less than the cheapest single port KVM-over-IP unit, it'll no doubt be the same in what-ever country/state you are in).

None of these methods are something I'd recommend to a beginner though (I'd probably not bother with them myself) borrowing a monitor, or taking the box to where there is a monitor for you to connect it to, in order to do the first stage install would be much much easier. Once you have the base OS installed you can setup SSHd and connect that way in future. If wanting to run a desktop Linux setup on the machine then look into remote control solutions like VNC and NX or (as gsteinert suggests) running X applications over SSH (if your laptop runs Windows then CygwinX is a good option for an X server and there are others available.

David Spillett
  • 22,534
  • 42
  • 66
0

To install without a monitor you could use something like this; http://www.adder.com/uk/products/ADDERLinkIP.aspx It will allows you to control the keyboard, mouse and view the screen using VNC over any network connection. These tend to only be used in datacenters.

Connecting a monitor for the initial install is the easiest way. Then install SSH for console/text based access.

For graphical access (GUI), ie, something like Gnome or KDE you can also set up VNC remote access.

If you are using Gnome, for example, you would enable this in System -> Preferences -> Remote Desktop.

Here is how to enable remote desktop in Ubuntu. (The article is a couple of years old but it still applies) http://www.howtoforge.com/configure-remote-access-to-your-ubuntu-desktop

A similar article for Centos;

http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/4/html/Desktop_Deployment_Guide/ch-ddg-remote-desktop.html

If you want to access your machine over the internet you can also tunnel VNC over SSH so that it is encrypted.

If you're just getting started with Linux, I find Ubuntu a good place to start http://www.ubuntu.com and extensive help pages at https://help.ubuntu.com

zio
  • 131
  • 4