LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 09-05-2012, 09:05 PM   #1
joshua.shaw
LQ Newbie
 
Registered: Sep 2012
Posts: 6

Rep: Reputation: Disabled
Pxe/Virtualization Guru needed for lab environment help


Just a disclaimer, i have searched PXE, Netboot, gpxe, vmware, virtualbox etc..I cant seem to find the answer so i come before you guys and gals.



Okay, I have been building a lab testing environment so if you guys dont mind the long winded explanation

The needs:

I have many different units that are completely diskless that require the ability to boot an image and run from a network. I cannot install anything locally or use a DVD,USB boot device. These units use pxe enabled nics but are built for Linux OS's such as Redhat or Centos.

What i Have so far:

I currently have a Centos 5.8 server up and running with DHCP,TFTP, etc. I have followed the majority of the PXE setup guides and they have taken me very far to reaching my goal. I have access to pretty much anything but being a bit of a linux noob i have been trying to do everything on my own and teach myself through forums, Google, etc.

Where i am now:

I have REDHAT 5.5 and Centos 6.2 live

With Redhat 5.5
I can hook my diskless unit to the switch, choose the pxe boot option and it receives the DHCP offer, assigns the IP address and downloads pxelinux.0 and gets to my boot.msg. I can pick the option and i have mostly setup my default.txt so it grabs vmlinuz/initrd.img and executes. It rolls through and the big blue REDHAT screen pops up and acts like it wants to install. It gets to the screen where it asks the IPV4 / IPV6 config and tries to grab ip information from eth0 which is the right nic port. I dont want to install anything, im thinking this is incorrect. My thought are that maybe it needs to install the image on the server the first time so it can be accessed as a regular image after? Im reaching because im stuck at this point. The reason im sticking with RHEL5 is becasue we have another server setup in a separate lab and the units reach the boot.msg, pick their option and boot the images as if they were local. The downside is the person who built it is no longer here and the image is password protected. I would be able to easily reverse engineer how its setup but since i cannot access his /tftpboot folder or the folder he has the images in i cannot decipher how they are mounted, what permissions, etc. The version of RHEL5 they have isnt a live boot image so i know this can work somehow. It seems im close but imagine ive just scratched the surface.

My question (bear with me)

1. I have exported the folders that i copied the file system to. Does it need to be mounted?
2. I know Iscsi cards you can setup a target, install the OS and boot it as ata over Ethernet. I haven't gotten that far with my Windows systems ( thats a future task)
3. I guess the main question is, how to make a non live boot image boot over the network as if it were on a local disk.
4. I have built a few minimal disks and loaded them into memory by downloading from the server. This is not the way the other lab is doing it but it does kinda work just takes forever.

With Centos 6.2
I can get to the initial execution then the kernel panics and kills the process. I'm guessing that my permissions, drivers, doesnt like my default.txt options. I'm lost with the config of the default.txt with this so i gave up for the time being on pxe boot a newer live image.


I am not looking for a step by step guide so please don't flame me for this. I just need to know if im going in the right direction.

Thank you very much.
 
Old 09-06-2012, 11:12 AM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,974

Rep: Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623
There is maybe 2000 web pages on pxe/diskless boot. All of them are different and you almost covered part of each way.

1.
Iscsi is a way to use a network location as if it were a local hard drive. (simply stated) Kind of an advanced sort of install. Usually used for a very fast lan where you have an entire OS on the server. Kind of like a vm sort of deal where you could even use snapshots and such. Generally one might start with freenas or some such and use tutorials at gpxe/ipxe and other places to learn how to create a master image or unique image for a machine.

2 and 3.
Export folders I assume you mean nfs and yes it has to be mounted. This is a more common home or lab way to run a diskless. Tutorials at most web pages have you do the dhcp with settings, tftp (maybe with settings) and a nfs mount to host bootable images and files. These files are not the same as normal file usually. They have to be special for this type of network loading. This tends to be only installation for OS's like RH.

I have used some older computers over a complex network and load could take some time. I have also used some new systems over a single cable and it seems to boot fast. This is the boot to a memdisk sort of deal where you send the entire image then boot a live image.

You can only boot one of two things and basically one of two ways. One is to boot a live image or an installed image. The next is you can send it all or just send what you need at the time.

Best may be to start with a slax or knoppix boot cd/dvd and boot to a pxe server. Almost every knoppix cd/dvd from 3.4 to 5.x works with Knoppix terminal server. I have not been able to get 6.x dvd to work and I haven't tried 7 yet.
 
Old 09-06-2012, 11:25 AM   #3
joshua.shaw
LQ Newbie
 
Registered: Sep 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thanks for the response!

I have been playing with system-config-NetBoot this morning and it seems like it could work for what I need. I am in te process of installing a copy of Rhel5 so I can sync the image to an Nfs exported directory. Anyone had any luck using it?

Another quick no brainer:

1. I'm running centos like i said earlier as my base pxe server. Dhcp, tftp, and nfs on the same machine. My nic that I'm using for my units to connect to is 10.0.200.1. When it asks for my nfs server ip is it the same or would it be 127.0.0.1?
 
Old 09-06-2012, 04:22 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,974

Rep: Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623
I am not sure I fully understand where this question is being asked but I can say that generally a 127.0.0.1 is a term for local host or local only. It is not common to use that ip address.

From that book.

"Chapter 31. PXE Network Installations

31.1. Setting up the Network Server
31.2. PXE Boot Configuration
31.3. Adding PXE Hosts
31.4. TFPD
31.5. Configuring the DHCP Server
31.6. Adding a Custom Boot Message
31.7. Performing the PXE Installation

Red Hat Enterprise Linux allows for installation over a network using the NFS, FTP, or HTTP protocols. "


So you are trying to create an installation server?
 
Old 09-06-2012, 05:19 PM   #5
joshua.shaw
LQ Newbie
 
Registered: Sep 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
I fully understand. For some reason when I would check the output of my exports it kept showing 127.0.0.1 no matter what. Not sure what fixed the issue but I rebooted and deleted my diskless hosts in system-config-NetBoot and voila. I was able to boot Rhel5 via pxe! Takes about 45 seconds to boot up even with the bloated image. Works as good as I could hope for! Thanks again for pointing me in the right direction!
 
Old 09-07-2012, 10:52 AM   #6
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,974

Rep: Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623
Great going. How did you build your clients?
 
Old 09-07-2012, 11:17 AM   #7
joshua.shaw
LQ Newbie
 
Registered: Sep 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
There is a guide on this forum that works great. You basically install your Os ad configure it so it will be your golden image. Using pxeos you sync the image to an NSF exported directory that resides on your server. Using system-config-NetBoot it creates your default.txt entire with the appropriate kernel options.


The only problem is this that I have found.

I have 10 different machines with different hardware In the lab currently. I installs the golden image one machine, synced the image and removed the drive. I can pxe boot that specific machine and it loads the image from Nfs flawlessly. However, if I hook a different machine up and try to pxe boot the one image then it goes along good and then I see

Mounting fs/
Starting dhclient/ ( it just hangs here)

Then it fails and spits out a message saying finally no dhcpoffers recieved.

I'm replying from my iPhone. I'll post the actual failure when I return to my pc
 
Old 09-07-2012, 11:56 AM   #8
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,974

Rep: Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623
Great. Thanks for the update. Good work.

Just for reference, I assume you used this guide? http://www.linuxquestions.org/questi...luster-765393/

Last edited by jefro; 09-07-2012 at 12:00 PM.
 
Old 09-07-2012, 07:12 PM   #9
joshua.shaw
LQ Newbie
 
Registered: Sep 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
That would be the one! Worked great for pointing me in the right direction for syncing the golden image correctly. I'm still having issues but I think it's a dhcp problem. The dhclient starts during the initial execution of the network scripts I assume and just hangs there. Then says it never got a dhcp offer.
 
Old 09-07-2012, 07:33 PM   #10
gedexas
LQ Newbie
 
Registered: Sep 2012
Posts: 11

Rep: Reputation: Disabled
If you want to save some disk space on your server, compile squashfs with xz (lzma2) and aufs (or any union fs).

The "xz" compressed root filesystem is approximately 30% the size of my original uncompressed install, that's 1.6 gigs versus 5.5 or so that it used to be.

Aufs can be exported with NFS and your node image can be squashed to a read only, loop mounted image. 99% of the data is exactly the same for all your nodes anyway.

I have also compiled my own kernel with as much functionality as possible in the form of modules, even the NFS support itself is a module. This improves the boot speed, since less data has to be transferred across the cable. I use an initramfs (also compressed with xz) to load the network driver and configure eth0.

Another option is to have root filesystem mounted as a union of tmpfs and squashfs (on top of NFS), which results in 30% less network traffic (and even faster loading of programs) as opposed to transferring raw bits across NFS.

Any questions about the specifics are welcome
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
sed guru required for help with Win32 environment variables slugzero Programming 2 09-16-2009 01:04 AM
sed guru required for help with Win32 environment variables slugzero Slackware 11 09-12-2009 03:45 AM
Discussion on theoretical lab environment JordanH Linux - General 3 11-16-2003 03:23 PM
guru help needed. dk Linux - Newbie 2 04-26-2001 12:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 07:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration