Netboot install

From LSDevLinux
Revision as of 15:15, 31 March 2009 by Mayhewn (talk | contribs) (GRUB flash: Add DSL and DSL-n links)

Jump to: navigation, search

It's possible to install Debian/Ubuntu entirely over a network without downloading a full ISO CD image. This has the advantage that you are doing the download and the install in one step, which means that you can set it going without waiting for a large CD image to download, and when you come back the installation will be finished and the machine ready to use.

Method of booting

First you will need to decide which of several boot methods you will use, as described below. Each involves downloading a few small files from a mirror and booting from them. All of the necessary files can be downloaded from the netboot directory of any mirror site:


The gtk subdirectory contains versions that use the graphical installer. Otherwise the installer is console-based. Surprisingly, the graphical installer is only very slightly larger.

Mini ISO

The Mini ISO is a bootable CD image that is only 10-16MB in size. It is the file mini.iso at the top level of the netboot or netboot/gtk mirror directory mentioned above.

Download and burn this to a CD, ideally a rewritable one, since you probably won't ever need it again. This is also typically a good way set up a new virtual machine, by attaching the downloaded ISO to the virtual CD drive (ie no need to burn a CD in this case).

Set the machine to boot from the CD drive, eg by changing the boot order to "Floppy. CD, HD".

GRUB flash

It's possible to install GRUB on a USB flash drive and copy the netboot kernel and initrd to it. These files are in the debian-installer/i386 of the netboot mirror directory mentioned above. This can be done with any flash drive, and doesn't require any repartitioning or imaging of the drive.

The outline of the procedure is as follows:

  1. Create a boot directory at the top level of the drive, and a grub directory within that.
  2. Copy the files linux and initrd.gz to the boot directory, or a subdirectory of it.
  3. Create a menu.lst in boot/grub.
  4. Install GRUB to the MBR.

It's possible to have multiple sets of linux+initrd for different distros and purposes all on the one drive. They don't take up much space. It's easier to keep things organized if you use separate subdirectories for each distro and release. You can also have memtest86 available, which is handy for checking suspect machines, even Windows ones.

Having GRUB in the MBR is invisible until you boot from the drive, and doesn't affect its operation in any way. You can keep GRUB and the boot directory on there permanently, which leaves you with a handy way to test or install linux on any machine as needed.

The layout of my flash drive looks like this:





I also have DSL and DSL-n available as boot options, although this requires additional files to be installed in a KNOPPIX directory at the root of the drive.

My menu.lst looks like this:

foreground = ff3366
background = 000066


title  New Debian Install (i386)
kernel /boot/debian-i386/linux root=/dev/ram0 ramdisk_size=12000
initrd /boot/debian-i386/initrd.gz

title  New Ubuntu Install (i386)
kernel /boot/ubuntu-i386/linux root=/dev/ram0 ramdisk_size=12000
initrd /boot/ubuntu-i386/initrd.gz

title  New Debian Install (amd64)
kernel /boot/debian-amd64/linux root=/dev/ram0 ramdisk_size=12000
initrd /boot/debian-amd64/initrd.gz

title  New Ubuntu Install (amd64)
kernel /boot/ubuntu-amd64/linux root=/dev/ram0 ramdisk_size=12000
initrd /boot/ubuntu-amd64/initrd.gz

title Memtest86+
kernel /boot/memtest/memtest86+.bin

PXE boot

Many BIOSes have a PXE boot capability. The BIOS is able to download a netboot kernel and initrd across the network, so that no external media of any kind (eg CD or flash drive) is required. However, PXE requires the presence of a bootp+tftp server to serve up the files.

The BIOS will expect the DHCP server to identify the TFTP server that is to be used for booting. This takes significant work to set up, and may not be possible in network environments that already have a DHCP server, unless you plug the installation machine directly into another Linux machine. It's probably not worth the effort unless you plan to do a lot of installs this way.

The netboot kernel+initrd are the same as the ones used with GRUB as described above, so this is just an alternative way of getting those into memory.

GRUB from a Windows partition

[Under construction]

Using the installer

The machine will boot straight into the installer. You are then asked a series of questions about locale, keyboard and mirror location. It's possible to use a local mirror by selecting enter manually from the mirror list. However, this entry is right at the top and will not be obvious if your country is lower down the list.

Here in the Calgary office, our mirror host name is and the directory is either /debian/ or /ubuntu/. The release name is determined internally by the installer, based on the release from which you downloaded it.

After this, and some preliminary downloading, you will be invited to select "tasks". If you want a minimal install, choose "Standard" and nothing else. You can install your chosen desktop environment later using a console login and apt-get install. This allows you to install KDE, XFCE or LXDE without installing GNOME first.