Solved

Solaris SUN OS 4.1.3 machine clone

Posted on 2016-11-04
15
30 Views
Last Modified: 2016-11-08
I have a machine with Solaris Sun os 4.1.3, which I am trying to clone.
I have a procedure which would work with Solaris 8 to 10.
I tried creating a snapshot using fssnap  but it says command not found.

What is the alternative to use fssnap under ufsdump in 4.1.3 or in other words, what are the steps to be followed to clone the same?
0
Comment
Question by:Puneeth MH
  • 8
  • 7
15 Comments
 
LVL 16

Accepted Solution

by:
Hanno Schröder earned 500 total points
ID: 41873822
Wow, you still have Sun  OS 4.1.3 around? How old ist this?

OK, to answer your question:
Snapshotting is a technology that has not been around when Sun OS 4.1.3 was born.
Therefore: No fssnap or the like

You can use the ufsdump in single user mode instead:
- shutdown  into single-user mode: shutdown -g0 -y
- check root filesystem (optional): fsck -m /dev/rdsk/<device>
- dump filesystem: ufsdump 0ucf <dump-file> /  
   If you have a tape drive, you can use: ufsdump 0ucf /dev/rmt/0
1
 

Author Comment

by:Puneeth MH
ID: 41876626
Yes, it was commissioned around 1996 or so.

ufsdump is not found in 4.1.3/4.
The machine does not have tape drive support.

What is <dump-file> here?  Can I name anything?
If you don't mind requesting you to provide stepwise procedure till the end (installboot) that would work under SUN OS 4.1.x.
0
 
LVL 16

Assisted Solution

by:Hanno Schröder
Hanno Schröder earned 500 total points
ID: 41876718
just use any name you like for <dump-file> ;-)
Usually, I select a name like "somename.dump".

The installboot for SunOS 4.x.y:
(I don't remember exactly the m* dir name as I don't have a SunOS 4 machine around anymore):
/usr/kvm/m*/installboot  [-hltv] bootfile protobootblk bootdevice
An example would be:
cd /usr/kvm/m*
installboot -vlt /boot bootsd /dev/rsd0a 

Open in new window

Make sure to use the correct device (for /dev/sd0a). slice "a" is the first partition (boot partition).
More details should be available using "man installboot" on your SunOS 4 box.
1
 

Author Comment

by:Puneeth MH
ID: 41876720
format command would show two disks
0. sd0 at esp0 slave 24
sd0: <SUN0424 cyl 1151 alt 2 hd 9 sec 80>

sd2 at esp0 slave 16
sd2: <FUJISTU M2952S cyl 5044 alt 2 hd 5 sec 186>
0
 
LVL 16

Assisted Solution

by:Hanno Schröder
Hanno Schröder earned 500 total points
ID: 41876722
Looks like /dev/sd0 is your boot disk and /dev/sd2 the second disk.
Therefore, /dev/sd0a is your root (and boot) filesystem and /dev/sd2a would be the root filesystem on the second disk (setup with "format" to prepare for use).
1
 

Author Comment

by:Puneeth MH
ID: 41876725
Since there is no ufsdump, I am using dump and restore command of 4.1.3

let me know if there is something wrong or fishy in the below procedure for the cloning.

dump 0ucf root.dump /  
Add the new disk.
reboot -- -r
prtvtoc /dev/rsda0 | fmthard -s - /dev/rsda2    (PS: Not aware whether prtvtoc would work in 4.1.3)
newfs /dev/rsd2  (Please let me know if my device name and path to be corrected)
mount /dev/rsd0  /mnt
cd /mnt
restore xf root.dump
cd /usr/kvm/m*
installboot -vlt /boot bootsd /dev/rsd0a
0
 
LVL 16

Assisted Solution

by:Hanno Schröder
Hanno Schröder earned 500 total points
ID: 41876740
To add the new disk:
Neither prtvtoc nore fmthard exist in SunOS 4.
If you have identical (!) disk drives, you can use 'dd' to copy basic disk info (like the partition table):
dd if=/dev/rdsk/sd0a of=/dev/rdsk/sd2a bs=64k count=2000

Open in new window

2000 is just a wild guess but should be more than sufficient. Check with "format" or "dkinfo" if the command suceeded. If the disk drives a not identical, use "format" to create the partitions as desired.
Example: /usr/etc/newfs -v /dev/rsd2a
Now you are ready to create filesystems (newfs etc.), mount and restore files.
Also, "reboot -- -r" is not known.

Some good man pages for SunOS can be found hre: http://modman.unixdev.net/?sektion=8&page=newfs&manpath=SunOS-4.1.3
1
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

Author Comment

by:Puneeth MH
ID: 41876784
Ok, I got the path of installboot.
/usr/kvm/mdec/installboot [ -hltv ] .

if so then I will have installboot onto sd2a isn't it?
0
 

Author Comment

by:Puneeth MH
ID: 41876786
is /boot  and /bootsd remain same or will it change?
I understand bootsd is for an SD drive?

What could be other possibilities?
0
 
LVL 16

Assisted Solution

by:Hanno Schröder
Hanno Schröder earned 500 total points
ID: 41876895
Looks like you will have to use: installboot -vlt /boot bootsd /dev/rsd2a
There is no such thing as /bootsd -- as far as I remember.
1
 

Author Comment

by:Puneeth MH
ID: 41876898
My bad, it was typo.
0
 
LVL 16

Expert Comment

by:Hanno Schröder
ID: 41876941
no problem ;-)
0
 

Author Comment

by:Puneeth MH
ID: 41878209
There are couples of errors reported in the first two command.

dump command shows following error;

#dump 0ucf root.dump /
DUMP: Date of this level 0 dump: Mon Nov 7
DUMP : Date of last level 0 dump: the epoch
DUMP: Dumping /dev/rsd0a (/) to root.dump
DUMP: mapping (Pass I) [regular files]
DUMP: mapping (Pass II) [directories]
DUMP: estimated 97024 blocks (47.38MB) on 1.11 tape(s).
DUMP: mapping (Pass III) [directories]
DUMP: mapping (Pass IV) [regular files]

/: write failed file system is full
DUMP: Tape write error 1255 feet into tape 1
DUMP: NEEDS ATTENTION: Do you want to restart?: ("yes" or "no")


Why this error, is the dump command writing to tape?
How to resolve this?
0
 
LVL 16

Assisted Solution

by:Hanno Schröder
Hanno Schröder earned 500 total points
ID: 41878266
where do you write the file root.dump to?
Looks like the filesystem you did put it is running out of space
The file is the "tape".
1
 

Author Closing Comment

by:Puneeth MH
ID: 41878349
Thanks a lot, could you please continue your answers in other post of the same subject line?
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Problem We are doing a daily copy of data in file system in Linux manually and I want to automate the same . We need many features in this automation:    1. We want to be able to exit in case of errors    2. We want the copy to happen via …
The article will include the best Data Recovery Tools along with their Features, Capabilities, and their Download Links. Hope you’ll enjoy it and will choose the one as required by you.
This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

759 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

17 Experts available now in Live!

Get 1:1 Help Now