1834008 Members
1670 Online
110063 Solutions
New Discussion

HP-UX Booting

 
ravi_15
New Member

HP-UX Booting

How to create a bootable hard disk using HP-UX commands? I am having one Hard disk of 2.1 GB on which HP-UX 10.20 is there. I want to make a 4.3GB hard disk bootable, which is blank.
Nothing in the world can take the place of persistence
3 REPLIES 3
S.K. Chan
Honored Contributor

Re: HP-UX Booting

You want to manually duplicate your exsiting boot disk right ? Here's the process..

Duplicating an LVM Boot Disk
============================

* Assuming current LVM boot disk is on c1t2d0 and you want to duplicate to c2t2d0. This can be done on line.

# pvcreate -B /dev/rdsk/c2t2d0
# mkdir /dev/vgroot;mknod /dev/vgroot/group c 64 0x010000
# vgcreate /dev/vgroot /dev/dsk/c2t2d0
# mkboot /dev/rdsk/c2t2d0
# mkboot -a "hpux (;0)/stand/vmunix" /dev/rdsk/c2t2d0
# lifls /dev/rdsk/c2t2d0
==> do lifcp of all other boot utilities from c1t2d0 to
c2t2d0.
# lvcreate -C y -r n -n lvol1 /dev/vgroot
# lvextend -L 84 /dev/vgroot/lvol1 /dev/dsk/c2t2d0
==> creating and extending boot lv (/stand)
# lvcreate -C y -r n -L 2048 -n lvol2 /dev/vgroot
==> creating swap LV
# lvcreate -C y -r n -n lvol3 /dev/vgroot
# lvextend -L 6544 /dev/vgroot/lvol3 /dev/dsk/c2t2d0
==> creating and extending root lv (/)
# lvlnboot -b lvol1 /dev/vgroot
# lvlnboot -r lvol3 /dev/vgroot
# lvlnboot -s lvol2 /dev/vgroot
# lvlnboot -d lvol2 /dev/vgroot
==> update BDRA for boot, root, swap and dump LVs.
# newfs -F hfs /dev/vgroot/rlvol1 ==> /stand must be hfs
# newfs -F vxfs /dev/vgroot/rlvol3
# mkdir /newstand
# mount /dev/vgroot/lvol1 /newstand
# cd /stand
# find . -xdev -depth -print|cpio -pxdm /newstand
# umount /newstand
# mkdir /newroot
# mount /dev/vgroot/lvol3 /newroot
# cd /
# find . -xdev -depth -print|cpio -pxdm /newroot
# cd /newroot/etc
# vi fstab
==> edit appropriately
# lvlnboot -R
==> resync vg headers
# setboot -p 0/0/2/0.2.0
==> change prim boot path to new disk (c2t2d0)

The above assumes you only have /,/stand and swap. Use appropriately if you have separate fs like /opt, /usr, etc


Uday_S_Ankolekar
Honored Contributor

Re: HP-UX Booting

Hi,

follow these steps for a mirrored root disk.

1 Make the disk a boot device
pvcreate -f -B /dev/rdsk/
2 Add the disk to the root VG
vgextend vg00 /dev/dsk/

3.Copy boot programs to the disk
mkboot -l /dev/dsk/

4. Make sure lif programs were added
lifls /dev/dsk/

5. Make sure that you mirror each lv in order as per your settings
lvextend -m 1 /dev/vg00/lvol1
lvextend -m 1 /dev/vg00/lvol2
lvextend -m 1 /dev/vg00/lvol3
lvextend -m 1 /dev/vg00/lvol4
lvextend -m 1 /dev/vg00/lvol5
lvextend -m 1 /dev/vg00/lvol6
lvextend -m 1 /dev/vg00/lvol7
lvextend -m 1 /dev/vg00/lvol8
lvextend -m 1 /dev/vg00/lvol9

6. Verify mirrors are correct
lvlnboot -v vg00

7.Copy the auto file used by hpux loader at start up
lifcp /dev/dsk/:AUTO -
then enter
lifco /dev/dsk/:AUTO -

8. Make the disks able to boot without quorum
mkboot -a "hpux -lq" /dev/rdsk/diskname primary
mkboot -a "hpux -lq" /dev/rdsk/the new disk

9. Make sure both are set up as the primary and backup boot devices
setboot -a

Goodluck,

-USA..



Good Luck..
Bill McNAMARA_1
Honored Contributor

Re: HP-UX Booting

> hard disk bootable, which is blank

just pvcreate -B and mkboot,

This will be blank!
but will show up on a BCH SEA because there'll be an ISL on the disk. man lif, man isl, man boot

Later,
Bill

It works for me (tm)