Solved

Solaris 4.1.3 cloning and booting

Posted on 2016-11-09
13
83 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 77

Expert Comment

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

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 

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 77

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 77

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 77

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 77

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 77

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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.

Question has a verified solution.

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

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…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.

856 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