Create a PXE Boot Server for your computer network!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
if you found this video or you've been watching my channel for a while then you're probably someone who's got a totally unnecessary home lab or if you haven't then you probably want one well in this video we're going to be taking a look at something that's somewhat unnecessary and that's adding a pixie boot server to your network if you don't know what that is it allows you to boot your computer over the network rather than trying to hunt around for a spare USB stick and burn an ISO image onto it it's particularly common and useful for it departments where they need to rebuild tens or maybe even hundreds of computers well enough of that now let's dive [Music] [Applause] in so the first thing we're going to be doing in this video is we're going to be setting up a Linux PC this could be bare metal or it could be a virtual machine with the hypervisor of your choice I'm going to be using esxi because that's what I've got at the moment but you can use prox marks or some of the others out there once in is installed then we're going to be installing a piece of software called I ventoy they've already got something called ventoy by the same developer and that allows you to boot via USB but this is the version that allows you to boot over the network instead there's a free and a paid version the paid version is only $49 but we're only going to need the free version for this we're then going to set up the configuration in ivent toy and then set up a sambare so that we can add ISO images easily well now let's head over to the PC and get started so I'm now going to set up the virtual machine machine with Linux on it so that we can use it as the pixie Bo server I'm going to be installing Linux on the virtual machine using my current pixie boot server so let's power it up and see if it finds it so here we go you can see it's found something and there we go there is a list of iso images and we just select which one we want to use so now we've got a version of entu installed I'm going to go to Firefox and then we'll go to the ient toy website site let's go to download and download the Linux version this will take us to the GitHub where we can get the right version so we want this one here so I've now copied ivent toy to my home directory and now we're going to go into a terminal window and start doing some setup so now we're in terminal window and we can see there's an ivent toy directory there so let's go into that and then we want to do Pudo B ient toy. sh start now that's started as it says here we can actually go to a web browser and have a look at it from there so we're now in the user interface and the first thing we need to establish is what we're going to use as our DHCP server so if you've got your own then it's going to need to be capable of Pixie booting and if you haven't then there's a built-in one so there's three different options so if we go to configuration then you can see these options so there's internal external internal and external net there's some documentation which goes through what each of these means if you're happy to have your pixie boot server on a separate Network and then the ones that you want to boot on that Network as well and this is probably the simplest because then you can set up ivent toy to be the DHCP server then that will also handle what bias mode is used so whether it uses bias or yui when it's booting up most things use yui these days so I don't think it's much of a problem but let's go through the other options so with the external mode and the external net mode this means that you're using your own DHCP server but for this you're going to need to have next server and boot file options in your DHCP server so if you haven't got these then you kind of forced to use the ivent toy one instead I use a UniFi router as my DHCP server so these options are available to me so if I go into this network for example and scroll down and then more options you can see here I've got DHCP boot server so then I can put in the the server IP address and the file name which is in the documentation I've used yui because you tend to use yui for most things for booting these days if you set ient toy to external mode then it does something really quite clever it snoops the DHCP request and then figures out when it gets a request from the server which file to present so whether it presents the BIOS or UI so in this setup it means that you can boot from either type under external net mode you can't do that and you have to provide the specific file like I've done but this allows you then to do it across vlans whereas this setup you can't do it across VLS because it can't sneak the traffic so that's basically the difference between these two so now back in ivento we're going to go to configuration and I'm going to set it to external net so we're going to use my own DHCP server and I'm going to specify the file also I'm going to change this from guey to CLI I have found that booting from some images seems to cause some problems for some reason with the guey and also with the resolution you might need to set it to 800 by 600 if you get some strange issues with the screen when you're pixie booting then that might be the reason you can also change this in the option when you've booted as well so I'm going to leave it as this for now we've then got a Mac filter option which I think is nice so you can either set it in deny or permit mode so you only allow certain Mac addresses or deny certain Mac addresses from pixie booting and then here image management so we haven't talked about the isos yet but they'll show up here once you've added some to a certain folder you do need to press refresh every time you add a new ISO image which I think is a bit of a shame really it would have been nice if it would automatically pick these up so if you don't see your ISO image when you pixie boot then it means that you need to go in here and press refresh well that's about all there is to it in here so what we need to do now is add some ISO images to the folder so that they're available via pixie Boot and we can see them in here so what I'm going to do is I'm going to show you how to set up SSH and Samba and then we can upload the files from any computer nice and easily into the iso folder so I'm now back on the Linux VM in a terminal window and the first we want to do is establish what the IP address of this machine is so that we'll be able to SSH into it so we do if config and you can see that it's not installed at the moment but you can type this command to install it now that that's installed let's do if config again and we can see we've got our IP address here 1 192168 2.13 now it's always a good idea to update Linux before you do any other installs so we're going to do that now Pudo app get update and then Pudo app get upgrade so now to install SSH we need to do Pudo app get install open SSH server now that it's installed we need to do a couple of other configuration items so like ensuring that it starts up on boot and also enabling it through the firewall now pseudo ufw allow SSH allows it through the firewall and finally pseudo system CTL start SSH starts a service so now we've done that let's load up a Windows terminal and see if we can SSH into it so we want to do SSH username at IP address uh accept the fingerprint for the first time yes and you can see that we're successfully ssh in now so if we do PWD with that LS and we can see the ivent toy directory now we got SSH up and running I'm going to do some of the stuff in here instead so now let's upload an ISO image to the pixie boot server so I'm now in a directory where I've got an ISO file so I'm not sshed in I'm just on my local machine and now we're going to use SCP to upload that file so if we do SCP and then the file name and then the username at IP address colon SL directory then it should work the first time you'll get asked for fingerprint now we can see it's uploading to the server now back in ivent toy let's go to refresh and we can see that the image is there so fantastic so we've now got an image ready and we've got the server ready apart from we need to press start here before we can start using this pixie boot server because we use the external DHCP we need to configure that and unify so I've gone to the network that I want to be able to picky boot from and I've already got an IP address in here because I've already set up a pixie boot server but in your instance you'll need to tick this DHCP boot option which will be under advanced settings and then you just need to add the server IP address and then this file name for yui look at the documentation if you want the BIOS one I think it's just bios at the end instead so we'll change this to the new pixie boot server and see if it works so I've now created an empty virtual machine and ensured that it's set to boot in UI mode rather than by us and now we're going to start started up and see if it finds the pixie boot server here we go so we can see it's discovered something and there we go just like that ivent toy is loaded and you can see the image for True NASCAR which is the image we uploaded so the final thing we're going to do is we're going to set up samb so that it's easier to upload ISO images so we're now back in command prompt so we want to SSH back in again so firstly we obviously want to install sambba so we do Pudo app install sambba so now that's installed we need to edit the samb configuration file to add a samb share so it's Pudo Nano Etc samb sb.com so I've just scrolled down to the bottom of the file now we're going to poast in some information so here I've created one called isos and we've got the path of the iso so we put it into ivent toy iso and whether it's readon or not well we want it to be right so that we can actually upload the files and then you can also specify valid users so that only certain users can access this sh if we do crl o enter and then crl X then that saves it an exits now we want to add a firewall rule for sambba so let's do that so pseudo ufw allow sambba now let's start the service Pudo service smbd start now finally we have to actually create a password for the sber so to do that we do pseudo SMB password and then specify the username the operating system username that we're using there we go it's added now we want to restart the SMB service now finally let's see if we can connect to it so I've gone to this IP address and we can see there's a folder called isos and you can see it's asking for credentials that's fair enough and now it's got the image here and we can upload new images so before we rack things up a couple of other things to mention so once you've started the service once the next time you start it you're going to want to use this command here with the minus r in it also set it up as a service so that when you reboot the pixie boot server that the service will start automatically so you're probably going to want to do that another thing to mention is that I did it on Linux but there is actually a Windows version of this as well so you can use it as Windows instead another thing you might want to do although we've got the iso directory over samb now so it's easy to upload them you might want to store your images in a different location so you can use symbolic links for this so if you look up how to create symbolic links then you can put your ISO images anyway really there's also other things that iventory can do that I haven't looked into myself things like being able to autoinstall things and add scripts into the install process there's also a HTTP server so that you can host other files if you wanted to as well and you can access the isos directly over HTTP as you can see it needs a bit of setup to start with but once you've got it set up then all you really need to do is keep on top of the iso images that you need there's a list of iso images that have already tested and working on the website so if you use one that's not on that list then please consider going on the website and adding yours well that's it for this video so please comment down below and let me know if you've given it a try and please consider subscribing if you haven't already and liking the video and thanks until next [Applause] time
Info
Channel: Let's Automate
Views: 49,633
Rating: undefined out of 5
Keywords: ventoy, iventoy, network boot, pxe boot
Id: jZYbFcQQ3x8
Channel Id: undefined
Length: 12min 35sec (755 seconds)
Published: Sun Oct 08 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.