Solved

Solaris 4.1.3 cloning and booting

Posted on 2016-11-09
13
102 Views
Last Modified: 2016-11-14
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?
0
Comment
Question by:Puneeth MH
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
13 Comments
 
LVL 16

Expert Comment

by:Hanno P.S.
ID: 41881728
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?)
1
 
LVL 16

Expert Comment

by:Joseph Gan
ID: 41882930
That was what I have suggested earlier.
0
 
LVL 79

Expert Comment

by:arnold
ID: 41883295
I you opened a second question that is on the same track as the first.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Puneeth MH
ID: 41883347
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.

Procedure:
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.
0
 
LVL 79

Expert Comment

by:arnold
ID: 41883359
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.
Format
Select the second disk.
Partition it.
Write
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.
0
 

Author Comment

by:Puneeth MH
ID: 41883432
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?
0
 
LVL 79

Expert Comment

by:arnold
ID: 41883436
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.

d
0
 

Author Comment

by:Puneeth MH
ID: 41883522
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?
0
 
LVL 79

Expert Comment

by:arnold
ID: 41883988
Format
Select disk (boot)
Partition
List
You should see the partition list.
Format
Select other disk
Partition
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.
1
 
LVL 79

Expert Comment

by:arnold
ID: 41883991
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.

http://docs.oracle.com/cd/E23824_01/html/821-1459/disksconcepts-5.html
0
 

Author Comment

by:Puneeth MH
ID: 41884004
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?
0
 
LVL 79

Accepted Solution

by:
arnold earned 500 total points
ID: 41884098
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


Etc.

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
/
Swap
/usr and the next /opt if needed because of an application (oracle it think is/was often packaged/deployed in /opt
/var
/var/log
/home

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.
1
 

Author Closing Comment

by:Puneeth MH
ID: 41886401
Thnak you
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question