SUMMARY: Tru64 5.0A - Howto duplicate a boot disk and boot from t he new created disk

From: Schwarzkugler, Bernd <Bernd_Schwarzkugler_at_ibex-ag.de>
Date: Wed, 15 Nov 2000 17:22:48 +0100

Bootdisk Cloning under Tru64 UN*X 5.0A - HOWTO
==============================================

The following people replied to my question and gave me the basis
for this summary :)

Croft, Ian
Zibby Bogacki
Dr. Tom Blinn
Horsnell T.
Colin Walters
Edward Branley
Bochnik, William J

The descriptions may work only with disks using the same
geometry e.g the same models.
I used a Alpha Server ES40 with 9.1 GB disks in the internal
drive cage.

You may copy and paste the two provided scripts and modify it
for your own needs.

In my example root_domain is on dsk0a and usr_domain is on dsk0d,
however your partitions layout will vary!

After poking around I'm very impressed of the device managment
system in Tru64 UN*X 5 - It is by far the most advanced i have ever
seen.

I prefer to duplicate the disk with the comand 'dd' - the advantage
is you get an exact copy of the master disk.
vdump,vrestore are not able to preserve the orginal timestamp of the files!

After you read this you would ask - why the link modification under
/etc/fdmns/root_domain and /etc/fdmns/usr_domain is necesery?

Because i see no other way, do you?

For additional information consult the manpages of hwmgr and dsfmgr
and the "System Administration Handbok" for Tru64 5.0A

Comments and additions are welcome.
 
1. initial steps

- plug in the destination disk in the drive cage
- power on the machine
- with "show dev" you should see the master disk and the destination disk
- boot from the master disk

2. the cloning

- login and do the following

# hwmgr -view devices
(you should see both disks and the special-device files too)

# init s
# mount -a

-now run this shell script:

I think it is self explaining....

-------------------snip---------------------------------------
#!/bin/sh -x

# Example Script for cloneing with dd under 5.0A

# After booting in single-user (b -fl s)
# make sure that the devicefiles for your destination disk
# exists (ls -l /dev/rdisk)

echo "1 - modify root_domain and usr_domain"

# that is the tricky way :)
cd /etc/fdmns/root_domain
rm dsk0a
ln -s /dev/disk/dsk1a .
ls -l

cd /etc/fdmns/usr_domain
rm dsk0d
ln -s /dev/disk/dsk1d .
ls -l
echo "modification correct? 5 seconds to go on! CTRL+C will break"
sleep 5

echo "2 - clear the disklabel on the destination disk"

disklabel -z /dev/rdisk/dsk1c
sleep 2

echo "3 - clone the source disk to the destination disk"
echo "this takes time ... please wait ..."
sync ;sync
dd if=/dev/rdisk/dsk0c of=/dev/rdisk/dsk1c bs=1024k

echo "4 - resemble root_domain and usr_domain"

# restore the old links!
cd /etc/fdmns/root_domain
rm dsk1a
ln -s /dev/disk/dsk0a .

cd /etc/fdmns/usr_domain
rm dsk1d
ln -s /dev/disk/dsk0d .
sleep 2

echo "5 - Halt the system and boot from your cloned disk"

echo "6 - run the script finishclonedd"
exit
-------------------snip---------------------------------------

3. finish

- Now shutdown the system and put out the master disk and plug the cloned
  disk in slot 0 of the drive cage.

- Do a "init" im srm-console

- boot from the disk

- Run this shell script:

-------------------snip---------------------------------------
#!/bin/sh -x

# finishclonedd does the rest

echo "run this script after you runed clonedd and booted up"

echo "1 - swap spezial device files"

dsfmgr -e dsk1 dsk0
ls -l /dev/disk

echo "2 - view devices, your disk should be /dev/disk/dsk0c"

hwmgr -view devices
sleep 5

echo "3 - modify root_domain and usr_domain"

cd /etc/fdmns/root_domain
rm dsk1a
ln -s /dev/disk/dsk0a .

cd /etc/fdmns/usr_domain
rm dsk1d
ln -s /dev/disk/dsk0d .

echo "4 - That it! Halt the system and boot up"
exit
-------------------snip---------------------------------------

- reboot your system and the cloned system is ready for futher
  tasks like idling around.



Have fun

 Bernd Schwarzkugler
 email: Bernd_Schwarzkugler_at_ibex-ag.de
Received on Wed Nov 15 2000 - 16:24:44 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:41 NZDT