1827458 Members
5471 Online
109965 Solutions
New Discussion

creating a boot CD

 
SOLVED
Go to solution
Beragnes
Occasional Contributor

creating a boot CD

Hello,

I'm looking for a way to create a boot CD
which would launch a minimum HPUX system from
which I would be able to access to some NFS
shares... Unfortunately, it seems that it
can't be done from the install CD.

any idea ?

thanks

sylvain
5 REPLIES 5
Armin Feller
Honored Contributor

Re: creating a boot CD

!/usr/bin/sh
#script to create a backup boot disk
#
print -n "Enter disk to use (c#t#d#) : "
read disk
pvcreate -Bf /dev/rdsk/$disk
if (($? != 0)) ;
then
echo "Error $? in pvcreate"
exit
fi
mkboot /dev/rdsk/$disk
print -n "Enter volume group to create: 1/2/3/... :"
read vg
mkdir /dev/vg0${vg}
mknod /dev/vg0${vg}/group c 64 0x0${vg}0000
vgcreate /dev/vg0${vg} /dev/dsk/$disk
if (($? != 0)) ;
then
echo "***** Error $? in vgcreate"
exit
fi
integer count=1
for i in `vgdisplay -v vg00 | awk '/LV Size/ {print $4}'` ;
do
echo ""
echo ""
#Create first 3 lvols contiguous
if ((${count} < 4)) ;
then
lvcreate -L ${i} -C y -r n -A n /dev/vg0${vg}
else
lvcreate -L ${i} -A n /dev/vg0${vg}
fi
if (($? != 0)) ;
then
echo "***** Error $? in lvcreate"
exit
fi
#Do a physical copy of lvol except for swap
if ((${count} != 2)) ;
then
if ((${count} == 3)) ;
then echo ""
echo "Not copying lvol3 yet"
count=count+1
continue
else
echo ""
echo copying /dev/vg00/rlvol${count} to /dev/vg0
${vg}/rlvol${count}
dd if=/dev/vg00/rlvol${count} of=/dev/vg0
${vg}/rlvol${count} bs=1024k
fi
fi
# fsck of disk (hfs for lvol1 and vxfs for lvol 3-n)
if ((${count} == 1)) ;
then
echo ""
echo doing fsck of /dev/vg0${vg}/rlvol1
fsck -F hfs /dev/vg0${vg}/rlvol1
elif ((${count} >2)) ;
then
echo ""
echo doing fsck of /dev/vg0${vg}/rlvol${count}
fsck -F vxfs /dev/vg0${vg}/rlvol${count}
fi
count=count+1
done
echo ""
echo copying /dev/vg00/rlvol3 to /dev/vg0${vg}/rlvol3
dd if=/dev/vg00/rlvol3 of=/dev/vg0${vg}/rlvol3 bs=1024k
fsck -F vxfs /dev/vg0${vg}/rlvol3
#Fill the BDRA
#
echo ""
echo "Filling the BDRA"
lvlnboot -b /dev/vg0${vg}/lvol1 /dev/vg0${vg}
lvlnboot -r /dev/vg0${vg}/lvol3 /dev/vg0${vg}
lvlnboot -s /dev/vg0${vg}/lvol2 /dev/vg0${vg}
lvlnboot -d /dev/vg0${vg}/lvol2 /dev/vg0${vg}
#Modify fstab to use new volume group
#
echo ""
echo "Modifying fstab in new root disk"
if [ ! -d /tmp_mnt ] ;
then
mkdir /tmp_mnt
fi
umount /tmp_mnt > /dev/null 2>&1
mount /dev/vg0${vg}/lvol3 /tmp_mnt
cd /tmp_mnt/etc
sed "s/vg00/vg0${vg}/" fstab >fstab.out
mv fstab fstab.bak
mv fstab.out fstab
#cd /
#date
#Shutdown and boot new backup boot disk
#
#Deactivate volume group and then vgexport it if needed in another location.
#
#vgchange -a n vg0${vg}
#vgexport vg0${vg}
#Transport volume to another machine if required.
#Create volume group and import into different machine if required
#
#mkdir /dev/vg01
#mkdir /dev/vg01/group c 64 0x010000
#vgimport /dev/vg01 /dev/dsk/

Armin Feller
Honored Contributor

Re: creating a boot CD

This document shows examples and assumes the user has a basic understanding of
Ignite-UX.


-------------------------------------------------
IgniteUX Boot CD Creation Cookbook
-------------------------------------------------


Create golden_image:
--------------------

make_net_recovery -A -v -s (server_name) -a (archive_server:archive_dir)
on (archive_server): mv "2001-07-10,10:33" (golden_image_name)


Create and edit config files:
-----------------------------
cp /opt/ignite/data/examples/core11.cfg /var/opt/ignite/bootcd.cfg
(--- for 10.20 use core.cfg !!)

chmod u+w /var/opt/ignite/bootcd.cfg

save_config -f /var/opt/ignite/(hostname.hwconf)

chmod u+w /var/opt/ignite/(hostname.hwconf)


Change bootcd.cfg:
------------------
- at sw_source "core archive":
load_order = 0
source_format = archive
source_type = "DSK"
change_media = FALSE

- Comment out everything concerning nfs_source, ftp_source und remsh_source

- At init sw_sel "golden image - 32 bit OS"
(or init sw_sel "golden image - 64 bit OS"):
archive_type = gzip tar
archive_path="(golden_image_name)"
(------- only golden_image name, not path !!)

- Put output of "/opt/ignite/lbin/archive_impact -t -g /.../(golden_image_name)
in place of what is written in the "impacts" part.


Create CD image
---------------
lvcreate -L XXX /dev/vgXX

(This size may vary depending on golden image size. Check the size of the golden
image after make_net_recovery and then create a filesystem which is about 50MB
bigger then the golden image).

newfs -F hfs -f 2048 /dev/vgXX/rlvolXX
(------ ensuring that we use 2048 fragment sz !!)

mkdir /image

mount /dev/vgXX/lvolXX /image

cp (golden_image_name) /image

umount /image

dd if=/dev/vgXX/rlvolXX of=/.../cd_image bs=1024k
(--- here you need a filesystem with enough space, around twice the
size of the golden image)

make_medialif -f /var/opt/ignite/(hostname.hwconf) -f /var/opt/ignite/bootcd.cfg
-l /.../uxinstall

(uxinstall=lifheader)

/opt/ignite/lbin/instl_combine -F /.../uxinstall -C /.../cd_image


Then burn the cd_image to the CD. You can use cdrecord for that on HPUX.
Sanjay_6
Honored Contributor

Re: creating a boot CD

Wodisch
Honored Contributor

Re: creating a boot CD

Hi Sylvain,

read the documentation about "Ignite/UX", especially about "customized install media":
http://software.hp.com/products/IUX/docs/Customized_Install_Media_Paper.pdf

IIRC then the biggest problem was the block size of 2048 bytes...
And if you are using PC-based burning software, well, not all of them can do this (Nero Burning COM can).

FWIW,
Wodisch
Bill Hassell
Honored Contributor
Solution

Re: creating a boot CD

If you are looking for a diskless (ie, CDROM boot with no hard disk at all) solution, this isn't possible. HP-UX must have a writable swap area as well as writable /var and /tmp and other writable areas in order to run networking. NFS is a complex protocol and only works after full networking is operational.


Bill Hassell, sysadmin