• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 136
  • Last Modified:

Solaris 4.1.3 cloning and booting

I had this question after viewing Solaris SUN OS 4.1.3 cloning.

I somehow booted the disk by setting env parameters but apparently after that none of the unix command is working. Is there any problem in the approach ? Or what needs to be done to get the commands functioning?
Puneeth MH
Puneeth MH
1 Solution
Hanno P.S.IT Consultant and Infrastructure ArchitectCommented:
This looks like you have not the exactly identical hardware setup in target machine as in source machine.
The controller / disk ID may be different.
If you cannot work after booting from disk
- boot off a CD (single user is sufficient)
- check your controller / disk ID (or use something like: ls -ld /dev/rsd0a)
- mount you root filesystem (on the new disk)
- compare the disk device files with what you found above
. you may have to adjust (edit) fstab (or is it called vfstab in SunOS 4.x?)
Joseph GanSystem AdminCommented:
That was what I have suggested earlier.
I you opened a second question that is on the same track as the first.
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Puneeth MHAuthor Commented:
Thanks for all of your responses. But unfortunately the machine has not tape drive support. It is very old machine with no luxury features hence boot off from CD is ruled out for me.

Somehow the thread was not allowing me to comment hence i created another related question.

I would like to share the procedure that I had followed, please let me know if this is correct.
2.      fsck -m /dev/rdsk/sd0a (Optional)
3.      dump 0ucf root.dump /
4.      Connect the disk
5.      reboot
6.     format
7.      /usr/etc/newfs -v /dev/rsd2a
8.      mount /dev/sd2a /mnt
9.      cd /mnt
10.     restore xf root.dump
11.     installboot -vlt /boot bootsd /dev/rsd0a (installboot -hvlt /boot bootsd /dev/rsd0a)
12.     shut down, put the new disk into target machine and reboot.

a) When I try to open fstab it always says the following,
"/var/tmpEx00102" Read-only file system

b) so I will try to clear this off by issuing the below command,
mount -o remount, rw /mnt

1) Is the procedure correct. If not what is wrong and what should done
2) Is the a) and b) right way to do?
3) Does both disks should have same partition, if the partitions are different will this work?
4) even after trying with dd command I get the same prompt which totally dysfunctional, none of the unix commands works.
5) I think source disk is 1.05g and destination disk is 1g.
If you are attaching the second disk to the same system you are cloning,

You can do dump 0ucf - / | restore rf -

Attach both drives, and boot system.
Select the second disk.
Partition it.
News /dev/sd2a
Mount /dev/sd2a /mnt
Cd /mnt
dump 0ucf - | restore rf -

You would need to repeat this for every partition you have on the original drive.
It all depends on how the original drive is partitioned.
Puneeth MHAuthor Commented:
So you mean to say , I should partition the second disk as that of original disk, is it?

After the above procedure (dump and restore)what needs to be done(any install boot required)? If I attach the second disk onto other machine(which has no other disk) will it boot with all the commands working?
You have to copy/replicate all the partitions on the existing boot disk to the one you want to move, yes, you need to install the boot on the sevond disk.

Puneeth MHAuthor Commented:
See I am new to solaris, may I know how copy or replicate the partitions? If you could provide me the command would be better. Install boot is same as that I had mentioned in the procedure is it?
Select disk (boot)
You should see the partition list.
Select other disk
Now create the individual partition except the backup that should already exist.

Once you create those, and write out.
4.1.3 is very old, I 'v not used it.

In newer versions there is a command (blanking out on it) to clone/copy the partition table from a reference disk to the new one.
This is a modern OS reference,
See if your system has prtvtoc command.
Using it to feed the output of current to create an identical layout on the second drive.

Puneeth MHAuthor Commented:
See as an example assume I want to copy the partitions/slices as below,

c0t3d0s0 /     ->  c0t1d0s0 /
      c0t3d0s4 /var  ->  c0t1d0s4 /var
      c0t3d0s5 /opt  ->  c0t1d0s5 /opt
      c0t3d0s6 /usr  ->  c0t1d0s6 /usr

But how to find these partitions/devices assigned to /usr ot /opt? I mean which command?
Look at the partition table,
the output of df -k or look at vfstab/fstab
Will have the disk and the mount point
c0t0d0s0 /
c0t0d0s1 /usr
c0t0d0s3 /var


Dump might take the disk /dev/c0t0d0s0 instead of the mount point /
Which might help in keeping track....

Often people have a standard practice the same applies to companies.
You have to make sure you when working for others if they have a default partitioning
Often it goes by importance
/usr and the next /opt if needed because of an application (oracle it think is/was often packaged/deployed in /opt

The reason for such a breakup is to avoid one item causing a partition running out of space leading to the entire system becoming unusable if /  was the only partition and the entire drive runs out of space.
Puneeth MHAuthor Commented:
Thnak you
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now