Intro: No Hard Drive Network.
Going Diskless with Linux
Suppose you want a super safe web browsing environment. Suppose you want a Linux “on demand” – that is, you want to boot Linux without using a CD or having Linux installed on your PC’s hard drive. Is that possible? Maybe you have a PC lying around with no hard drive and no CD-ROM drive. Can you really run Linux on a PC with no drive of any kind? Sure you can. (see my https://www.instructables.com/id/PC-personal-computer-into-a-sort-of-thin-client/)
It’s an idea as old as the hills – at least for hills that have been around since the 1970′s. The concept is that of a Diskless Workstation. That is, a workstation running an operating system with no drives of any kind. This idea was very popular in University and research environments as much as 40 years ago.
Yes, you can do it with KNOPPIX
If you are interested in seeing for yourself how this works “hands on” – then read our previous posting first - Learning about Linux – the KNOPPIX Live-CD. That posting will get you started with the KNOPPIX Live-CD. If you can boot a couple of computers with that Linux CD you are on your way.Note: Special thanx to http://frrl.wordpress.com for help with this. Actually I have done this many times before I ever knew about the article.
Step 1: What You Need.
You need a cdrom of Knoppix. You can download it from www.distrowatch.com . You need a working system long enough to burn the cd-rom. I carry mine with my cd all the time, so I do not have to look for a machine to prepare one.
The basic prerequisites for this wonder of technology and network protocols are these:
- A ubiquitous networked environment of at least 100 Mb/sec
- A set of network protocols that allowed workstations to broadcast for network services and servers to answer for those services.
- A server that could deliver an executable image over the network to another computer.
- A workstation that has network capability to retrieve an executable image over the network and execute it.
and for extra credit we could add
- A network based file system (NFS) – so you could store file in a persistent way,
- A network based authentication and authorization system. Popular was YP (yellow Pages) and NIS (Network Information Systems). You need this to prove that you are who you say you are.
Of course none of this would happen without a bunch of really smart people who had the vision for this concept and a bunch of technical folks who could make it happen. In many cases those two groups of people were the same. In many cases, those folks were at Stanford University, MIT, and other major universtiy and research institutions. Have you heard of SUN Microsystems? Stanford University Networking – that is the roots of that corporation.
Step 2: Preparation Part One.
This feature on many PC’s is PXE (“pixie”) – Pre eXecution Environment
You can check you PC system BIOS on your laptop or desktop PC to see if you have this capability. Here is how to do it.
Enter the appropriate key when you turn on your PC to enter the BIOS setup screen.
Look in the boot menu or boot order menu.
Find an entry that says “Network Adapter”
If you find this option, then you are in luck.
The Diskless Workstation Experiment
The best way to learn is “hands on” So we’ll show you how to your can experiment with Network boot of diskless workstations using your own PC’s. Hopefully, you have 2 PC’s that will work.
Here is our setup. The PC on the left will be our boot server. The PC on the right will be our diskless workstation and we’ll network boot that baby to show you how it works. Unlike Cold Fusion, you should be able to replicate our experiment at your home with very little trouble and get the same results.
Here is what you need
- Two PC’s that are both capable of running KNOPPIX with one of those PC’s capable of booting from its Network adapter. Most modern PC’s will have this capability.
- A network comprised of the two PC’s. We will make a network with a hub and two network cables. You can alternately use a special “cross-over” cable that would let you connect the two PC’s without a hub or switch – but we will assume you don’t have that. Most likely you have a hub or switch – so we will use that and a couple of ordinary network cables
- Set one of the PC’s to boot from the Network. Use whatever your BIOS requires to change the boot order to put the Network adapter ahead of all the other boot devices. Don’t worry, if the network boot server is not available when your PC tries to boot in the normal manner – from the hard drive. Your PC will cycle through all the other bootable devices until it finds some device it can boot from – usually your hard drive. We have set the PC on the right to boot from its network adpater.
- Network connect the 2 PC’s to the private network using the hub and two cables. Just plug the cables into into each PC and then into the hub – its as easy as that.
- Find the vendor and model of the network adapter on the diskless workstation PC. This is very important. One of these PC’s will act as the boot server. The other PC will act as the diskless workstation. On the diskless workstation boot that machine into windows as normal and note the vendor, model, and type of the network adapter. You can find this as follows. Right-click MyConputer -> Properties -> Device Manger -> expand Network Adapters and write down what you see.
For our diskless workstation PC (the Compaq) we found we have a RealTek RTL-8139 Fast Ethernet adapter. it is very important that you know this piece of information.
As a final check use the KNOPPIX live CD and make sure each of the PC’s will boot from the CD and are fully functional – especially the network card. Note any special boot parameters you need for Knoppix. We will assume that ther are none.Note:
Set all but one machine to set to boot to pxe boot. This will vary from system to system. To do this you usally need to go into the bios and set the nic (network interface card or port) and set it to the first boot device.
You will also need to disable any settings for hard drives, floppys. or cd-roms (except for the system with the cdrom.
Step 3: Preparation Part Two.
Here is where we are:
- We have PC’s that are both capable of booting KNOPPIX from the Live-CD
- One PC is the boot server
- The other PC's are capable of booting off the network device and you have changed the BIOS boot order to put the Network device at the top of this list.
- Both PC’s are connected to a simple network using a hub and a couple of network cables.
Lets light this candle !!
- Place the KNOPPIX live CD in the drive of the PC acting at the boot server.
- Boot that PC into KNOPPIX
- Once KNOPPIX is fully booted choose to start the KNOPPIX terminal Server
Follow these cookbook instructions
Once you start the Terminal Server program it will ask you a bunch of questions. You can take almost all the default answers.
- Choose the ethernet adapter eth1 is our wire-line adapter
- Respond Yes to configure the adapter.
- Select the ethernet device from the list (if more than one)
- Respond NO to Obtain address dynamically (DHCP)
- Enter the IP address – take the default 192.168.0.49
- Network mask – take the default 255.255.255.0
- Broadcast address – take the default 192.168.0.255
- Gateway – take the default 192.168.0.1
- Nameserver – take the default 192.168.0.1
This completes the network configuration
Now the set up process is going to ask you some questions about the network.
Choose your network adapter from the list. If you can’t find your network adapter here – you are kinda out of luck – sorry. We are in luck.
- Next, make sure the network card of the TARGET PC is checked in the list
- Next you are presented with some security options – take the defaults
- Next boot options for the target PC. We assume there are none.
- Finally, choose Yes to start the terminal server
- You can start the syslog to watch your terminal server: Penguin-> “Start SYSLOG”
- You can also start WireShark to watch all the ethernet traffic: K -> Internet WireShark (as root) Network Analyzer
At this point the Terminal Server (boot server) should be running and waiting for requests from Diskless Workstations.
Step 4: Boot Me.
Boot the Diskless Workstation
Here is the moment of truth. Turn on the other PC. If everything goes right, if the O-rings did not freeze in the coolness of the early morning, you should see something like this (reference to NASA shuttle craft disaster of the 1980's).
The PC Pre eXecution Environment has done a broadcast to find a boot server, the boot server has answered. DHCP has assigned an address. An executable image is about to be transferred by a Tiny version of FTP.
The executable image is coming across the network
The image has been transferred and now control is passed to that image
Note the Terminal server Client has started – now the boot sequence continues as normal. If you need to enter special boot parameters – do that now. We have none, we hit the enter key and we are off and running booting the diskless PC from the KNOPPIX executable which was transferred from the boot server to this workstation over the network. Knoppix resides completely in RAM.
At this point your Diskless Workstation should be up and running KNOPPIX.
And, if you had WireShark running on the boot server you can see all the detail.
I saw it but I don’t believe it
If you don’t believe you can run Linux on a PC that has no drives – only memory - then try this experiment again but first remove the hard drive on the Laptop – or disconnect the cables to the hard drive on the desktop PC. It’s all happening across the network. Use the WireShark Network Analyzer on the boot server to watch the conversation between the two machines.
Step 5: Start Up.
Boot the clients if you have not already done so. The faster the network the better. 100m cards will work but using 1g cards and switches is better. I would recommend doing this with only one or two clients first to get the gist of it. You should be in business. If you have any questions, please feel free to ask. if for some reason all you have is just two computers and no switch, you can use a cross over cable. You can make one or get a cable and adapter at most decent electronic stores.
Now, you have servers that have virtual machines that can be delivered to the thin clients in stead of a terminal server client. Most larger businesses are going in the direction to save hardware and support costs.