[by Nugraha and Saito, 2009.05.09]

Current status: Not finished yet. We suceeded dhcp and tftp initial files.

Current problem: Error Kernel panic: not found /init during starting linux

Current known problem: The original unix is 64bit but diskless machine is 32bit?

We want to make a diskless computing system so that we need a PXE Server. PXE stands for "Pre-boot eXecution Environment". PXE is a special extension of services provided by the Dynamic Host Configuration Protocol (DHCP). It uses a Trivial File Transfer Protocol (TFTP) server to provide minimal boot to a network client. Let's try to configure it!

Set a small subnet for testing PXE

What we need

Checking

Network setting

SSH check

Setting for the original Linux machine from which we copy the system

172.17.4.178:# yum install busybox-anaconda

Setting for the PXE server machine

Install DHCP and TFTP Server etc

TFTP Configuration

# default: off
# description: The tftp server serves files using the trivial file transfer \
#       protocol.  The tftp protocol is often used to boot diskless \
#       workstations, download configuration files to network-aware printers, \
#       and to start the installation process for some operating systems.
service tftp
{
       disable                 = no
       socket_type             = dgram
       protocol                = udp
       wait                    = yes
       user                    = root
       server                  = /usr/sbin/in.tftpd
       server_args             = -s /tftpboot
       per_source              = 11
       cps                     = 100 2
       flags                   = IPv4
}
# service xinetd restart

Copy system data for booting

# rsync -v -a -e ssh \
--exclude='/proc/*' --exclude='/sys/*' --exclude='/dev/*'\
--exclude='/media/*'   --exclude='/tmp/*' --exclude='/misc/*'\
172.17.4.178:/ /tftpboot/f9/root
# cd /tftpboot
# chcon -R -t type .
# ls -Z .

DHCP Configuration

# /sbin/service dhcpd restart
# chkconfig dhcpd on
(the last line is for activating dhcp on booting process)

NFS configuration

[root@rsaito-necPC rsaito]# cat /etc/exports
/tftpboot/f9/root 192.168.1.0/255.255.255.0(ro,sync,no_root_squash)         
/tftpboot/f9/snapshot  192.168.1.0/255.255.255.0(rw,sync,no_root_squash)    

PXE server configuration

[root@rsaito-necPC rc5.d]# cd /tftpboot/f9/snapshot/
[root@rsaito-necPC snapshot]# ls -l
total 12
drwxrwxr-x 8 root root 4096 2009-05-09 08:57 255
-rw-r--r-- 1 root root 1070 2008-08-26 19:09 files
-rw-r--r-- 1 root root    7 2009-05-09 08:52 files.custom
[root@rsaito-necPC snapshot]# cat files.custom
/home/
Name f9-diskless
Explanation Fedora core 9
server 192.168.1.10
directory /tftpboot/f9/root
IP address/subnet 255.255.255.0  <- we use subnet
operating system f9-diskless
snapshot name 255    X generate
[root@rsaito-necPC 255]# pwd
/tftpboot/f9/snapshot/255
[root@rsaito-necPC 255]# ls
boot  etc  home  lib  root  var
# cd /tftpboot/linux-install/pxelinux.cfg
# mv default default.org
# ln -s FFFFFF00 01-00-21-70-c9-eb-60

Edit initrd.img for NFS mount

http://www.atmarkit.co.jp/flinux/rensai/linuxtips/a021pxediskless.html

http://www.devdrv.co.jp/linux/cpio-initrd-format.htm

# cp /tftpboot/linux-install/f9-diskless/initrd.img /tmp
# cd /tmp
# mkdir initrd.test
# cd initrd.test
# cp ../initrd.img .
# mkdir initrd
# cd initrd
# zcat ../initrd.img | cpio -i -c
# cd /sbin
# cp /sbin/mount.nfs .
# cp /sbin/umount.nfs .
# cp /sbin/mount.nfs4 .
# cp /sbin/umount.nfs4 .
# cd ..
# find . | cpio --quiet -c -o | gzip -c > ../initrd-new.img
# cd /tftpboot/linux-install/F9-diskless/
# mv initrd.img initrd.img.org
# cp /tmp/initrd-test/initrd-new.img ./initrd.img

Set PXE client


Current problem of Kernel Panic


The following is the statements which are evetually not used.


Front page   New Page list Search Recent changes   Help   RSS of recent changes