Operating System - HP-UX
1833983 Members
2144 Online
110063 Solutions
New Discussion

How to creat new boot disk?

 
Steven Pao
Occasional Contributor

How to creat new boot disk?

Dear all :
I want to creat a new boot disk , but haven't
Ignite-UX(make_recovery). Who can help me to do the job?
Model : 715/50
OS: HP-UX 10.10
Memory: 32MB
HDD target6 HP C3324A (boot disk)
HDD target5 IBM 0664MIH (new boot disk)
TAPE driver : C1503
12 REPLIES 12
Sanjay_6
Honored Contributor

Re: How to creat new boot disk?

Sridhar Bhaskarla
Honored Contributor

Re: How to creat new boot disk?

What would you like to do with the new boot disk?.. If you want to do mirroring, then following is the procedure.

Let's call your disk as /dev/dsk/c0t5d0

#pvcreate -B /dev/dsk/c0t5d0
#vgextend vg00 /dev/dsk/c0t5d0
#mkboot /dev/dsk/c0t5d0
#mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/dsk/c0t5d0
#cd /usr/sbin/diag/lif (if you have OnlineDiag installed)
#mkboot -vb updatediaglif -p ISL -p AUTO -p HPUX /dev/rdsk/c0t5d0

Once this is done do a mirroring for all your logical volumes starting from /stand (lvol1)

lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c0t5d0
....

Once all the logical volumes are mirrored,

#lvlnboot -b /dev/vg00/lvol1
#lvlnboot -s /dev/vg00/lvol2 (or the primaryswap lvol)
#lvlnboot -r /dev/vg00/lvol3 (or the lvol mounted as /)
#lvlnboot -R
#lvlnboot -v (verify everything is fine here that two disks are showed)

You can verify if everything is there by doing

#lifls /dev/dsk/c0t5d0

To verify the auto string -
#lifcp /dev/dsk/c0t5d0:AUTO -

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Patrick Wallek
Honored Contributor

Re: How to creat new boot disk?

Is this system using LVM to manage the disk or is it using a whole-disk configuration?

If it is using LVM then have a look at the following thread, specifically Peggy Fong's response:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0xafc36af52b04d5118fef0090279cd0f9,00.html

If it is a Non-LVM whole disk set up, I don't know how you could do it.
Sridhar Bhaskarla
Honored Contributor

Re: How to creat new boot disk?

Ok. With Patrick's message I now understood what you are trying to do. Once the mirroing is done, it's easy to split the mirrors and boot from the mirror copy.

lvsplit from the reverse order

for LV in lvol8 lvol7 .. lvol1
do
lvsplit /dev/vg00/$LV
done

Now you can see a backup copy of the lvols as lvol1b etc under vg00.

Do an fsck on all the lvol*bs. Better to use
full nolog option

fsck -F vxfs -o full,nolog /dev/vg00/lvol2b
.....
just fsck for lvol1b

*Important. Do an lvlnboot on the logical volumes*

lvlnboot -b /dev/vg00/lvol1b
lvlnboot -s /dev/vg00/lvol2b
lvlnboot -r /dev/vg00/lvol3b
lvlnboot -d /dev/vg00/lvol2b
lvlnboot -v

Now mount the split "root" and modify the fstab

mount /dev/vg00/lvol3b /test

vi /test/etc/fstab

Now replace lvol1, lvol3 ... with lvol1b, lvol3b respectively

Now you can boot from the alternate path by stopping at bootadmin and booting from alternate disk.

You can always do an lvmerge whenever you want to sync up the data. However, you need to do this lvlnboot procedure again for lvol1, lvol2... etc

-Sri




You may be disappointed if you fail, but you are doomed if you don't try
Shahul
Esteemed Contributor

Re: How to creat new boot disk?


Hi

Follow these steps. First add the new HDD which U want to make it bootable.

#ioscan -fnC disk

Now U will get the list of HDDs. Find out the device file of newly added HDD. Suppose the new device file /dev/dsk/c0t4d0

#diskinfo /dev/rdsk/c0t4d0

Confirm the model, size ..etc of the newly added HDD.

#pvcreate -B -f /dev/rdsk/c0t4d0
#mkdir /dev/vg02 (This vg02 should not be there already. If it is there give some other vg)
#mknod /dev/vg02/group c 64 0x020000 (minor number should be unique)
#mkboot /dev/rdsk/c0t4d0
#mkboot -a "hpux(;0)/stand/vmunix"
#vgcreate /dev/vg02 /dev/dsk/c0t4d0
#lvcreate -Cy -rn -L xxx /dev/vg02 (xxx is the size of boot volume)
#lvcreate -Cy -rn -L yyy /dev/vg02 (yyy is the size of swap volume)
#lvcreate -Cy -rn -L zzz /dev/vg02 (zzz is the size of root volume)
#lvlnboot -b /dev/vg02/lvol1
#lvlnboot -r /dev/vg02/lvol3
#lvlnboot -s /dev/vg02/lvol2
#lvlnboot -d /dev/vg02/lvol2
#lvlnboot -R
#lvlnboot -V here verify whether the newly added volumes are there in BDRA or not.

#mkdir /newroot
#newfs -F vxfs /dev/vg02/rlvol3
#mount /dev/vg02/lvol3 /newroot
#find . -xdev -depth -print | cpio -pxdm /newroot
#mkdir /newboot
#newfs -F hfs /dev/vg02/rlvol1
#mount /dev/vg02/lvol1 /newboot
#cd /stand
#find . -xdev -depth -print | cpio -pxdm /newboot
#reboot -h

Now change the new root HDD's id and boot thru that. U will get the prompt.

Best of luck

Shahul
Steven Pao
Occasional Contributor

Re: How to creat new boot disk?

Dear all:
I try "#lvlnboot -b /dev/vg02/lvol1" ,but display "b" : Illegal option
Why ?
Marcin Wicinski
Trusted Contributor

Re: How to creat new boot disk?

Hi,

you cannot prepare lvol1 in vg02 to be boot volume - must be in vg00 (root vg).

later,
Marcin Wicinski
Sridhar Bhaskarla
Honored Contributor

Re: How to creat new boot disk?

You are using OS ver 10.10. Pretty old and is almost outdated. I do not quite recall if -b is there with it or not.

However see the man page for lvlnboot and see if you have this option available.

Can you please send us your bdf |grep vg00 output?.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Sridhar Bhaskarla
Honored Contributor

Re: How to creat new boot disk?

It looks like you have a combined boot and root logical volume. So you simply need to do lvlnboot -r /dev/vg02/lvol1 (if you are using vg02 as your alternate root volume group) should work for you. After doing with -s and -d, do an lvlnboot -v and see what is getting displayed.

Also, remember that you can boot in -lm LVM maintenance mode and run these commands if it doesn't work.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Steven Pao
Occasional Contributor

Re: How to creat new boot disk?

We have not vg00, boot disk only...
Sridhar Bhaskarla
Honored Contributor

Re: How to creat new boot disk?

hmmm.. no LVM but only whole disk/HFS?.....

Do a dd

dd if=/dev/rdsk/c0t0d0 of=/dev/rdsk/c0t1d0 bs=1024k

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Steven Pao
Occasional Contributor

Re: How to creat new boot disk?

We try DD ...but the backup disk can not boot