Current status: finished now we can use the machine as Unix machine
Current problem: We should make a file system (ramdisk) for /var
If NIC does not support PXE, we should buy NIC.
http://www.intel.com/products/desktop/adapters/pro1000gt/pro1000gt-overview.htm
Current known problem: not yet try
http://www15.big.or.jp/~yamamori/sun/pxe/nic.html http://docs.fedoraproject.org/install-guide/f10/
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!
ssh username@192.168.1.10
nugraha@rsaito-necPC:~$it means that we can access the server from the client.
172.17.4.178:# yum install busybox-anaconda
# yum install dhcp # yum install syslinux # yum install tftp-server # yum install nfs-utils # yum install system-config-netboot
# rpm -qa | grep syslinux syslinux-2.2.2.2.2
# 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
# mkdir /nfsboot
# rsync -v -a --exclude='/proc/*' --exclude='/sys/*' --exclude='/dev/*'\ --exclude='/media/*' --exclude='/tmp/*' --exclude='/misc/*'\ / nfsboot
# rsync -v -a -e ssh \ --exclude='/proc/*' --exclude='/sys/*' --exclude='/dev/*'\ --exclude='/media/*' --exclude='/tmp/*' --exclude='/misc/*'\ 172.17.4.178:/ /nfsboot
allow booting; allow bootp; ddns-update-style interim; ignore client-updates; subnet 192.168.1.0 netmask 255.255.255.0 { option subnet-mask 255.255.255.0; option broadcast-address 192.168.1.255; range dynamic-bootp 192.168.1.100 192.168.1.240; next-server 192.168.1.10; } host dell { # hostname hardware ethernet 00:21:70:c9:eb:60; # MAC address of NIC fixed-address 192.168.1.30; # corresponding IP address filename "/linux-install/pxelinux.0"; } class "pxeclients" { match if substring(option vendor-class-identifier, 0, 9) = "PXEClient"; next-server 192.168.1.10; filename "/linux-install/pxelinux.0"; }
# /sbin/service dhcpd restart # chkconfig dhcpd on (the last line is for activating dhcp on booting process)
% putty username@192.168.1.10
% ipconfig -a
In this case 00-21-70-c9-eb-60 (Dell PC).
/nfsboot 192.168.1.0/255.255.255.0(rw,no_root_squash,async) /nfsboot 172.17.4.0/255.255.252.0(rw,no_root_squash,async)
# Port rpc.mountd should listen on.
http://d.hatena.ne.jp/setq/20090312/1236853536
# mkdir /mnt/test # mount -v -t nfs 172.17.4.128:/nfsboot /mnt/test # cd /mnt/test # ls
[root@rsaito-necPC rsaito]# cat /etc/exports
# service nfs restart [root@rsaito-necPC etc]# cd /etc/rc5.d/ [root@rsaito-necPC rc5.d]# ./S60nfs restart Shutting down NFS mountd: [ OK ] Shutting down NFS daemon: [ OK ] Shutting down NFS quotas: [ OK ] Shutting down NFS services: [ OK ] Starting NFS services: [ OK ] Starting NFS quotas: [ OK ] Starting NFS daemon: [ OK ] Starting NFS mountd: [ OK ] [root@rsaito-necPC rc5.d]# ./S60nfs status rpc.mountd (pid 12153) is running... nfsd (pid 12150 12149 12148 12147 12146 12145 12144 12143) is running... rpc.rquotad (pid 12138) is running...
#system-config-netboot
Name fedora_10_32bit Explanation fedora_10_32bit
server 192.168.1.10 directory /nfsboot
IP address/subnet 255.255.255.0 <- we use subnet information operating system fedora_10_32bit
Other part should be as it is.
IP address
# cd /tftpboot/linux-install/pxelinux.cfg # mv default default.org # ln -s FFFFFF00 01-00-21-70-c9-eb-60
[root@rsaito-necPC pxelinux.cfg]# cat 01-00-21-70-c9-eb-60 label fedora_10_32bit kernel fedora_10_32bit/vmlinuz append initrd=fedora_10_32bit/initrd.img root=/dev/ram0 init=disklessrc NFSROOT=192.168.1.10:/nfsboot ramdisk_size=24753 ETHERNET=eth0 SNAPSHOT=255.255.255.0
[root@rsaito-necPC sysconfig]# cat network NETWORKING=yes HOSTNAME=pxe-fefoda10-dell
[root@rsaito-necPC network-scripts]# cat ifcfg-eth0 # Broadcom Corporation NetXtreme BCM5705_2 Gigabit Ethernet TYPE=Ethernet DEVICE=eth0 HWADDR=00:21:70:c9:eb:60 <---- set PXE client Mac address BOOTPROTO=none <---- change dhcp to none NETMASK=255.255.255.0 <---- set subnet mask IPADDR=192.168.1.30 <---- set fixed IP address GATEWAY=192.168.1.10 <---- now PXE server is gateway 172.17.4.0 ONBOOT=yes USERCTL=yes PEERDNS=yes USERCTL=no PEERDNS=yes IPV6INIT=no NM_CONTROLLED=no
# cd /boot # mkdir initrd-2.4.9 # cd initrd-2.4.9 # zcat ../initrd-2.4.9.img | cpio -i -c
# cd /boot/initrd-2.4.9 # find . | cpio --quiet -c -o | gzip -c > ../initrd-2.4.9-new.img
1. Run X -configure which makes /root/xorg.conf.new 2. cp /root/xorg.conf.new /etc/X11/xorg.conf 3. xorgcfg -texmode 4. startx 5 if it does not work, edit /etc/X11/xorg.conf (Change driver from ati to vesa? 6. startx again
# Xorg -configure
Then /root/xorg.conf.new generates. Check this files works well
# X -config /root/xorg.conf.new
If X starts nicely, press [Ctrl]+[Alt]+[F1] to go back to console.
# mv /etc/X11/xorg.conf /etc/X11/xorg.conf.old # mv /root/xorg.conf.new /etc/X11/xorg.conf
That is all. Reboot this.
http://argon.bus.osaka-cu.ac.jp/index.php?Xorg%20%A4%CE%C0%DF%C4%EA
net.ipv4.ip_forward = 1
for runntine
# echo 1 > /proc/sys/net/ipv4/ip_forward
for setting
# sysctl -p net.ipv4.ip_forward = 1 net.ipv4.conf.default.rp_filter = 1 net.ipv4.conf.default.accept_source_route = 0 kernel.sysrq = 0 kernel.core_uses_pid = 1
Then System-> Administration -> Fireall Then select Masquerading Check -- All eth+ devices -- then apply.
# service network restart
http://www.linux.or.jp/JF/JFdocs/Authentication-Gateway-HOWTO/setup.html
http://tomo.ac/goodstream/fedoracore/fc3/fw-fc3.html
http://lumber-mill.co.jp/gallery/view/tips/linux/fedora
When we try to find "disklessrc fedora", we found the following Web site.
http://d.hatena.ne.jp/adsaria/20080131/1201792574 http://wikiwiki.jp/disklessfun/?FrontPage
su - cd /tftpboot cp /usr/lib/syslinux/pxelinux.0 .
DEFAULT pxeboot TIMEOUT 50 LABEL pxeboot KERNEL vmlinuz APPEND initrd=initrd.img ONERROR LOCALBOOT 0
# /sbin/chkconfig tftp on
# dhcpd.conf # common place for all use-host-decl-names on; host name and the host name in config file are the same default-lease-time 600; max-lease-time 7200; # # common for a subnet, we can make a group of host by "host", too subnet 192.168.197.0 netmask 255.255.255.0 { # range 204.254.239.10 204.254.239.20;? in the case of dynamic IP address option domain-name "dc2.kek.jp"; option broadcast-address 192.168.197.255; option routers 192.168.197.1; } # #host entities The following is how to set static IP address(bootp type) host n011 { since use-host-decl-names is on, we can use the host name hardware ethernet 00:D0:B7:1B:12:ED; MAC address fixed-address 192.168.197.31; static IP address for n011 option dhcp-class-identifier "PXEClient"; needed for PXE option next-server 192.168.197.11; specify for PXE server is provided by PXE Proxy DHCP server } # vendor-encapusulated option "next-server" can specify PXE server
http://www.atmarkit.co.jp/flinux/rensai/linuxtips/a021pxediskless.html
http://www.devdrv.co.jp/linux/cpio-initrd-format.htm
http://blogs.yahoo.co.jp/natto_heaven/11513467.html
# 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
[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/
# cd /tftpboot # chcon -R -t type .
# ls -Z .