Operating System - HP-UX
1830061 Members
2701 Online
109998 Solutions
New Discussion

How to Make a Bootable Disk ?

 
Patrick Collins
Occasional Advisor

How to Make a Bootable Disk ?

I have a D class machine running HP-UX version 11.00 with one volume group vg00 at 4.5.0. I want to create a bootable disk on another disk at 4.9.0. I thought I knew how to do this but when I try to boot from the disk it hangs at the following point. Obviously I am missing something. It must be something to do with mkboot or lvlnboot or /stand/rootconf or something but I don't know what.

Boot
: disc(4.9.0;0)/stand/vmunix
7389184 + 882184 + 2219768 start 0x24b768

Thanks.

Patrick Collins
I have miles to go before I sleep
7 REPLIES 7
Michael Tully
Honored Contributor

Re: How to Make a Bootable Disk ?

Are you attempting to create a mirror of the first disk?

If so you need to have the mirrordisk/ux sofwware installed, which must be purchased.

Once this has been done: e.g.

# pvcreate -Bf /dev/rdsk/c2t6d0
# vgextend /dev/vg00 /dev/dsk/c2t6d0
# mkboot /dev/rdsk/c2t6d0
# mkboot -a "hpux -lq (0/0/2/1.6.0;0)/stand/vmunix" /dev/rdsk/c2t6d0
(hardware path from ioscan)
# lvlnboot -R
# for LVOL in /dev/vg00/lv*
> do
> echo $LVOL
> lvextend -m 1 $LVOL
> done

Another option (if you don't have mirrordisk/ux is to create an ignite tape from disk 1 and boot from it and install the same onto disk B.

There is a third option that you could do and that is to do a 'dd' from disk a to disk b.
There has been postings on this recently.
Anyone for a Mutiny ?
Rajeev  Shukla
Honored Contributor

Re: How to Make a Bootable Disk ?

Hi patrick,
do
pvcreate -B /dev/rdsk/c0t9d0
vgextend /dev/vg00 /dev/dsk/c0t9d0
mkboot -l /dev/rdsk/c0t9d0
mkboot -a "hpux -lq" /dev/rdsk/c0t9d0
lifcp /dev/dsk/c0t9d0:AUTO -
then do
lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c0t9d0
and so on for all lv's even swap
Then do
# lvlnboot -r /dev/vg00/lvol3 /dev/vg00
# lvlnboot -b /dev/vg00/lvol1 /dev/vg00
# lvlnboot -s /dev/vg00/lvol2 /dev/vg00
# lvlnboot -d /dev/vg00/lvol2 /dev/vg00

# mkboot -b /usr/sbin/diag/lif/updatediaglif -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c0t9d0
to copy offline diagnostics
Sridhar Bhaskarla
Honored Contributor

Re: How to Make a Bootable Disk ?

Hi Patrick,

The procedure as outlined by Michael will work for you. However, different administrators do it in different ways. I am giving only the steps that I do differently.

Note down lvlnboot -v output before you mirror

mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c2t6d0
cd /usr/sbin/diag/lif
mkboot -b updatediaglif2 -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c2t6d0

After the for loop, run lvlnboot. Match the logical volumes in your previous lvlnboot -v output

lvlnboot -b /dev/vg00/lvol1 (boot)
lvlnboot -r /dev/vg00/lvol3 (root)
lvlnboot -s /dev/vg00/lvol2 (swap)
lvlnboot -d /dev/vg00/lvol2 (dump)


-Sri

You may be disappointed if you fail, but you are doomed if you don't try
Patrick Collins
Occasional Advisor

Re: How to Make a Bootable Disk ?

Actually what I am trying to do is work out a procedure to rebuild a boot disk (vg00) for another system where the disk has failed. I need specific sized and label lvols in this volume group. We have good OmniBack backups of file systems on this vg but no Ignite images. This is not an urgent problem as we have a workaround but I need to document the restore procedure for future.
I have miles to go before I sleep
Ravi_8
Honored Contributor

Re: How to Make a Bootable Disk ?

Hi

Just by copying from 4.5.0 to 4.9.0 wouldn't work. You need to have MirrodDisk/UX, Follow the procedure said by Michael and change the boot path to the disk 4.9.0
never give up
RAC_1
Honored Contributor

Re: How to Make a Bootable Disk ?

you need to have HP-ux/mirror software for this. If you have procedure is as follows.

pvcreate -fB /dev/rdsk/c2t1d0
(assuming c2t2d0 as another disk)

mkboot /dev/rdsk/cc2t1d0
vgextend vg00 /dev/dsk/c2t1d0
mkboot -a "hpux -lq" /dev/rdsk/c2t1d0

lifcp /dev/rdsk/c2t1d0:AUTO -

vgextend -m 1 /dev/vg00/lvol1
vgextend -m 1 /dev/vg00/lvol2
vgextend -m 1 /dev/vg00/lvol3

lvol1-boot,lvol2-swap and lvol3=root

and all other lvols in vg00
lvlnboot -b /dev/vg00/lvol1 /dev/vg00
lvlnboot -r /dev/vg00/lvol3 /dev/vg00
lvlnboot -s /dev/vg00/lvol2 /dev/vg00
lvlnboot -d /dev/vg00/lvol2 /dev/vg00

lvlnboot -R

setboot -a to ser alternate path.

Reboot and interrupt boot process and boot from alternate disk.

In case you do not have Mirror software you can prepare static copy of your boot disk.

pvcreate -fB /dev/rdsk/c2t1d0
(assuming c2t2d0 as another disk)

mkboot /dev/rdsk/cc2t1d0
vgcreate vgboot /dev/dsk/c2t1d0
mkboot -a "hpux -lq" /dev/rdsk/c2t1d0

lifcp /dev/rdsk/c2t1d0:AUTO -

lvcreate -C y -r n -L size_of_boot /dev/vgboot
same way create other two. They need to be continuous .

lvol1-boot,lvol2-swap and lvol3=root
create all other lvols in vg00 on new vgboot

then

lvlnboot -b /dev/vgboot/lvol1 /dev/vgboot
lvlnboot -r /dev/vgboot/lvol2 /dev/vgboot
lvlnboot -s /dev/vgboot/lvol2 /dev/vgboot

then dd each lvol onto new lvs.
There is no substitute to HARDWORK
Bob_Vance
Esteemed Contributor

Re: How to Make a Bootable Disk ?

It's still not clear to me what you actually did and what you're really trying to do, but you can make a bootable disk without MirrorDisk/UX.

I have done the following in the past:

. do the 'pvcreate -B'
. create a new VG, say, vgboot2
. create the LVOLs and FSs
. copy the vg00 FSs to the
vgboot2 FSs. You have to create mount temp mount points. I generally use 'fbackup'|'frecover' to do the copy, but you could use 'cpio' if you don't have ACLs.
. change the /etc/fstab in the new stuff to use "vgboot2"

This works and boots. Of course it's not vg00 and anything that depends on that (like /etc/fstab and probably make_tape_recovery) is an issue. But it might be possible to boot into maintenance mode and import the VG as vg00 --I didn't try that.

It would seem to me that make_tape_recovery would be a much simpler way to go, however.

bv
"The lyf so short, the craft so long to lerne." - Chaucer