Here is what we are using to reinstall broken clients... PXE boot: - have a "default" boot menu (in ./pxelinux.cfg/default) - have a "auto-reinstall" menu (in ./pxelinux.cfg/<FAULTY-MAC/IP-ADDRESS>) 0) Clients boot into PXE only. 1) Default PXE menu (default config file on the server): - have a low timeout to boot from harddisk - all other PXE entries like reinstall are password protected 2) For faulty machines: - create a "reinstall" PXE config file on the server, depending on the MAC or IP address of the machine. - the PXE client will use this config instead of the default - have a low timeout to start installation via autoyast If you have a modern BIOS on the client, you can trigger the reboot from a remote host via Intel AMT (even if the OS is hung or there is no OS). Using AMT, you can also change the boot sequence, thus you could default to GRUB booting (instead of PXE in point 0) and switch to PXE boot for reinstall only. Of course this requires some action from the admin, but at least no physical client access. Maybe thats not good enough for your desired fully automatic re-installation. Also, I dont see why one would need to hack the code of menu.c32. You can ask those question (like new hostname/default username) with the AutoYast <ask> functionality, where you can also provide default values. The hostname could also be provided via DHCP/DDNS/DNS. I'm also interested in other options or suggestions... Regards, Joschi On 11/29/2011 11:22 AM, Patrick Begou wrote:
I'll also look for an alternative solution with grub: I have a cluster runing Rocks Cluster distribution based on RedHat and Kickstart. At this time, I've not read in detail how boot works but there are two entries in menu.lst: One for a normal boot and a second for a reinstall. When the node boots, I think it sets the default to reinstall. So if the node crashes, next boot is reinstall. A normal shutdown should set default to normal boot. Of course, on a workstation, the user can choose the normal reboot even after a crash if he is in front of his workstation at boot time. And if there are no system at all on the disk, I think I can switch to PXE boot (after a System disk replacement).
This is how I would like to process... changing the pxelinux code seams a little bit complicated for me...
But thanks for this alternative idea for managing automatic reinstall.
Patrick
Mike Marion wrote:
On Fri, Nov 25, 2011 at 02:27:44PM +0100, Patrick Begou wrote:
Now my install procedure is fully working. Autoyast seams very promising for me. Just have to read more for rules and other numerous functionalities. My final goal is to provide automatic install of the users workstations, starting from PXE boot for new hosts, after a system crash (ex: loss of electrical power) or system disk replacement without any command issued by the user or the admin. Unless you want the system to re-image every time it boots, this might be kind of hard. Or if you have a way of having autoyast detect the system is current and ok, then boot off disk.
One thing we're doing here is using the basic menuing that pxelinux allows and setting a default pxe file with a simple menu. If the user hits return (or waits 10 seconds) it'll just exit pxe and boot off the disk. We've setup some simple boot menus that will allow them to self-serve an upgrade/re-image when desired though. Since we control the pxelinux menu, we can keep it very simple and have it pass the info into autoyast to install the image the user needs[*]. We're using it as a jumping off point to install a couple different distributions now (I mostly support our massive suse base though) including even letting the windows admins kick their box over into the windows imaging stuff.
[*]I actually hacked the com32 C code and added in 2 custom fields myself too. I can have the menu pop up the desired hostname and user name and those are added into the cmdline at installation and parsed by our pre/chroot/post scripts in autoyast.