You are not logged in.

#1 2016-06-01 23:05:07

Oldmoth
Member
Registered: 2013-01-25
Posts: 24

PXE Server with NFS share; too many levels of symbolic links

I am setting up a PXE sever. The long term goal is to have the server run in a VM, however I have been testing it from a physical machine.
The problem I'm running into is in setting up the server in VM (virt-manager), the NFS share and PXE server work very well running from the physical machine, the share is accessible from other machines and shows the mounted image within it. PXE booting works beautifully.

The problem only occurs within the VM which is a fresh updated install.

Within the VM I have setup the PXE server, my problem is with the NFS share, I think.
Mounting the share outside the VM when it is empty is fine.
Mounting the share outside the VM when the .img I am trying to boot is mounted in the directory gives me  too many levels of symbolic links from mount.nfs and mounting it with gvfs in Thunar tries to open the folder as a text file that fails to open.
Attempting to boot the .img over the PXE server I receive  ERROR: Root device is mounted successfully, but /sbin/init does not exist.

I am fairly certain there is no problem with the .img itself, it works using the PXE server I set up on the physical machine and adding init=/lib/systemd/systemd doesn't change the error except it then it won't find that.

I believe the error is somewhere in NFS or how I am mounting the .img.

The .img is mounted either via the /etc/fstab entry;

/root/pxe-image.img /mnt/pxe-image loop,offset=1M 0 0

or the command

mount -o loop,offset=1M pxe-image.img /mnt/pxe-image

The NFS export is;

/mnt/pxe-image *(rw,no_root_squash,no_subtree_check)

As far as I know everything is set up the same in the VM as the physical machine. If you need more info or my description was a bit confusing please ask for clarification. What I am essentially doing is setting up a way to boot a diskless system that boots to a custom img.

Offline

#2 2016-06-02 00:50:53

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,362

Re: PXE Server with NFS share; too many levels of symbolic links

You do know you can boot an existing PXE regardless of the client?  You can boot the same image from a physical client or from within the VM.   Some VMs implement this differently.  You could use a gPXE iso file in your VM's CD ROM to boot your PXE.


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#3 2016-06-02 03:15:06

Oldmoth
Member
Registered: 2013-01-25
Posts: 24

Re: PXE Server with NFS share; too many levels of symbolic links

Yes, the client isn't my problem. The physical machine I talk about is my laptop that is a PXE server that runs as it should. The VM is me trying to rebuild this PXE server in a VM. Or are you saying that the VM PXE server will act differently from a physical PXE server. Sorry if I have misunderstood.

Offline

#4 2016-06-02 11:31:35

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,362

Re: PXE Server with NFS share; too many levels of symbolic links

Oldmoth wrote:

Yes, the client isn't my problem. The physical machine I talk about is my laptop that is a PXE server that runs as it should. The VM is me trying to rebuild this PXE server in a VM. Or are you saying that the VM PXE server will act differently from a physical PXE server. Sorry if I have misunderstood.

If you already have a PXE installation, there's not really any need to recreate it inside of the VM.  You just engage your VMs PXE booting capabilities to use it.  Furthermore, you can automate the process of selecting a different image based on the client's MAC via pxelinux. Especially with Arch, it can be moved from machine to machine or a PXE installation and it should still work.  Not encumbered by Windows that will only lock down to the machine that it was installed on.


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#5 2016-06-03 05:56:35

Oldmoth
Member
Registered: 2013-01-25
Posts: 24

Re: PXE Server with NFS share; too many levels of symbolic links

I want to run the PXE server in a VM.
I'm trying to figure out the difference between the physical implementation of the PXE server and the virtual implementation of the PXE server. The PXE server is fairly irrelevant to the whole thing, I'm really having a problem with what I think is the NFS server component.

Offline

Board footer

Powered by FluxBB