Solved

Solaris 4.1.3 cloning and booting

Posted on 2016-11-09
13
35 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
13 Comments
 
LVL 16

Expert Comment

by:Hanno Schröder
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 76

Expert Comment

by:arnold
ID: 41883295
I you opened a second question that is on the same track as the first.
0
 

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 76

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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 76

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 76

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 76

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 76

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

707 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now