pavement

X Windows Terminal

From FreeBSDwiki
(Difference between revisions)
Jump to: navigation, search
(Install and setup dhcp)
(GRUB Floppy boot)
Line 72: Line 72:
 
To get started we downloaded the image from www.hp.uab.edu/~ed/grub-net
 
To get started we downloaded the image from www.hp.uab.edu/~ed/grub-net
  
# dd if=/data/grub-net.img of=/dev/fd0
+
shell# dd if=/data/grub-net.img of=/dev/fd0
  
 
Then we mounted it as msdos
 
Then we mounted it as msdos
Line 117: Line 117:
  
 
shell# dhcpd
 
shell# dhcpd
 +
 +
===Setting NFS===
 +
 +
<pre>
 +
# mkdir /diskless_ro
 +
# chmod 444 /diskless_ro
 +
 +
# mkdir /diskless_rw
 +
# chmod 777 diskless_rw
 +
</pre>
 +
 +
Make directories for each IP for your clients
 +
<pre>
 +
# cd /diskless_rw
 +
# mkdir 192.168.1.XXX
 +
# cd 192.168.1.XXX
 +
# mkdir etc var
 +
 +
</pre>
  
 
===Starting diskless system through GRUB===
 
===Starting diskless system through GRUB===

Revision as of 23:05, 17 March 2006

X Windows can be used in a Server-Client relationship. By setting up your X Windows Server you allow the use of all the programs on that computer to all the client PC's.

There are many advantages of running client computers in this manner:

  • They don't even need a hard drive.
  • It's silent as there are no moving parts
  • The solution saves power as your computers are very thin.
  • Everything can be backed up centrally.
  • Boot times for client PC's are the fastest around.
  • Clients don't need much CPU speed, memory, etc. Because of this they would be very cheap. You could get away with using a Pentium 100Mhz with 32MB ram, no hard drive, no CD-ROM, no Floppy and a fanless power supply. You just need a ethernet card with a PXEBOOT ROM.

    Contents

    Running a single application

    To get started I have my server setup running FreeBSD, with X-Windows and a few applications. Nothing too special. Then I have my client PC, which to start off I used the freesbie 1.1 boot CD to perform these initial tests. You can get this from www.freesbie.org. I entered into fluxbox, but you could equally use xfce4.

    client# xhost +

    This allows all computers to start applications on your client PC. It's dangerous but good for testing everything is setup correctly.

    client# ssh <server user@server ip>

    eg: ssh mick@192.168.1.1


    ssh$ DISPLAY=<client ip>:<client display>; export DISPLAY

    eg: DISPLAY=192.168.1.2:0; export DISPLAY


    ssh$ xcalc &

    This should display on your client

    Running a whole X Windows Session (XDM)

    server

    edit: /usr/X11R6/lib/X11/xdm/xdm-config

    comment out with a '!' the request line
    DisplayManager.requestPort: 0

    edit:
    /usr/X11R6/lib/X11/xdm/Xaccess

    to have a single asterisk any where in the file, so the contents should be one asterisk and the rest commented out.

    Make sure your firewall has all traffic for you lan. (Need to know which exact ports to allow).

    create ~/.xsession for each user which requires access and enter your start up for x eg:

    shell#!/bin/sh
    startkde

    run xdm on server as root

    client

    make sure your not in X

    type this command:

    shell# X -broadcast

    This assumes that you are running only one server. Otherwise use:

    shell# X -query 192.168.1.2

    GRUB Floppy boot

    (would like to compile this ourselves later) To get started we downloaded the image from www.hp.uab.edu/~ed/grub-net

    shell# dd if=/data/grub-net.img of=/dev/fd0

    Then we mounted it as msdos Remove/rename menu.1st from the grub directory as it was doing something funny with it. We think that it was looking for a tftp server through our dhcp and we don't have a the dhcp setup correctly here, so we wanted to do it manually.

    Reboot off the floppy now..

    grub> ifconfig --address=192.168.1.2 --mask=255.255.255.0 --gateway=192.168.1.1 --server=192.168.1.2

    OR you can use dhcp
    grub> dhcp
    grub> tftpserver 192.168.1.2


    Setup tftp on your server, we created a directory /tftpboot.

    Install and setup dhcp

    install /usr/ports/net/isc-dhcp3-server

    We do this so we can define the root path for the diskless system.

    edit /usr/local/etc/dhcpd.conf

    option domain-name "iinet.net.au";
    option domain-name-servers 203.0.178.191;
    
    # The shared root file system of diskless workstation
    option root-path "192.168.1.2:/diskless_ro";
    
    # The server from which to upload the initial boot-file (loads tftp server)
    next-server 192.168.1.2;
    
    default-lease-time 3600;
    max-lease-time 86400;
    ddns-update-style none;
    
    subnet 192.168.1.0 netmask 255.255.255.0 {
            range 192.168.1.10 192.168.1.30;
    
            # Set up default gateway
            option routers 192.168.1.1;
    }
    

    shell# dhcpd

    Setting NFS

    # mkdir /diskless_ro
    # chmod 444 /diskless_ro
    
    # mkdir /diskless_rw
    # chmod 777 diskless_rw
    

    Make directories for each IP for your clients

    # cd /diskless_rw
    # mkdir 192.168.1.XXX
    # cd 192.168.1.XXX
    # mkdir etc var
    
    

    Starting diskless system through GRUB

    These commands are half working...
    grub> root (nd)
    grub> kernel /kernel root=ad0s1a
    grub> pxeboot

    Completely Diskless System (PXEBOOT ROM)

    Running completely diskless by booting from a Network ROM Chip.

    Coming soon...

    links

    http://www.nber.org/sys-admin/FreeBSD-diskless.html

    http://www.onlamp.com/pub/a/bsd/2004/09/09/diskless_server.html

  • Personal tools