Operating System - HP-UX
1851070 Members
2631 Online
104056 Solutions
New Discussion

Re: Auto_adm and Modifying Kernel Prompt

 
Mark Cater_3
Advisor

Auto_adm and Modifying Kernel Prompt

I have been playing around with altering the boot_lif:AUTO file.
But every time i make an alteration ignite will not boot from it.
Ive listed what i do below in the hope someone can tell me what i am doing wrong.

/opt/ignite/boot/boot_lif is the default bootlif i use.

lifcp boot_lif:AUTO -
hpux KernelPrompt "Choose Operating System to Install :" 120 1
reset
"target OS is B.11.00" boot (;0)/boot/Rel_B.11.00/INSTALL
"target OS is B.11.11" boot (;0)/boot/Rel_B.11.11/INSTALL
"target OS is B.11.23 PA" boot (;0)/boot/Rel_B.11.23/WINSTALL
"Exit" reboot

I want to reduce the timeout to 60 and set the default to 2.
lifcp boot_lif:AUTO - > /tmp/bcfg
cd /tmp
auto_adm -f bcfg -O CONF -o bcfg1
vi bcfg1 so it looks like:
timeout = 60
default = 2
message = Choose Operating System to Install :

label = target OS is B.11.00
bootcmd = boot
boot = (;0)
image = /boot/Rel_B.11.00/INSTALL

label = target OS is B.11.11
bootcmd = boot
boot = (;0)
image = /boot/Rel_B.11.11/INSTALL

label = target OS is B.11.23 PA
bootcmd = boot
boot = (;0)
image = /boot/Rel_B.11.23/WINSTALL

auto_adm -f bcfg1 -O ISL -o AUTO
cat AUTO:
hpux KernelPrompt "Choose Operating System to Install :" 60 2
reset
"target OS is B.11.00" boot (;0)/boot/Rel_B.11.00/INSTALL
"target OS is B.11.11" boot (;0)/boot/Rel_B.11.11/INSTALL
"target OS is B.11.23 PA" boot (;0)/boot/Rel_B.11.23/WINSTALL
"Exit" reboot

lifrm /opt/ignite/boot/boot_lif:AUTO
lifcp AUTO /opt/ignite/boot/boot_lif:
lifcp /opt/ignite/boot/boot_lif:AUTO -
hpux KernelPrompt "Choose Operating System to Install :" 60 2
reset
"target OS is B.11.00" boot (;0)/boot/Rel_B.11.00/INSTALL
"target OS is B.11.11" boot (;0)/boot/Rel_B.11.11/INSTALL
"target OS is B.11.23 PA" boot (;0)/boot/Rel_B.11.23/WINSTALL
"Exit" reboot

When i boot the new server to be built if comes back with:
Booting...
Boot IO Dependent Code (IODC) revision 3

IPL error: bad IPL checksum.

Error Reading IPL
.... FAILED.


If i put the original boot_lif back it works ok!!!
27 REPLIES 27
Steven E. Protter
Exalted Contributor

Re: Auto_adm and Modifying Kernel Prompt

>>
I have been playing around with altering the boot_lif:

>>

If i put the original boot_lif back it works ok!!!

>>

I now have a decade of experience on platform and don't play around with this. 120 seconds is so long to wait?

Waiting for BH's take on this.

Sorry, no answer from me, good luck.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Stephen Keane
Honored Contributor

Re: Auto_adm and Modifying Kernel Prompt

The boot LIF header contains the start address and offset of the ISL. If you play about with the LIF, you will almost certainly move the ISL and then the header and the ISL are out of sync, causing your problems. You really need to create another LIF, rather than trying to make your changes in the original LIF. You will also need to reset the header (which you do when you create the LIF).

Can you post the result of

# lifls -l lif_name

for your boot LIF, before and after you make your change and I'll try an explain it a bit better.
Mark Cater_3
Advisor

Re: Auto_adm and Modifying Kernel Prompt

BEFORE CHANGE:
lifls -l boot_lif
volume ISL10 data size 859365 directory size 2 04/09/08 22:01:48
filename type start size implement created
===============================================================
ISL -12800 16 242 0 04/09/08 22:39:10
AUTO -12289 264 2 0 04/09/08 22:39:10
HPUX -12928 272 1024 0 04/09/08 22:39:10

AFTER CHANGE:
lifls -l boot_lif
volume ISL10 data size 859365 directory size 2 04/09/08 22:01:48
filename type start size implement created
===============================================================
ISL -12800 16 242 0 04/09/08 22:39:10
AUTO ASCII 258 2 0 05/04/11 10:13:09
HPUX -12928 272 1024 0 04/09/08 22:39:10
Stephen Keane
Honored Contributor

Re: Auto_adm and Modifying Kernel Prompt

OK, I also forgot to mention that the AUTO file should be on a 2k boundary. In the before file, the start is 264 (256 byte sectors) which is on a 2k boundary i.e. 264 * 256 / 2048 leaves no remainder) on the after the start is 258 (256 byte sectors) which is not on a 2k boundary i.e. 258 * 256 / 2048 leaves a remainder.

You've also changed the type of the AUTO file from -12289 to ASCII.

So try

lifcp -K2 -T-12289 AUTO /opt/ignite/boot/boot_lif:

And post the resulting 'lifls -l' for your 'after' LIF.

Mark Cater_3
Advisor

Re: Auto_adm and Modifying Kernel Prompt

lifls -l boot_lif
volume ISL10 data size 859365 directory size 2 04/09/08 22:01:48
filename type start size implement created
===============================================================
ISL -12800 16 242 0 04/09/08 22:39:10
AUTO -12289 264 2 0 05/04/11 10:52:03
HPUX -12928 272 1024 0 04/09/08 22:39:10
Stephen Keane
Honored Contributor

Re: Auto_adm and Modifying Kernel Prompt

That looks a lot better. But does it boot?
Mark Cater_3
Advisor

Re: Auto_adm and Modifying Kernel Prompt

fails :-(
Booting...
Boot IO Dependent Code (IODC) revision 3


HARD Booted.

ISL Revision A.00.44 Mar 12, 2003

Auto-execute file input string exceeds 2048 characters -- autoboot aborted.


ISL>
Stephen Keane
Honored Contributor

Re: Auto_adm and Modifying Kernel Prompt

At least your ISL is loading :)

Can you check the contents of your AUTO file to make sure you aren't missing any closing quotes or anything. Compar it to the original one. (Or post it here)
Mark Cater_3
Advisor

Re: Auto_adm and Modifying Kernel Prompt

since running: lifcp -K2 -T-12289 AUTO /opt/ignite/boot/boot_lif:

lifcp /opt/ignite/boot/boot_lif:AUTO -
=hpux KernelPrompt "Choose Operating System to Install :" 60 2resetK:"target OS is B.11.00" boot (;0)/boot/Rel_B.11.00/INSTALL :"target OS is B.11.11" boot (;0)/boot/Rel_B.11.11/INSTALL >"target OS is B.11.23 PA" boot (;0)/boot/Rel_B.11.23/

the format has changed.Its all compact.

The one thing i have noticed is that when i do: lifcp /opt/ignite/boot/boot_lif.bkp:AUTO - > /tmp/cfg88
If i more/vi this file it appears ok, but if i do a cat -vet /tmp/cfg88 i get lots of characters at the end:
hpux KernelPrompt "Choose Operating System to Install :" 120 1$
reset$
"target OS is B.11.00" boot (;0)/boot/Rel_B.11.00/INSTALL $
"target OS is B.11.11" boot (;0)/boot/Rel_B.11.11/INSTALL $
"target OS is B.11.23 PA" boot (;0)/boot/Rel_B.11.23/WINSTALL $
"Exit" reboot$
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
These characters disappear if i use auto_adm to format the command via ISL/CONF

Stephen Keane
Honored Contributor

Re: Auto_adm and Modifying Kernel Prompt

The 'extra' characters are padding to fill up the 256 bytes sector. They should be zeros (NULL).

# lifcp /opt/ignite/boot/boot_lif.bkp:AUTO - | xd -c

Should look like:

If you want to look at the AUTO file now, do

# lifcp -T1 /opt/ignite/boot/boot_lif.bkp:AUTO -

It's the -K2 that is critical, if you don't like the format, stop using the -T-12289.

Mark Cater_3
Advisor

Re: Auto_adm and Modifying Kernel Prompt

# lifcp boot_lif:AUTO - | xd -c
0000000 h p u x K e r n e l P r o m p
0000010 t " C h o o s e O p e r a t
0000020 i n g S y s t e m t o I n
0000030 s t a l l : " 6 0 2 \n r e
0000040 s e t \n " t a r g e t O S i
0000050 s B . 1 1 . 0 0 " b o o t
0000060 ( ; 0 ) / b o o t / R e l _ B .
0000070 1 1 . 0 0 / I N S T A L L \n "
0000080 t a r g e t O S i s B . 1
0000090 1 . 1 1 " b o o t ( ; 0 ) /
00000a0 b o o t / R e l _ B . 1 1 . 1 1
00000b0 / I N S T A L L \n " t a r g e
00000c0 t O S i s B . 1 1 . 2 3
00000d0 P A " b o o t ( ; 0 ) / b o
00000e0 o t / R e l _ B . 1 1 . 2 3 / W
00000f0 I N S T A L L \n " E x i t "
0000100 r e b o o t \n
0000107

what else would i need to change to make it bootabke by ignite?
Stephen Keane
Honored Contributor

Re: Auto_adm and Modifying Kernel Prompt

Start with the -K2 flag when copying the amended AUTO back into the boot LIF and see how far you get with that.
Mark Cater_3
Advisor

Re: Auto_adm and Modifying Kernel Prompt

# lifrm boot_lif:AUTO
# lifcp -K2 /tmp/AUTO boot_lif:
# lifcp boot_lif:AUTO -
hpux KernelPrompt "Choose Operating System to Install :" 60 2
reset
"target OS is B.11.00" boot (;0)/boot/Rel_B.11.00/INSTALL
"target OS is B.11.11" boot (;0)/boot/Rel_B.11.11/INSTALL
"target OS is B.11.23 PA" boot (;0)/boot/Rel_B.11.23/WINSTALL
"Exit" reboot

Boot IO Dependent Code (IODC) revision 3

IPL error: bad IPL checksum.

Error Reading IPL
.... FAILED.
Stephen Keane
Honored Contributor

Re: Auto_adm and Modifying Kernel Prompt

Now add the -T-12289 flag to the LIF copy.

And post the result of

lifcp -T1 /opt/ignite/boot/boot_lif:AUTO -

Mark Cater_3
Advisor

Re: Auto_adm and Modifying Kernel Prompt

# lifcp -K2 -T-12289 /tmp/AUTO boot_lif:
# lifcp -T1 boot_lif:AUTO -
=hpux KernelPrompt "Choose Operating System to Install :" 60 2resetK:"target OS is B.11.00" boot (;0)/boot/Rel_B.11.00/INSTALL :"target OS is B.11.11" boot (;0)/boot/Rel_B.11.11/INSTALL >"target OS is B.11.23 PA" boot (;0)/boot/Rel_B.11.23/"Exit" reboot ÿ
Stephen Keane
Honored Contributor

Re: Auto_adm and Modifying Kernel Prompt

Sorry, it's been a long day!

If you want to look at the AUTO file

# lifcp -a /opt/ignite/boot/boot_lif:AUTO -

Not -T1 !

Mark Cater_3
Advisor

Re: Auto_adm and Modifying Kernel Prompt

# lifcp -a /opt/ignite/boot/boot_lif:AUTO -
hpux KernelPrompt "Choose Operating System to Install :" 60 2
reset
"target OS is B.11.00" boot (;0)/boot/Rel_B.11.00/INSTALL
"target OS is B.11.11" boot (;0)/boot/Rel_B.11.11/INSTALL
"target OS is B.11.23 PA" boot (;0)/boot/Rel_B.11.23/WINSTALL
"Exit" reboot

your help is much appreciated.
Stephen Keane
Honored Contributor

Re: Auto_adm and Modifying Kernel Prompt

I'd diff that versionof the AUTO file with the original one, just to make sure that the only differnces are the 120->60 and 1->2 changes you mentioned. Then give it a whirl.
Mark Cater_3
Advisor

Re: Auto_adm and Modifying Kernel Prompt

results of the diff:
< hpux KernelPrompt "Choose Operating System to Install :" 60 2
---
> ux KernelPrompt "Choose Operating System to Install :" 120 1

but still won't boot.
Stephen Keane
Honored Contributor

Re: Auto_adm and Modifying Kernel Prompt

> ux KernelPrompt "Choose Operating System to Install :" 120 1

That was a cut-and-paste error, it really started with 'hpux' not 'ux' didn't it?

When you say it still won't boot, what is it complaining about this time?

What media are you tring to boot from (i.e. where are you copying your LIF to)?
Mark Cater_3
Advisor

Re: Auto_adm and Modifying Kernel Prompt

it was a typo.

when i boot from the ignite server i get the same error as before:

Main Menu: Enter command or menu > boot lan.11.11.11.11 install
Interact with IPL (Y, N, or Cancel)?> n

Booting...
Boot IO Dependent Code (IODC) revision 3

IPL error: bad IPL checksum.

Error Reading IPL
.... FAILED.
Al Miller_1
Valued Contributor

Re: Auto_adm and Modifying Kernel Prompt

Mark,


Try using auto_adm to write directly into the LIF file. auto_adm automatigically detects if the target file is a LIF.

# save copy of original boot_lif

$ cp boot_lif boot_lif.orig

# create your AUTO file as you have been doing

# now, instead of lifcp, try auto_adm to write the AUTO file into the LIF

$ auto_adm -f AUTO -o boot_lif
Stephen Keane
Honored Contributor

Re: Auto_adm and Modifying Kernel Prompt

If your boot media is a tape, and you are writing to it using dd, then your must specify a block size of 2k (obs=2k or bs=2k) or it won't work properly.
Mark Cater_3
Advisor

Re: Auto_adm and Modifying Kernel Prompt

if i use auto_adm to put AUTO onto bootlif,
i still get the same error.

Booting...
Boot IO Dependent Code (IODC) revision 3

IPL error: bad IPL checksum.

Error Reading IPL
.... FAILED.

I build all servers from ignite server.
It works fine.
I just wanted to fine tune and thought it would be easy to alter the menu system.....little did i know how hard it would be.
At the moment, depsite all suggestions, if i alter the original bootlif:AUTO, no server will boot from it.