I have a computer with grub installed, and nothing else. I'd like to install Debian on it without having to burn a CD. (and I don't have any flash disks.) It has a nice ethernet card, and I have another computer right next to it with an ethernet card. I also have an ethernet cable. However, I don't have any router free which I can mess with for these purposes. As I've looked up, apparently modern Ethernet cards don't need crossover cables, normal cables will work for this type of connection.

I've tried several different "tutorials" on how to set up a netboot server, but

  1. None of them are complete. All of them assume that you understand how DHCP works, and that you can do things like set up a dnsmasq server. I don't understand the DHCP protocol, with submasks and whatnot (I know that it is the protocol for assigning computer network addresses, and that's it), and I don't think I should have to in order to simply connect two computers. All of the tutorials give you incomplete configuration files, and ask you to fill in things which I don't understand, and for me it doesn't make sense to customize these settings, as I just want to connect them and I really don't care what ip address the TFTP server has or whatnot.

  2. All of these assume that you are going through a router. I am not. When I try googling for ways to directly connect two linux computers with an ethernet cable, I can't even find instructions, just more references to "you need crossover cables".

So basically, I have two computers directly connected by ethernet cables. Tell me what packages I need to install, what the contents of my configuration files should look like, and what, if any, commands I need to run in order that when I turn on my second computer, and select network boot, it will start up a minimal debian system.

EDIT: Hmmm, it looks like I actually have a linux kernel installed too, but no root filesystem (so no other programs besides busybox).


The canonical documentation is in the Debian Installation Guide, section 4.5. It wasn't clear if that was on the list of things you'd read. Other thoughts:

  • Netbooting a standard PC requires PXE, which requires both DHCP and TFTP. Bootp is an older option for some systems, but likely irrelevant for this task.
  • If you have an existing Debian server, the installation guide covers which packages you need to install to offer DHCP and TFTP services, and appears to have a complete dhcp config file you can adapt to your particular local network addresses.
  • If setting up DHCP and TFTP is unacceptable, then you won't do a totally network-based install, and you should find a 256MB or larger flash drive to install from.
  • Most (all?) modern Ethernet cards auto-detect if they need a crossover cable. It never hurts to have one, but you probably don't require it.

Update: on thinking about this further, I need to add the following:

You'll need access to a regular Debian archive to do the rest of the installation. The TFTP files are enough to boot the installer, but are not a bare Debian installation. If we're sticking with connecting the new system to one and only one existing system over an Ethernet cable, you'll either need to:

  • make an HTTP- or FTP-accessible Debian mirror on the existing system, or
  • put two network cards in the existing system and allow the new system access to the rest of the network and Internet

Disabling existing DHCP services on your network won't be required if we're using two PCs connected over an Ethernet cable. I edited that out from above.

What most people would do for network installs is to plug the new system onto the regular network, and set up PXE services. Either use the existing DHCP server for PXE, or make a new DHCP server with PXE support (after disabling DHCP on the old server). The new server could be temporary, or permanent.

  • Of course I've already looked at the official Debian guide, but saying that I need to "modify the configuration to fit my case" is not useful if I don't know what my case is. I want to connect two computers directly, and I can't find anywhere which tells me what "my case" is with respect to DHCP settings. Also, I can't disable existing DHCP servers. The DHCP server is built into the router, and I cannot disrupt that network at all. Setting up DHCP and TFTP would not be unacceptable if there were some clear instructions on how to do so without me entering in personalized configuration. – Jeremy Salwen Jun 23 '11 at 19:01
  • 1
    Three main options at this point: find a less critical network or location to experiment with (maybe at home, and you will have to experiment if you've never done this before), find someone else responsible for the can't-be-disrupted network that knows more about setting up PXE services, or find a flash drive. Migrate the question to serverfault if you want other opinions. – Mike Renfro Jun 23 '11 at 23:56
  • I've found that I have an SD card in my camera, which I was able to use to do the install. I gave up on netbooting. – Jeremy Salwen Jun 24 '11 at 5:20

For those arriving here, looking for an answer to the original question:

In order to auto-install Debian via a PXE boot process, there are a number of technologies you require: pxeboot server (dhcp, tftp, ..), preseed files, ...

I use dnsmasq for the dhcp server, and use debian's netboot.tar.gz for the pxe boot mechanism, and I've built a python script to make adjustments to a debian preseed file.

The steps to totally automate the installation process are quite involved, so I will refer you to

Auto Build Debian Hosts using PXEBoot and PreSeed files

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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