Score:0

How to share ISO files over PXE without mounting?

in flag

I have setup a PXE server with a local HTTPD server to host the ISO files

the config looks like vi /etc/httpd/conf.d/pxeboot.conf

Alias /centos-st8 /var/pxe/centos-st8
<Directory /var/pxe/centos-st8>
    Options Indexes FollowSymLinks
    # access permission
    Require ip 127.0.0.1 192.168.0.0/24
</Directory>

If I then mount the ISO to /var/pxe/centos-st8, everything works as expected.

I was hoping to simply copy the contents of the ISO to avoid the need for mounting the ISO. I tried the following:

mkdir ~/dvd
mount -t iso9660 -o loop,ro /home/CentOS-Stream-8-x86_64-20210927-dvd1.iso ~/dvd
cp -r ~/dvd/* /var/pxe/centos-st8/
chcon -R -t httpd_sys_content_t /var/pxe/centos-st8/

But when the kickstart loads it says it can' find the installation source.

I confirmed I can access the ISO files via HTTPD regardless if I mounted them or copied them.

Is there something obvious I'm missing on why it doesn't work with the copy? The alternative is to use fstab to have a more persistent mount, but i am wondering why the copy fails?

EDIT: looks like some errors in the http logs (cherry-picked some related errors)

[Tue Oct 12 03:52:37.662605 2021] [core:error] [pid 1619:tid 140286500001536] (13)Permission denied: [client 192.168.0.123:52794] AH00035: access to /centos-st8/images/install.img denied (filesystem path '/var/pxe/centos-st8/images/install.img') because search permissions are missing on a component of the path
in flag
Have you looked in your http logs to see if you have any missing files? Can you be more specific in the error message? (can you maybe get a screenshot) and maybe also your configuration/script that is related to whatever file that is missing.
dranobob avatar
in flag
doh, I didn't think to add the logs. I added some relevant errors at the bottom
dranobob avatar
in flag
looks like most were errors from other clients on the same network. I left the relevant one.
in flag
With the information at this time it is hard to understand what happens, you need to provide much more info on what error you get, and at what stage. It might be that the iso mount don't give all files, alternatives is 7zip or isoinfo to extract it fully. You could also try and compare the http log between working and non working setup
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.