Operating System - HP-UX
1828214 Members
2374 Online
109975 Solutions
New Discussion

How to make a boot disk using whole disk partition

 
Sunny_Zhang
Frequent Advisor

How to make a boot disk using whole disk partition

Hi Experts,

Is there a way I can configure a whole disk partition without through SAM on a PA-RISC sercver? Especiallly a boot disk? I want to make a boot disk as the secondary boot disk by using whole disk partition. Thanks!
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: How to make a boot disk using whole disk partition

Shalom,

SAM can do it via normal menuing.

You look at the disk section, select the disk and assuming there is nothing on the disk now, you should see an option to use the disk and the next question will be whether or not to use LVM.

In this case you would not use LVM.

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
Sunny_Zhang
Frequent Advisor

Re: How to make a boot disk using whole disk partition

Steven, Thanks for the reply. But my problem is that I don't want to do it through SAM. For non-boot disk, it is very straight-forward, but I did figure out how to do it to create a boot disk with whole disk partition step by step. Can someone throw some lights here? Thanks!

Steven E. Protter
Exalted Contributor

Re: How to make a boot disk using whole disk partition

Okay,

It looks like this in LVM mode.

pvcreate -B /dev/rdsk/c1t0d0 #use real disk

mkboot -l /dev/rdsk/c1t0d0
mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c1t0d0 # use real disk


# mkboot -b /usr/sbin/diag/lif/updatediaglif -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c?t?d?

If you are running 64-bit OS:

# mkboot -b /usr/sbin/diag/lif/updatediaglif2 -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c?t?d?


vgextend /dev/vg00 /dev/dsk/c1t0d0 # same thing
lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c1t0d0

# real disk. repeat for other lvols

lvlnboot -r /dev/vg00/lvol3 # root fs /
lvlnboot -s /dev/vg00/lvol2 #swap
lvlnboot -d /dev/vg00/lvol2 #swap/dump
lvlnboot -b /dev/vg00/lvol1
lvlnboot -R
lvlnboot -v
setboot
setboot -a 52.1.0 # second disk


Changes for whole disk(subject to experimentation).


pvcreate -B /dev/rdsk/c1t0d0 #use real disk

mkboot -l /dev/rdsk/c1t0d0
mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c1t0d0 # use real disk


# mkboot -b /usr/sbin/diag/lif/updatediaglif -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c?t?d?

If you are running 64-bit OS:

# mkboot -b /usr/sbin/diag/lif/updatediaglif2 -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c?t?d?



# real disk. repeat for other lvols


# These steps require modification. With no LVM I'll admit i don't know how to handle swap and dump. Perhaps leave them in the lvm structure. maybe you don't need these steps.
lvlnboot -r /dev/vg00/lvol3 # root fs /
lvlnboot -s /dev/vg00/lvol2 #swap
lvlnboot -d /dev/vg00/lvol2 #swap/dump
lvlnboot -b /dev/vg00/lvol1
lvlnboot -R
lvlnboot -v
setboot
setboot -a 52.1.0 # second disk

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
Sunny_Zhang
Frequent Advisor

Re: How to make a boot disk using whole disk partition

Steven, thank you very much for your reply. I tried the appoach you mentioned, and failed. I knew you didn't really try it before, just want to share the information / experimentation. Also hope someone can give more help on this.

My HP 9000 server originally has two disks: c1t15d0 and c3t15d0, and c1t15d0 is the boot disk. Both disk are configured through LVM. I just plug in a JBOD which has 4 disks to this server.

# ls /dev/dsk
c0t0d0 c0t4d0 c0t2d0 c0t1d0 c1t15d0 c3t15d0

Now I follow what you suggested in your previous email to make c0t1d0 as my second boot disk.
#
# pvcreate -B /dev/rdsk/c0t1d0
Creating "/etc/lvmtab".
Physical volume "/dev/rdsk/c0t1d0" has been successfully created.
#
# mkboot -l /dev/rdsk/c0t1d0
#
#
# glif -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c0t1d0 <
#
======================================
Now I tried to create a hfs filesystem on it, so I can mount it. I failed with the following errors.
#
#
# newfs -F hfs /dev/rdsk/c0t1d0
mkfs (hfs): /dev/rdsk/c0t1d0 is a logical volume device.
#
# mount /dev/dsk/c0t1d0 /tmp/boot1
/dev/dsk/c0t1d0: unrecognized file system
#

Any idea? Thanks!
SANTOSH S. MHASKAR
Trusted Contributor

Re: How to make a boot disk using whole disk partition

Hi Sunny,

Don't use pvcreate if u want to use whole disk
approach. pvcreate will prepare a disk to be used in LVM conf.

Just try this (not tested)

1] make essential file systems on disk c0t1d0
(i.e. /stand, /) configure swap/dump.

2] make the disk bootable (copy boot programs on disk)

mkboot -W /dev/dsk/c0t1d0

Regards

-Santosh