tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* SUMMARY: Tru64 5.0A - Howto duplicate a boot disk and boot from t he
@ 2000-11-15 16:22 Schwarzkugler, Bernd
  0 siblings, 0 replies; only message in thread
From: Schwarzkugler, Bernd @ 2000-11-15 16:22 UTC (permalink / raw)
  To: tru64-unix-managers


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@ibex-ag.de

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-11-15 16:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-11-15 16:22 SUMMARY: Tru64 5.0A - Howto duplicate a boot disk and boot from t he Schwarzkugler, Bernd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox