[PLUG] How to create the NFS root...
Michael C. Robinson
plug_1 at robinson-west.com
Tue Mar 30 08:28:34 UTC 2010
filesystem?
I have a hunch that I want to do an initial root file system that mounts
the machine specific root file system and pivots to it.
How do I go about doing this? I have a Linux from scratch system
that I am trying to get the necessary pieces from. The init scripts
are designed for local disk based booting, I need to create new ones.
A gentoo howto on diskless machines shows ip=dhcp with a share
assigned for the root filesystem that is obviously not a dynamic
reference. If I am doing 192.168.5.x for each work station
respectively, I should determine somehow at boot which share is needed
based on which machine is booting.
Any pointers on information about how to write rc scripts for system V
style init? What is the first script that gets executed during boot?
On a hunch, I figure that I need a customized etc, a copy of bin, sbin,
and lib off of the LFS system, a couple of directories for the kernel
to create an initial root file system along with a device directory.
I'm wondering if my initial root filesystem can use udev and how to
set that up? Directories such as home and usr should be, I figure,
separate NFS shares that are shared by all workstations.
The following shows the base directory for what I plan on exporting via
NFS:
[admin at goose ~]$ cd /nfsroot/lfsp3/
[admin at goose lfsp3]$ ls
boot eagle home usr vmeagle
The following is what I have so far for the initial root system:
[admin at goose lfsp3]$ cd boot
[admin at goose boot]$ ls
bin dev etc lib proc sbin srv sys
The following shows the local disk installation of Linux From Scratch on
the server side:
[admin at goose boot]$ ls /lfsp3/
bin dev home lost+found mnt proc sbin sys usr
boot etc lib media opt root srv tmp var
Note that there are some directories that I am not copying at all and so
far etc in the boot directory is being created from scratch.
So far what I have come up with does not allow for an initial console.
I suppose an initrd is an option, but I don't think I have to do that in
the traditional way. I'm thinking mount the machine specific NFS share
on the mounted root file system and do a chroot.
There are certain things I want to synchronize such as the password
files under etc, but I don't know how to go about that. It would be
nice if for workstation A there could be configuration information
specific to that machine. The purpose of this NFS root system is
to make doing backups to a network server easy. I am thinking an
nfs root system that can mount and dump local drives. I am also
intending to have network troubleshooting tools installed.
More information about the PLUG
mailing list