Tuesday, 22 March 2011

PXE-MOF: Exiting Broadcom PXE ROM and hangs

PXE-MOF: Exiting Broadcom PXE ROM

We got this error while using pxe boot , usually we install server operating systems by changing the options in pxelinux.cfg files in pxe boot server.

Today we had an issue with PXE boot server, we have a old fedora 8 server for pxe/tftp boot and kickstart installations. But one of the admin team member had upgraded the pxelinux.0 file with the latest version of 4.03 where as the older version is 3.x but he leftout some of the files such as  chain.c32 and also we are not aware of the change/upgrade therefore we continued to use the old pxelinux.cfg files which had entries as follows:

timeout 10
prompt 1
default localdisk

LABEL netinstall
KERNEL centos5.5/vmlinuz
APPEND initrd=centos5.5/initrd.img ksdevice=eth0 ks=http://bldsrv/exports/kickstarts/centos55.ks

LABEL localdisk
localboot 0
timeout 80

Observe the configuration options for label localdisk which was using localboot option which is obsolete in syslinux version 4.03 therefore the server used to stop at that point without booting locally therefore I had to download syslinux from :

Unpack the tar-ball and copied the following syslinux files to the /tftpboot directory on the dhcp/tftp server:

tar xvzf syslinux-*.tar.gz
cd syslinux-xx.xx
cp core/pxelinux.0 memdisk/memdisk com32/modules/chain.c32 com32/menu/menu.c32 /tftpboot/

In particular the chain.c32 tool is used to boot from localdisk in the latest versions of pxelinux. therefore I need to change my pxelinux.cfg file (or the default file) as follows:

timeout 10
prompt 1
default localdisk

LABEL netinstall
KERNEL centos5.5/vmlinuz
APPEND initrd=centos5.5/initrd.img ksdevice=eth0 ks=http://bldsrv/exports/kickstarts/centos55.ks

LABEL localdisk
kernel chain.c32
append hd0

For comparison, in many places you will find the following recipe for the default file:
default harddisk
label harddisk
localboot 0

This recipe can be error-prone and actually means boot from the next device in the BIOS boot order, rather than booting from the hard disk as you would be led to believe. 

An excerpt from the syslinux mailing list is as follows:

> This labels forks for me on isolinux.cfg :
> label harddisk
>   localboot 0x80
>   append SLX=0x80
> label floppy
>   localboot 0x00
>   append SLX=0x00
> except on some weird Compaq BIOSes, Works.
> And the append line I can't remember where it cames from, should work without
> it, I guess some patch for gfxboot that I still using for impress.
> --
> Gustavo Guillermo PĂ©rez
> Compunauta uLinux
> www.compunauta.com
> _______________________________________________
> SYSLINUX mailing list
> Submissions to SYSLINUX at zytor.com
> Unsubscribe or set options at:
> http://www.zytor.com/mailman/listinfo/syslinux
> Please do not send private replies to mailing list traffic.

Yes, that should work most of the time.  On some BIOSes, localboot
won't work though.  It uses a code in the standard, but, well, you
know how it is with BIOSes if you've hung around here very long.  The
general impression I have is that if it turns on and boots, they stamp
an ok on it and ship it out.

The alternative, should you need it is to use the chainloader, which
is the chain.c32 moudule (in the com32/modules folder of the syslinux
archive.)  You load this and append either "hd# #" or "fd#" and it
will boot the drive and partition that you gave it (I think you can
get away with not specifying a partition for the harddrive as well.)
It starts numbering drives from 0 (eg hd0 corresponds roughly to
/dev/hda) and it starts numbering partitions from 1.  The reason it
numbers partitions from 1 is because if you specify 0 it tells it to
boot the MBR.

Localboot hasn't been a high priority in syslinux due to the fact that
the chainloader exists and that so many BIOSes are completely
unreliable with localboot.  It should more or less guarantee as close
to 100% compatibility as you get.  So, here's a sample line from a
bootable DVD I made:

LABEL cont
 MENU LABEL Continue Bootup
 KERNEL chain.c32
 APPEND hd0 0

I set this as the default timeout on my boot disc and if no one
presses a key within a certain period of time it continues the bootup
process -- kind of like how the Windows installation discs use.


Thursday, 10 March 2011

man: read man pages

man title formats a specific manual page and sends it to your terminal through
more, less, or whatever program is specified in your PAGER environment vari-
able. title is usually a command, device, filename, or name of a library routine.
The sections of the manual are searched in roughly numeric order, although sec-
tions that describe commands (sections 1, 8, and 6) are usually searched first.
The form man section title gets you a man page from a particular section. Thus,
on most systems, man sync gets you the man page for the sync command, and
man 2 sync gets you the man page for the sync system call.
Under Solaris, you must preface the section number with the -s flag, for example,
man -s 2 sync.
man -k keyword or apropos keyword prints a list of man pages that have keyword
in their one-line synopses. For example:
$ man -k translate
objcopy (1)
- copy and translate object files
dcgettext (3)
- translate message
tr (1)
- translate or delete characters
snmptranslate (1) - translate SNMP OID values into more useful information
tr (1p)
- translate characters
The keywords database can become out of date. If you add additional man pages
to your system, you may need to rebuild this file with mandb (Ubuntu, SUSE),
makewhatis (Red Hat), or catman -w (Solaris, HP-UX, AIX).

"/usr/share/man/windex: No such file or directory"

# man -k something
/usr/share/man/windex: No such file or directory

To create the /usr/share/man/windex, use the catman, as in the following example:

# /usr/bin/catman -w
catman will search the MANPATH and create the windex file