Linux (Debian) Mint network install starter.

Linux Mint is kind of taking of the reigns of being one of the most popular linux distros. Like installing any operating system the traditional way, you can run into roadblocks.  For example, you may not be able to burn a linux cd, the machine you want to load linux on has a broken cd/dvd rom, or a host of other reasons. What we are about to do is what is known as pxeboot networking. Another words we will use a web server to get us started with a linux install on a system. Traditionally you actually had to have several servers to do the network install. You had to modify a Dhcp (Ipaddress servers) server,  a Tftp (boot files) server, and among other systems which generally required a lot of setup and the blessing of the system administrator,



I tried this with the python web server, but you have to have all the files in one directory from what I could see.  I just did not want to take the time to do it.

python -m SimpleHTTPServer

I went ahead and used the Apache2 web server. You can get portable versions of the Apache2 web server so that there is not much to install. But before I get ahead of myself, we need a way to boot a computer to access the network. Etherboot led the way in this direction and had now graduated to Ipxe. (more information at www.etherboot.org).  So we need to make a boot disk for the computer we want to install linux on. You have several choices. For our purposes a floppy will be used. You can also use a cd/dvd rom disk and or a very small usb stick. We need to go to www.romomatic.org to create the boot media for our system. 





We chose the floppy disk. Now even though we can use the floppy disk to access the network, we need to add a short script to let the floppy know about the web server we want to use. In our case, the script was for oesrvr1 using the bim directory. The script is pretty standard so all we had to do was to change one line of the script. (Note in some cases, you need to use the ipaddress).


  #!gpxe
  echo Performing DHCP on first network interface
  dhcp net0
  set 209:string pxelinux.cfg/default
  set 210:string http://oesrvr1/bim/
  chain ${210:string}pxelinux.0

You will press the customization button to get the text box where to enter the script. If the script is ok, the you want to save it to your existing system.  It is usually saved as a very long name so I use the gui to rename it to test.dsk.


Now we need to get the image written to the floppy and that is pretty easy, 

$ sudo dd if=test.dsk of=/dev/fd0

The client machine is ready to go, so now let us look at the server. You probably want to make a special directory such as bim in your document root. /var/www/ . 

$ sudo mkdir bim
$ cd bim

Now that we have a place to store the files, we need to download them. Remember we will not have to burn a dvd. Here is where the files are, so all you have to do is download them directly to your web server,


$ sudo wget http://debian.linuxmint.com/incoming/dists/testing/main/installer- i386/current/images/netboot/netboot.tar.gz

The we need to expand the archive.

$ tar zxvf netboot.tar.gz

Then you need to get the cdrom image file.

$ sudo wget http://debian.linuxmint.com/incoming/dists/testing/main/installer-i386/current/images/netboot/mini.iso

That is all you need! Make sure your apache2 web server is running though. 

$ sudo service apache2 status

Apache is running (pid 12345)

Now it is time to boot up your client machine with the floppy media!

In just a few seconds you should get the install menu. Now the rest of the install should come from the internet. That is another article. We have our server set up to support several linux distros. i.e. Debian, Mint,  Ubuntu, and others. Using a standard boot media, there is no need to burn new cd's every time a new version of linux comes out.  Have fun!




Even if your computer does not have a floppy drive, you can get a usb floppy drive fairly cheap. Since the data on the floppy is so small, it should not take long to load even with a usb floppy drive.. For mass installs we recommend the cobbler, drbd/clonezilla, or as a last resort the Fog software. I will talk about them later.  Last but not least you can also use this method to install MSWindows systems..

Note: Newer network network cards that support ipxe will let you use the script mentioned in the article, but you have to go into the bios or the equivalent to enter it. 

Comments

Popular posts from this blog

Guiless?

MSOffice vs Libreoffice

Raspberry pi zero.