LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How do I create an NFS server that boots from CD? (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-create-an-nfs-server-that-boots-from-cd-873647/)

redjoy 04-07-2011 03:30 PM

How do I create an NFS server that boots from CD?
 
I am new to linux but know enough to throw around terminology, install the OS, use the GUI, and the ls command from a terminal window. ;)

Now I would like to boot any PC and make it work as an NFS Server.

I like the concepts of liveCDs as they usually have drivers to recognize current and prior hardware to some extent.

However, I do not need any GUI or any other services/applications; only what is required to run the NFS server and possibly copy/move files between exported folders from the command line.

My questions are
Does anyone already have such a CD?

Can a liveCD be modified with a script to boot up as an NFS Server based on the following list?

How do go about creating a bootable NFS Server based on the following list?


The NFS Server should do this upon boot:

- Check for NIC - eth0(?)
- if not present, stop booting with error message.
- if present, assign a specific IP address, mask, gateway.

- Check for existing harddrive.
- if not present, stop booting with error message.
- if present,
- Check for a specific folder to export, i.e., /data
- Ask if another folder should be created and exported.
- Defaults to no and should continue after 10 seconds.

- Give server a specific name.
- Root password would be the name of the server.

- Create a specific default user.
- Password would be defaulted to specific value.
- This user should be automatically logged in.


Thanks in advance.

szboardstretcher 04-07-2011 03:34 PM

Quote:

Originally Posted by redjoy (Post 4317368)
Now I would like to boot any PC and make it work as an NFS Server.

FreeNAS will do this, if you are interested in it.

http://sourceforge.net/projects/freenas/

redjoy 04-07-2011 03:45 PM

Thanks. I will check them out and return back next week. :)

jefro 04-07-2011 05:16 PM

Almost every live cd has the ability to be a nfs server so it is trivial to make a script to do what you want and add it in.

The tasks you need are easy to do if we either know a base that you wish to start with or a distro you want to modify.

redjoy 04-08-2011 09:58 AM

Quote:

Originally Posted by jefro (Post 4317462)
Almost every live cd has the ability to be a nfs server so it is trivial to make a script to do what you want and add it in.

The tasks you need are easy to do if we either know a base that you wish to start with or a distro you want to modify.

I am not concerned so much as what base I would use or which distro as long as the script can be easily added as the default boot up by modifying the cd and burning it.

I am not familiar enough with creating such script. :) Also, I am willing to learn.


@szboardstretcher: I went to FreeNAS and it seems that all I need to do is install once, configure AND save from web interface, and then use the config.xml file for an embedded install.

jefro 04-08-2011 08:11 PM

A script has to be exact to work. One for a debian distro may not work for OpenSuse.

If you want to see how a script works on knoppix then get almost any 3.x to 6.x cd or dvd and see the scripts that are run for knoppix terminal server. That sets up a nfs server tftp bootp and copies an image to be used to boot a pxe client.

redjoy 04-08-2011 11:19 PM

Quote:

Originally Posted by jefro (Post 4318651)
A script has to be exact to work. One for a debian distro may not work for OpenSuse.

I know scripts are unique to a distro. What I meant was that I am concerned which distro to use. This opens up the question to anyone who may have or know how to write a specific script. :)

jefro 04-09-2011 04:32 PM

The forum is full of folks that can help you on almost any task.

If you decide on a base then post that question singular. I and maybe others find it hard to follow posts that ask a few questions per thread.

I have used this list and others for maybe as long as it is been up. http://www.livecdlist.com/

Is there one that exactly meets your post. No. I don't think so.

There is no live cd made that can boot any system. So that part is out.

Can you make one a live cd? Yes. Easy to hard depending on the source. Some disto's let you built what you want with some automated program or web page. Others allow you a build setup locally and you plug in what you want. Others let you build from scratch using their docs.

Can you take one and modify it? Easily in almost all cases. Starting a nfs server is usually easy. Setting your settings are simple for the helpers online here.

NO gui , easy. Either start any common gui based in telint 3 or init 3 or get a non-gui distro.


All times are GMT -5. The time now is 04:32 PM.