How to pxe boot cent os 7
-
@dureal99d As George already mentioned you need to have your files exported via NFS to make them accessible for the booting kernel. Please post your
/etc/exports
file here. Configure/var/www/fog/service/ipxe/ubbuntu6_64/
to be exported if it’s not yet. -
@Sebastian-Roth said in How to pxe boot cent os 7:
@dureal99d As George already mentioned you need to have your files exported via NFS to make them accessible for the booting kernel. Please post your
/etc/exports
file here. Configure/var/www/fog/service/ipxe/ubbuntu6_64/
to be exported if it’s not yet.Here is my exports file, I have since tried to boot fedora with the same result and being as it is a cent os derivative, I figured id get the same result as that’s exactly what I got.
here is my exports config.
/images *(ro,sync,no_wdelay,no_subtree_check,insecure_locks,no_root_squash,insecure,fsid=0)
/images/dev *(rw,async,no_wdelay,no_subtree_check,no_root_squash,insecure,fsid=1)
/var/www/fog/service/ipxe/16.04.1_64 *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
/var/www/fog/service/ipxe/16.04.1_32 *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
/var/www/fog/service/ipxe/15.10_64 *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
/var/www/fog/service/ipxe/15.10_32 *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
/var/www/fog/service/ipxe/kubuntu6_64 *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
/var/www/fog/service/ipxe/kubuntu6_32 *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
/var/www/fog/service/ipxe/kubuntu5_64 *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
/var/www/fog/service/ipxe/kubuntu5_32 *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
/var/www/fog/service/ipxe/lm18_32 *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
/var/www/fog/service/ipxe/lm18_64 *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
/var/www/fog/service/ipxe/lm_32 *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
/var/www/fog/service/ipxe/lm_64 *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
/var/www/fog/service/ipxe/lmc_32 *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
/var/www/fog/service/ipxe/lmc_64 *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
/var/www/fog/service/ipxe/Centos *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
/var/www/fog/service/ipxe/bootcd *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
/var/www/fog/service/ipxe/ubcd *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
/var/www/fog/service/ipxe/fedora *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)this is the code ive used.
kernel http://${fog-ip}/fog/service/ipxe/fedora/images/pxeboot/vmlinuz
initrd http://${fog-ip}/fog/service/ipxe/fedora/images/pxeboot/initrd.img
imgargs vmlinuz root=/dev/nfs boot=nfs netboot=nfs nfsroot=${fog-ip}:/var/www/fog/service/ipxe/fedora/
boot || goto failed
goto start -
@dureal99d I guess I’ll start with a simple statement wow, that’s quite an nfs export.
I would (personally) collapse them down to this
/var/www/fog/service/ipxe *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
Actually if it was me I would move my files out of the fog directory all together to avoid them from being clobbered during an upgrade.
I might put them into some place like /opt/bootimgs and then export that location. You should be able to map a directory below your mount (share) point. So if you share /opt/bootimgs you should be able to mount /opt/bootimgs/Centos I would test this from another linux server by using the following command
mount -t nfs <fog_server_ip>:/opt/bootimgs/Centos /mnt
just to make sure it mounts over correctly with only sharing the /opt/bootimgsYour advanced menu code for fedora looks spot on. You have to be sure that the vmlinuz file you use is capable of network booting via nfs. Not all of them are. I personally would start with live media for all platforms you want to pxe boot. The distributions should give you guidance on what you have to configure for kernel parameters to pxe boot the target computer.
-
@george1421 said in How to pxe boot cent os 7:
that’s quite an nfs export
Ill try your suggestion and let you know how it goes
-
@george1421 said in How to pxe boot cent os 7:
I guess I’ll start with a simple statement wow, that’s quite an nfs export.
+1, that is an insane exports file. I concur with George. You should simplify… a lot.
-
@george1421 said in How to pxe boot cent os 7:
/var/www/fog/service/ipxe *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
that one liner is pretty nice
-
@Wayne-Workman @george1421
I am getting no such file or directory exist , how do i fix this?“bash: 192.168.1.109: No such file or directory”
-
@dureal99d I’m not sure how much you know, but it doesn’t hurt you or future readers to just re-iterate what I know.
The /etc/exports file is for Network File System exports. This is how Linux natively shares files across a network.
http file distribution is done via Apache or nginx or some other http service, and is NOT nfs. these paths you have in your original post, they are web paths. Such as:
http://${fog-ip}/fog/service/ipxe/Centos/images/pxeboot/initrd.img
This is a web path. This would be accessible if you plugged the fully expanded URL into a web browser. This is not via NFS, but via HTTP using apache to serve it.Please post a picture of the error you’re getting, it’ll help us figure out what’s going on.
-
-
@Wayne-Workman I see, well clearly i have a lot to learn about nfs. and i am at another station trying to “linux” of course trying to mount the share.
-
@dureal99d I’d suggest you move all that stuff to somewhere else besides a web directory. This is a rather very nasty setup IMO - and as it is this is absolutely going to fill some partition somewhere eventually as FOG makes a complete copy of the web directory each time you re-run the installer (to update or to troubleshoot). You need to put this stuff elsewhere.
-
Where are you seeing no such? Is it in ipxe or just in cli? It appears, to me, your cli is wrong as you have <> in the cli around the IP. This is incorrect, or so I thought. It should be ip:/path/to/mount
-
@Wayne-Workman said in How to pxe boot cent os 7:
directory. This is a rather very nasty setup IMO - and
Ok I’m in the middle of moving it all to the suggested location as we speak.
-
@Tom-Elliott said in How to pxe boot cent os 7:
Is it in ipxe or just in cli
my cli is clearly wrong then as I just copied and pasted what @george1421 put a command I should use to mount and now that I look at it I probably read it wrong
-
@dureal99d it was right. In Linux when describing and line it’s quite common to use <> as a means to say: replace with… Just remove the <> and change the string for your setup
-
@Tom-Elliott ok so i did as suggested and now i get this
mount: wrong fs type, bad option, bad superblock on 192.168.1.109:/opt/bootimgs/fedora,
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount.<type> helper program)In some cases useful info is found in syslog - try dmesg | tail or so.
-
@dureal99d our Troubleshoot NFS article linked below explains troubleshooting NFS as it relates to FOG, might help you with understanding.
But let’s take a basic example?
The images directory. It’s exported as such:
/images *(ro,sync,no_wdelay,no_subtree_check,insecure_locks,no_root_squash,insecure,fsid=0)
Say that server’s IP address is 10.0.0.4. From a remote Linux box, I’d mount this NFS shared directory to a local directory called
/mnt
as such:mount 10.0.0.4:/images /mnt
Now, if I were to try to describe to you how to do this but try to also say “replace this field”, I might say:
mount <your IP here>:/images /mnt
all this means is completely remove the left & right carrots and put an IP there instead.But, to the root of the issue, it looks like your boot menu is using
http
which has absolutely nothing to do with NFS at all. Completely nothing to do with it.If you were to put your ISOs somewhere else, and create a soft symbolic link to them somewhere in the web directory, and then set permissions properly and path your menu properly, you can get these things working again. We would need to know where you’re putting stuff to help out.
https://wiki.fogproject.org/wiki/index.php?title=Troubleshoot_NFS
-
@dureal99d lose the -t nfs?
-
@Wayne-Workman as suggested by @george1421 I am moving all my files to a folder called /opt/bootimgs on my Linux box
-
@Tom-Elliott removed the suggested lines from the command same result