Before starting, the client has no operating system or floppy disk or hard disk, it only has the basic components of the computer: CPU, memory, motherboard, etc. But the most important thing is to have the NIC and start the bootrom. The client can only obtain the operating system from the network. Linux diskless remote boot and Novell, Winnt under the diskless boot technology is not the same, not the use of RPL (Remote Initial program Loader), but based on the standard BOOTP/DHCP and TFTP protocol, And the file system is established through NFS file system. Compared with the first two kinds, it has more versatility and adaptability. Dos,win95,winnt and Linux customers can be started remotely based on Linux systems.
Because of their own network card (3c905b-tpo100, there is a bug, according to the etherboot of the instructions did not modify the success, is now a floppy disk instead of an EPROM, not much to say, but also please go directly to the http://sourceforge.net/ Download the required source code, etc. or to compile their own source code required.
The following is a brief introduction to Linux startup principles:
1. After the client PC is turned on, the TCP/IP bootrom gain control right before doing self test.
2.Bootprom send out BOOTP/DHCP request and get IP.
3. If the server receives the request from the personal computer, it will send back the BOOTP/DHCP response, including the client's IP address, the preset gateway and the boot image file. Otherwise, the server ignores this requirement.
4.Bootprom Download the boot image file from the server by the TFTP communication protocol.
5. PC through this boot image file boot, this boot file can be just a simple boot program can also be operating system.
6. The boot image file will contain kernel loader and compressed kernel, which will support the NFS root system.
7. The remote client starts the machine according to the downloaded file.
All OK!!! It's easy! Here's how to build a Linux remote boot.
Second, remote boot instance
As an example defines the following:
Linux Server: Server (ip:192.168.0.254)
First client: PC01 (ip:192.168.0.1)
Second client: PC02 (ip:192.168.0.2)
All remote Boot customer directory:/client
First Remote boot client directory:/CLIENT/PC01
Second Remote boot client directory:/CLIENT/PC02
Support Rsh
First recompile the Linux kernel.
Make Menuconfig
Attention to network support, Nfs-root support, BootP (DHCP) support must be included.
Make clean
Make DEP
Make Bzimage
Make modules
Make Modules_install
After the above command, you will find the client-initiated image file in the/usr/src/linux/i386/boot directory, after compiling the new kernel, with Mknbi-linux (Mknbi-linux bzimage VMLINUZ.NB) processing, the VMLINUZ.NB can be placed under the/tftpboot.
Then execute the following command: Mknod/dev/nfsroot B 0 255 modifies the boot device to point to Nfsroot.
The following modifies the server for the remote client to establish the file system for the remote client.
To set up a remote client directory on the server:
/client
/client/pc01
/client/pc02
Let's talk about PC01 's practice.
The PC01 directory includes: Bin,dev,etc,home,lib,mnt,proc,root,sbin,tmp,usr,var directory.
We are completely copying Bin,dev,etc,lib,sbin,usr,var directly, Home,mnt,proc,root,tmp is a new empty directory, (at that time was reinstalled a support including Dhcp,nfs,rsh, as small as possible, As clean as possible Linux, and then completely copy them all over, so there must be a lot of unnecessary things can be deleted, but now the level does not follow, according to the reference to do not succeed, had to use this convenient way: (, etc. later slowly delete unnecessary documents)
Note that the/CLIENT/PC01/ETC/RC.D boot file must be modified: MOUNT-AVT Nonfs is mount-av. The NFS root file system is allowed. (We're Debian Woody, this file has changed to/client/pc01/etc/init.d/mountall.sh, and our mount-a-t NOPROC,NOSMBFS)
Modify the/client/pc01/etc/fstab file in the following format:
192.168.0.254:/client/pc01/nfs DEFAULTS,RW 0 0
192.168.0.254:/home/home NFS RW,BG 0 0
PROC/PROC proc Defaults 0 0
Finally, verify that the NFSD,TFTPD and BOOTPD daemons on the server are started.
All done! The remote boot will soon be available in about 10 seconds to enjoy Linux.
For NFS,TFTP,BOOTP (DHCP) settings, see How-to.
As a point of thumb, it's best to put all of the client's files in a separate partition so that you can install a basic system (like a normal installation) on the partition. And then as a basis for modification (the recommended use of Debian is easier to crop). If you need to install any software on the client at a later time, you can do this:
Chroot/client/pc01
Dselect or Apt-get.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.