Nfsroot

From openSUSE

How to prepare openSuSE for nfsroot

openSuSE 11.0 allows installation onto a NFS server, instead of your local harddrive.

Prepare the NFS server

What you need is a nfsserver, which exports the directory for the client. The /etc/exports should look like this:

$ cat /etc/exports
# export everything below this directory
/tftpboot       10.10.0.0/255.255.0.0(rw,async,insecure,anonuid=65534,anongid=65534,no_root_squash)

Now prepare the directory layout. This example shares tftp bootfiles with nfsroot files.

$ mkdir /tftpboot
$ mkdir /tftpboot/nfsroot
$ mkdir /tftpboot/nfsroot/client1
$ mkdir /tftpboot/nfsroot/client2
$ ln -sfvbn tftpboot/nfsroot /nfsroot
$ insserv nfsserver
$ rcnfsserver start

Now it should be possible to mount the nfs share from other clients. Try it, make sure the firewall on the nfsserver is not in the way.

Install the Client

While openSuSE 11.0 allows installation onto nfsroot via YaST, the installed system is barely useable. To minimize the pain, follow the instructions below carefully.

The network used during installation MUST be configured for STATIC IP addresses, DHCP is broken in the installed system.

  • Boot the installation medium with these additional commandline options, adjusted for your environment:
netsetup=1 hostip=10.10.2.36/16 gateway=10.10.0.8 nameserver=10.10.2.88 vnc=1
  • Disable the checkbox 'Use Automatic Configuration' in YaST.
  • In the Partitioner step, choose 'Create Partition Setup ...', then 'Custom Partitioning (for experts)'. Click on the button 'NFS...'.
  • In the window 'Add New NFS Path', enter the IP address of the NFS server, NOT the DNS name. Enter '/nfsroot/client1' as path on the NFS Server, and / as Mount Point.
  • Back in the 'Expert Partitioner', make sure no other mount point is enabled on your local disk, like swap and so on. Then leave the partitioner with the 'Next' button.
  • Enter the user information as you like.
  • In the installation settings screen, make sure no bootloader is installed. If yast wants to install the bootloader on your local harddisk, click on the 'Booting' link, then the 'Boot Loader Installation' tab. In the pulldown menu for the bootloader type, select 'Do Not Install Any Boot Loader'. Leave this window with the OK button.
  • Now start the installation with the 'Install' button
  • After the initial package installation, YaST will write an ifcfg-eth0 configuration file. But the START_MODE in this file is incorrect, it must be 'nfsroot'. Modify it on the NFS server, the location is /tftpboot/nfsroot/client1/etc/sysconfig/network/ifcfg-eth0 If you dont change the value, the startup scripts will shutdown the network interface and the root filesystem is not accessible anymore!