Re: PXE-booting rescue mode

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

 



Larry Brigman wrote:
> On Mon, Aug 17, 2009 at 9:12 AM, Anders
> Blomdell<anders.blomdell@xxxxxxxxxxxxxx> wrote:
>> 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
>>
> 
> I did a simple variant that had this in the pxe/syslinux menu and
> passed it as a kernel cmdline option like this:
> 
> label 3
>   kernel vmlinuz
>   IPAPPEND 2
>   append initrd=initrd.img ramdisk_size=32705 ksdevice=bootif rescue
> noipv6 dns=10.109.3.240 method=http://10.109.0.46/repo/DVD
Thanks, works like a charm. This is what I ended up with (repo instead of
method, prescribing keyboard, language and dhcp):

LABEL Rescue
      kernel rescue/vmlinuz
      ipappend 2
      append initrd=rescue/initrd.img ksdevice=bootif keymap=sv-latin1
lang=en_US ip=dhcp repo=nfs:<server>:/export/work/Fedora-11/i386/release rescue

/Anders

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

_______________________________________________
Kickstart-list mailing list
Kickstart-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/kickstart-list

[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux