Operating System - HP-UX
1843978 Members
1679 Online
110226 Solutions
New Discussion

Clone Alternative System disk - will not boot

 
Craig Hargreaves
Occasional Advisor

Clone Alternative System disk - will not boot

How do I make a bootable system disk by cloning my existing one? (HPXUX 10.20)
I have tryed the following but it hangs during boot after the memory information but before ioinit

(new disk scsi id 6 dec rz26 1gb)
(existing system scsi 5 MO rw 512Mb)

! create fs and reserve 256 MB space
newfs -F hfs -R 256 /dev/rdsk/c0t6d0
mkdir noddy
mount /dev/dsk/c0t6d0 /noddy
cd /
!copy contents of system disk to new disk
find . -xdev -print | cpio /noddy
!create boot record
mkboot /dev/rdsk/c0t6d0
! edit fstab to point to new disk
cp -p /etc/fstab /noddy/etc/fstab2
sed 's/6/5/' /noddy/etc/fstab2 > /noddy/etc/fstab2

shutdown and boot from my alternalte boot path



I have tried the reverse on a production system (HDD to RWMO) and that fails too
14 REPLIES 14
Stefan Farrelly
Honored Contributor

Re: Clone Alternative System disk - will not boot


The preferred method to clone a system disk is to use HP's ignite software product - although Ignite is really for disaster recovery purposes. If you dont want to use ignite then you can use dd instead. Bring up your system in single user mode, then do a raw dd from your primary boot disk to a new disk;

dd if=/dev/rdsk/cxxxxx of=/dev/rdsk/c0t6d0 bs=1024k

Then you should be able to boot from the new disk aok. I use it here sometimes, works great, but I prefer to use Ignite.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Victor BERRIDGE
Honored Contributor

Re: Clone Alternative System disk - will not boot

The simplest way would be to use ignite-ux make_recovery tool, if your 2 disks are identical there is nothing stopping you to do a dd of your disk to the new one , it works - I tried... (use block size 1024)
CHRIS_ANORUO
Honored Contributor

Re: Clone Alternative System disk - will not boot

Hi Craig,

You need to install Ignite UX to clone your system and have a bootable tape.
Follow this link to download the software: http://www.software.hp.com/products/IUX/docs.html

When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
Alan Riggs
Honored Contributor

Re: Clone Alternative System disk - will not boot

It sounds like what you want is an emergency boot disk, but you do not want/have mirrordisk/UX. In that case, you can create one with the following procedure:

pvcreate -B /dev/rdsk/c0t6d0
mkboot /dev/dsk/c0t6d0
place the disk in a VG, either vg00 or its own
create one or more LVs to hold filesystems.
create and mount filesystems under /newroot (or whatever you wish)
use CPIO to transfer data. (ex: cd /var; find . -xdev -depth| cpio -pdumx /newroot/var)
setboot -a (alternate path)
boot off of new disk to test.
Victor BERRIDGE
Honored Contributor

Re: Clone Alternative System disk - will not boot

Craigh,
I think we were all wrong?
You are not using LVM is that so?
So what kind of box is this (9000/7XX or8XX)?
We need more information in order to give you a good solution
Best regards
Victor
Craig Hargreaves
Occasional Advisor

Re: Clone Alternative System disk - will not boot

As Victor spotted I am not using LVM and have no requirment for it. The 'box' in question is a Single Board 744 workstaion mounted in a VME rack.
Using the method I posted originaly to create a clone disk and then repairing the disk from recovery program on the Installation CD fixes the problem but this is hardly a neat solution.

Stefan Farrelly
Honored Contributor

Re: Clone Alternative System disk - will not boot


Try the dd solution as I mentioned in my earlier reply. It works fine and its only a single command.
Im from Palmerston North, New Zealand, but somehow ended up in London...
John Palmer
Honored Contributor

Re: Clone Alternative System disk - will not boot

I've always used LVM personally but man mkboot mentions various flags pertinent to the whole disk layout.

Do you need to specify -H or -W (or maybe some others) to mkboot?
John Palmer
Honored Contributor

Re: Clone Alternative System disk - will not boot

Or do you have to supply the -B flag to newfs (to reserve the boot area).
Victor BERRIDGE
Honored Contributor

Re: Clone Alternative System disk - will not boot

And you have no tape device?

Looks like you cannot create a proper boot area.
If I remember right (more than 3 years have past since...) on non LVM HP 9000 workstations, the copy of the boot area on the root disk is /usr/lib/uxbootlf
I remembered making boot tapes with dd
dd if=/usr/lib/uxbootlf of=/dev/rmt/0mn bs=2k
then
dd if=/dev/rdsk/c201d6s0 of=/dev/rmt/0m bs=64k

So would it be for Craigh
mkboot -b /usr/lib/uxbootlf /dev/dsk/c0t6d0
mkboot -a "hpux (56/52.6.0;0)/stand/vmunix" /dev/rdsk/c0t6d0

You will have to adapt HW path...

Stefan Farrelly
Honored Contributor

Re: Clone Alternative System disk - will not boot


Victors previous reply is on the money. You need to write the uxbootlf.700 or uxbootlf.800 file to the destination disk using bs=2k to make it bootable.

So, to use dd to copy the entire disk use a bs=2k for the whole disk (if=/dev/rdsk of=/dev/rdsk bs=2k) and although it may take a long time to dd, your end result will be a bootable image disk, mach simpler and faster than any other method.
Im from Palmerston North, New Zealand, but somehow ended up in London...
CHRIS_ANORUO
Honored Contributor

Re: Clone Alternative System disk - will not boot

Craig,

Try mirroring the root files to the new disk then
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
Cheryl Griffin
Honored Contributor

Re: Clone Alternative System disk - will not boot

Craig,

I think the problem is with the command:
# newfs -F hfs -R 256 /dev/rdsk/c0t6d0

This does not have the -B option to reserve the boot area.
Try:
# newfs -F hfs -BLv -R 256 /dev/rdsk/c0t6d0

-B = reserve boot area
-L = long filenames (optional)
-v = verbose
"Downtime is a Crime."
Stefan Schulz
Honored Contributor

Re: Clone Alternative System disk - will not boot

If you have two (nearly) identical disks there is no need to play with newfs and cpio. Just do a dd in single user mode as described before. Its a fast and easy method for cloning disks. No more configuration, cause the new disk is bootable from the beginning.

If you have two totally different disks i would suggest using make_recovery or better make_sys_image. Both commands/programms come with Ignite/UX.
No Mouse found. System halted. Press Mousebutton to continue.