How to pxe boot cent os 7
-
@Tom-Elliott said in How to pxe boot cent os 7:
@dureal99d those messages are fine
Any luck mounting now?No luck
-
@dureal99d can you post your exports file again?
-
@Tom-Elliott said in How to pxe boot cent os 7:
@dureal99d can you post your exports file again?
/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 *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
/opt/bootimgs *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure) -
@dureal99d That’s the issue you can’t mount a full path. Only mount up to the bootimgs folder.
Instead of:
mount 192.168.1.109:/opt/bootimgs/fedora /mnt
use :
mount 192.168.1.109:/opt/bootimgs /mnt
-
This post is deleted! -
@Tom-Elliott said in How to pxe boot cent os 7:
mount 192.168.1.109:/opt/bootimgs /mnt
mount: wrong fs type, bad option, bad superblock on 192.168.1.109:/opt/bootimgs,
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 and output of
dmesg | tail -20
? -
@Tom-Elliott said in How to pxe boot cent os 7:
dmesg | tail -20
[ 8605.032191] nfsd: last server has exited, flushing export cache
[ 8605.178847] NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
[ 8605.179097] NFSD: starting 90-second grace period (net ffffffff81ef3ec0)
[177245.456195] nfsd: last server has exited, flushing export cache
[177245.571541] NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
[177245.571572] NFSD: starting 90-second grace period (net ffffffff81ef3ec0)
[504820.256179] nfsd: last server has exited, flushing export cache
[504820.379183] NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
[504820.379211] NFSD: starting 90-second grace period (net ffffffff81ef3ec0)
[505766.396169] nfsd: last server has exited, flushing export cache
[505766.443252] NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
[505766.443281] NFSD: starting 90-second grace period (net ffffffff81ef3ec0)
[512189.424200] nfsd: last server has exited, flushing export cache
[512189.469462] NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
[512189.469507] NFSD: starting 90-second grace period (net ffffffff81ef3ec0)
[512652.019883] FS-Cache: Loaded
[512652.045276] FS-Cache: Netfs ‘nfs’ registered for caching
[512652.087294] NFS: Registering the id_resolver key type
[512652.087309] Key type id_resolver registered
[512652.087310] Key type id_legacy registered -
@Tom-Elliott Should i be trying to mount this share locally or on another machine?
-
@dureal99d you could try readding the -t nfs
-
@Tom-Elliott also can you run
yum -y install portmap nfs-utils nfs4-acl-tools
-
@Tom-Elliott yum doesn’t apply to me I’m on Ubuntu 16.04.1. it does offer for me to install it should I? @Tom-Elliott I have installed yum. and am executing the program you have told me too.
-
@Wayne-Workman said in How to pxe boot cent os 7:
@dureal99d The syntax is:
ln -s <source> <destination>
You should remove the left/right carrots when running the command.
If all the ISOs are in /opt/bootimgs the command would be:
ln -s /opt/bootimgs /var/www/html
Of course, apache needs access to this new directory also. It’s fine to set ownership of
/opt/bootimgs
to apache:root or 777 or something.And your resultant web path to these files would then be:
http://<IP>/bootimgs/whatever
How would I give apache permissions to the new folder?
I set the folder as chmod 777 and can now write into the folder on the local machine. but when I try to load any distro I now get the dreaded permissions denied on nfs mount. and the nfs is exported.
-
@Tom-Elliott I have successfully mounted the nfs on my remote machine. on my other linux machine i did not have the nfs system installed once i did wala it mounted. however i cant write to it its read only. and when i boot the linux ditro it all goes good utill its time to mount the nfs then i get a permissions denied error
-
@dureal99d If you want to make it writeable you need to say so in the NFS exports file:
/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 *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure) /opt/bootimgs *(rw,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
See I put
rw
where it saidro
in the config you posted last.Can you please post a picture of the permissions error you see on boot?
-
@Sebastian-Roth I can care less about being able to write to it, i just want the permissions to be granted when linux distros try to mount and yess ill post the pic.
-
@dureal99d Now that you have clead up your exports file it seems like you need to add those again. Please change your last entry to
/opt/bootimgs/16.04.1_64 *(rw,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
and see if it boots up. -
OK lets step back and regroup here. Lets do the following
- Insert the Centos 7 dvd into your FOG server’s cdrom drive
- Key in the following commands into your fog server’s console as root:
# we are going to put all of our boot images into the web server and issue the files # with apache and cut out all of this NFS crud mkdir /var/www/html/bootimg # connect to the centos dvd to the /mnt directory mount -o loop /dev/cdrom /mnt #show me there is content there ls /mnt # Create a destination directory for the centos installer files mkdir /var/www/html/bootimg/centos7x64 # Copy the content of the dvd to the proper location cp -r /mnt/* /var/www/html/bootimg/centos7x64 # Change the access level for world read chmod -R 755 /var/www/html/bootimg/centos7x64 # Unmount the dvd drive since we already have the files umount /mnt
- Now in the FOG Configuration->iPXE New Menu Entry enter the following:
Menu Item: Centos7PXEInst
Description: Install Centos x64
Parameters:
initrd http://${fog-ip}/bootimg/centos7x64/images/pxeboot/initrd.img
chain http://${fog-ip}/bootimg/centos7x64/images/pxeboot/vmlinuz initrd=initrd.img method=http://${fog-ip}/bootimg/centos7x64/ devfs=nomount ip=dhcp
boot || goto MENU
Menu Show with: All Hosts - Now pxe boot your target computer and select the Install Centos x64 menu item.
- You should see the installer boot and run.
This process can be replicated to other linux distributions. I just tested this, this morning on my dev fog server running 1.3.0-rc8 and it works.
As for a live boot, these settings don’t work, the installer still runs. I don’t have time right now to figure out why the live boot bits are not working.
Live OS boot
initrd http://${fog-ip}/bootimg/centos7x64/images/pxeboot/initrd.img chain http://${fog-ip}/bootimg/centos7x64/images/pxeboot/vmlinuz initrd=initrd.img root=live:http://${fog-ip}/bootimg/centos7x64/LiveOS/squashfs.img ip=dhcp rootflags="loop" rootfstype=auto ro rd.live.image quiet rhgb rd.luks=0 rd.md=0 rd.dm=0 boot || goto MENU
-
@Sebastian-Roth ok, I’m trying it now
-
@george1421 ok I will try it shortly