****************************************************************************** * * Documentation/arm/ep93xx/nfs.txt * * NFS configuration howto for the EDB93XX platform * * Copyright (c) 2003 Cirrus Logic, Inc * ****************************************************************************** The configuration described in this document will enable the EDB93XX Linux to mount a network file system as the root file system during Linux boot. With this configuration you don't need to load a ramdisk image to the EDB93XX platform, or program the ramdisk image into EDB93XX flash. But, you do need to enable a Linux host to serve up a network file system to the EDB93XX Linux platform. This document describes how to configure both the Linux host and the Linux kernel for the EDB93XX target platform. HOST SETUP: 1. Create a directory on the Linux host pc. This directory will be exported to the ep93xx Linux target platform as it's root file system in place of a ramdisk image. Set up the root file system by copying the contents of the ramdisk image, included with the Linux sources, to the directory created on the Linux host. The ramdisk image is compressed. To mount it we'll have to un-compress it first: >> gunzip ramdisk.gz Use the following command to mount the ramdisk image (must have root privileges to execute this command): >> mount ramdisk -o loop where is the directory to mount the ramdisk file system. This directory should be different from the nfs directory created earlier in this step. Once the ramdisk image is mounted, copy the contents of the mounted ramdisk to the newly created nfs directory: >> cp /* /. where is the directory where the ramdisk image was mounted and the is the directory created for the nfs root file system. 2. Add the directory which will be exported to the Nexus target to the /etc/exports file. You can use the Linux NFS Server Configuration Tool (for Red Had 9, /usr/bin/redhat-config-nfs) to set this up or add a line to the /etc/exports file directly. For example, /mnt/nfs is the directory exported to ep93xx for this example, and here's what the Linux host /etc/exports file looks like: /mnt/nfs *(rw,no_root_squash,insecure) To achieve the above settings in the /etc/exports file using the NFS Server Configuration Tool, launch the tool and select the "Add" button to add a new exported directory. From the "Basic" tab, type the directory name in the "Directory" field, enter a "*" in the "Host(s)" field, and in the "Basic Permissions" section, select "Read/Write". From the "General Options" tab, select "Allow connections from ports 1024 and higher" and "Sync write operations on request". From the "User Access" tab, select "Treat remote root user as local root". This is very insecure! This will essentially give read and write permissions to everyone. You may want to add a more secure entry to your exports file. 3. Execute the following command: >> /usr/sbin/exportfs -a 4. An NFS startup script can be found in the /etc/init.d directory. To launch the nfsd, execute the following: >> /etc/init.d/nfs start Alternatively, if an nfs startup script does not exist in /etc/init.d, launch nfsd with the following command: >> rpc.nfsd 1 5. Verify that nfsd is running with the following command: >> /usr/sbin/rpcinfo -p he results should look something like this: program vers proto port 100000 2 tcp 111 portmapper 100000 2 udp 111 portmapper 100024 1 udp 831 status 100024 1 tcp 833 status 100003 2 udp 2049 nfs 100003 3 udp 2049 nfs 100021 1 udp 1024 nlockmgr 100021 3 udp 1024 nlockmgr 100021 4 udp 1024 nlockmgr 100011 1 udp 841 rquotad 100011 2 udp 841 rquotad 100011 1 tcp 844 rquotad 100011 2 tcp 844 rquotad 391002 2 tcp 1044 sgi_fam 100005 1 udp 788 mountd 100005 1 tcp 790 mountd 100005 2 udp 793 mountd 100005 2 tcp 795 mountd At a minimum, you should see nfs, mountd and portmapper. If you have problems setting up an nfs server on your host, take a look at this howto webpage: http://nfs.sourceforge.net/nfs-howto TARGET SETUP: 1. edit the Linux kernel command line options in arch/arm/def-configs/ep93xx_nfs. The line of code looks like this: CONFIG_CMDLINE="root=/dev/nfs nfsroot=: video=ep93xxfb ip=dhcp" Edit the nfsroot=: options such that is the IP address of the Linux host which will serve the network file system, and is the path to the directory which will be served as the root file system to the ep93xx Linux target. 2. To build the Linux kernel for EDB93XX with NFS support here are the configuration options needed for nfs support: Disable the following option: Block Devices --> Initial RAM disk (initrd) support Enable the following options: File Systems --> Kernel automounter support Network File Systems --> NFS file system support Root File system on NFS 3. When shutting down Nexus with an NFS root files system, use either the halt command or the control-alt-delete key sequence. This forces the nfs client to unmount the nfs file system. For more information on how to set this up take a look at the file nfsroot.txt in the linux Documentation directory.