PXE-booting rescue mode

Anders Blomdell anders.blomdell at control.lth.se
Mon Aug 17 16:12:43 UTC 2009


Hi,

In previous versions of Fedora (i.e. Fedora-9), it was possible to do a PXE-boot
of a rescue image, by supplying a ks.cfg that looked something like:

  lang en_US
  keyboard sv-latin1

  firewall --disabled
  selinux --disabled

  text

  network --bootproto dhcp
  nfs --server=<hostaddr> --dir=<dist>/Fedora-9

which was very handy for partitioning disks, etc, with Fedora-10 this stopped
working due to the following code at the end of rescue.py

    if anaconda.isKickstart:
        from kickstart import runPostScripts
        runPostScripts(anaconda)
    else:
        runShell(screen, msgStr)

and with Fedora-11 there is even more weirdness:

        if anaconda.isKickstart:
            log.info("No Linux partitions found")
            screen.finish()
            print(_("You don't have any Linux partitions.  Rebooting.\n"))
            sys.exit(0)

Is there any supported way to PXE-boot a rescue image for Fedora-11? At the
moment I have put a slightly modified rescue.py in RHupdates (I know, it's a
terrible hack...):

--- /tmp/rescue.py      2009-06-02 21:11:19.000000000 +0200
+++ rescue.py   2009-08-17 18:10:20.000000000 +0200
@@ -193,6 +193,9 @@
         screen.finish()

 def runRescue(anaconda, instClass):
+    if anaconda.id.ksdata.interactive.interactive:
+        log.info("Fall back to interactive rescue mode (useful for PXE)")
+        anaconda.isKickstart = False
     for file in [ "services", "protocols", "group", "joe", "man.config",
                   "nsswitch.conf", "selinux", "mke2fs.conf" ]:
         try:


/Anders

-- 
Anders Blomdell                  Email: anders.blomdell at control.lth.se
Department of Automatic Control
Lund University                  Phone:    +46 46 222 4625
P.O. Box 118                     Fax:      +46 46 138118
SE-221 00 Lund, Sweden




More information about the Kickstart-list mailing list