Pxe server setup from a usb: Updated howto?
Hi,
I need to install slackware (current) onto several computers connected to a single server, so I want to use the pxe method to serve the clients, from the server. From the pxe howto (here) it seems that installing from a usb is supported (instead that from dvd). I have followed all steps, but it has been impossible to setup the source directory. To burn the usb I used either one of the following two commands: dd if=pathtothe.iso of=/dev/sdX or the recommended (iso image mounted on /mnt/tmp) bash /mnt/tmp/usb-and-pxe-installers/usbimg2disk.sh -f -i /mnt/tmp/usb-and-pxe-installers/usbboot.img -o /dev/sdX -s /mnt/tmp/slackware64/ Then I start the server from the usb (in both cases it starts) and then use the command pxesetup to setup the pxe server. I cannot configure the source option. First, and contrary to what the manual linked above says, there is no /usbinstall directory automonted. I can either use a device or a previously mounted directory, and I specify any of them and the pxesetup is never able to find what it is looking for. For instance, if I mount the usb device (let's say /dev/sdc) on /usbinstall, and then I select either the option use a hard drive partition (in this case /dev/sdc1) or a premounted directory (i this case /usbinstall or /usbinstall/slackware64), the program cannot find the kernel sources or the packages or says that the directory is invalid. It seems that I am doing something wrong/stupid and/or the instructions are outdated. Does anyone knows how to correctly setup the pxe server from a usb? I know there is another guide like this but I really hope not to need to setup from zero the dhcp server, tftp, etc. Thanks in advance |
I guess that your USB stick contains only the Slackware installer, without any packages?
|
The slackware packages tree is there (inside the slackware64 directory), both when I copy the full slackware64-current iso with dd or when I use the usbimg2disk.sh script with the -s flag.
How can I be of more help here? is there a log file somewhere showing the commands performed by pxesetup? Is there a way to get more verbose messages from the pxesetup commands to know why it cannot find the tree or the kernels when I specify a pre-mounted directory? Or maybe the packages must not be on a subdirectory (like slackware64) but instead on the same level of the disc? Any help/guidance is appreciated. |
By the way, this "usbimg2disk.sh" script was originally submitted to Slackware by me, for the release of Slackware 13.37 in 2011. For the Slackware 14.1 release, Pat Volkerding removed the part of the script which would modify the initrd image to add the /usbinstall automounting feature. See https://git.slackware.nl/current/com...3dddf9a78a01d1
I don't think I ever tested the PXE installation since Pat removed that functionality. |
I do recall that I once tried to use the PXE installer. I, too, had trouble setting up the server. Somehow I managed to find the source tree (trial and err) on the server and start the server. The client did find the server but was never able to download any packages. Since it was only one machine that I wanted to install I dismissed the approach. Did not have time to investigate any further. I will try later to reproduce the steps to at least start the server.
|
UPDATE
I had some time to retrace my steps to setup the server. This is what I did on the server:
PS: I also experimented with mounting the package sources on another directory, e.g., /usb-stick on the server. Then I created a symlink /usbinstall -> /usb-stick/slackware. This seems to avoid the unmount issue of the pxesetup installer. I am not sure, however, if this may have contributed to the client's failure to download the packages later. Maybe you can experiment a bit with it to and post an update if you get it working. |
That was useful troubleshooting crts, thanks. I'll find some time soon to experiment with the PXE setup.
|
I might be able to save you some time. The bug happens in the initrd in file usr/lib/setup/SeTpxemedia. Here is the problematic part of the code:
Code:
# Find out where the PXE boot files are on the medium. Due to this behaviour I do not think it makes much sense to search for the image and kernel in the parent folders. The above code should be shortened to (I do not know why the cd and pwd were there, they seem redundant so I removed them): Code:
# Find out where the PXE boot files are on the medium. EDIT: Thinking about it a bit more I think my conclusion to adjust the message is a bit too "radical" and centered on a PXE setup. I still think the message is misleading but I will raise this as a separate issue. On a related matter, the description in the file usr/lib/setup/INSURL is also misleading: Code:
cat << EOF > $TMP/tempmsg Code:
cat << EOF > $TMP/tempmsg This is the exact same message as in usr/lib/setup/INSSMB, by the way, do not know if it is also wrong there. |
A possible workaround for OP
@OP: The procedure is similar as that in post #6 but before you start pxesetup on the server issue this command:
Code:
sed -i 's|TDS))/\.\./kernels|TDS))/kernels|' /usr/lib/setup/SeTpxemedia When asked to enter the source directory on the clientside just accept the default '/' entry. I got it working with those settings. I had to reboot due to the random unmount problem, which also happened when I entered the correct directory the first time, so do not give up if it does not work on the first attempt. Please keep us posted if it works for you and if the installation succeeded. |
Ok, I opened a new thread for the misleading description issue.
|
Hi, I just want to thank you for your work trying to update and fix the pxe server stuff.
I apologize for not having tested yet the pxe server stuff with the line you shared, but currently and since more than a month I do not have physical access to the computers, so I cannot test. At the end I made a virtualbox slackware golden image with clonezilla, imaged the internal computers with clonezilla server, and configured them . This procedure also had its own challenges and the pxe server install was one of the alternative options that unfortunately did not work. Maybe later I will test again with the pxe server. Thanks again to you both. |
All times are GMT -5. The time now is 03:33 AM. |