Re: Idea for Cobbler pxe rescue mode?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jennifer Cranfill wrote:
Last night I had to do the following procedure with Cobbler to boot a remote server into rescue mode. I'm wondering if any one else thinks it would be worthwhile to incorporate a rescue mode feature into Cobbler's handling of pxe files? Or is there already one that I don't know about?

Could we create "rescue" profiles automatically when we do imports? It would just be a different profile ending in "-rescue" that would just have "--kopts=rescue" added. Example "DistroName-i386-rescue". The other thing we /might/ want to do is set up a kickstart template for that profile (and assign it) that can be used to feed the rescue image the media information, so you don't have to enter that in manually.
Presumably that could all be done with modifications to action_import.py


We maintain a number of remote critical servers, and I think it would be useful, especially as in the procedure below I had to be careful that no one else rebooted the server or ran "cobbler sync" while I was updating the pxe file. Also, it might be possible to automate more of the rescue boot.

1) cobbler system edit --name=<sysname> --netboot-enabled=y; cobbler sync
2) cd /tftpboot/pxelinux.cfg
3) Edit the file corresponding to the MAC of <sysname>. Take everything out of the append line except the initrd and add "rescue", like so:
     append rescue initrd=/images/51x64/initrd.img
4) Reboot <sysname>
5) When the system boots, it will ask you for language and keyboard and then it will ask you for the location of the *rescue* media. Just give it the http to the normal install files for the distro matching the initrd.
6) cobbler system edit --name=<sysname> --netboot-enabled=n; cobbler sync

I took the idea from this Red Hat page:
http://www.redhatmagazine.com/2007/07/05/solutions-from-the-road-red-hat-enterprise-linux-rescue-mode-over-pxe-part-i/


If we do something like having a rescue profile, it's just:

cobbler system edit --name=server1 --profile=F-9-i386-rescue --netboot-enabled=1
# fix system
cobbler system edit --name=server1 --profile=originalname --netboot-enabled=0

The one thing that requires is knowing the proper rescue profile for server1, so it's possible we could add a --rescueprofile= to the system and also have a --rescuemode=1/0 like --netboot-enabled if you think that's useful. That could be interesting.

That workflow might be like:

cobbler system edit --name=server1 --rescuemode (rescuemode could actually set netboot-enabled to 1 for simplicity) cobbler system edit --name =server1 --workingmode (this could set netboot enabled back)
I'd be happy to help with the code, but not sure the right way to architect it, perhaps some variant of netboot-enabled?

Sounds great!

Yeah I think the first step is making the rescue profiles when imports are done, the second stage is probably something like
netboot-enabled (as above) if you like the workflow?  Is that close?

I think I'd start taking a look at import for starters -- and if that's not all that's needed we can work it from there.
Cool idea!




Thanks for your consideration!

--
Jennifer Cranfill
Systems Engineer
Sony Pictures Imageworks
cranfill@xxxxxxxxxxxxxx

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux